Skip to content

Commit a3f1424

Browse files
joabreudavem330
authored andcommitted
net: stmmac: Add the bindings parsing for XGMAC2
Add the bindings parsing for XGMAC2 IP block. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Cc: David S. Miller <davem@davemloft.net> Cc: Joao Pinto <jpinto@synopsys.com> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7d9e6c5 commit a3f1424

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ static const struct of_device_id dwmac_generic_match[] = {
7878
{ .compatible = "snps,dwmac-4.00"},
7979
{ .compatible = "snps,dwmac-4.10a"},
8080
{ .compatible = "snps,dwmac"},
81+
{ .compatible = "snps,dwxgmac-2.10"},
82+
{ .compatible = "snps,dwxgmac"},
8183
{ }
8284
};
8385
MODULE_DEVICE_TABLE(of, dwmac_generic_match);

‎drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,12 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
486486
plat->force_sf_dma_mode = 1;
487487
}
488488

489+
if (of_device_is_compatible(np, "snps,dwxgmac")) {
490+
plat->has_xgmac = 1;
491+
plat->pmt = 1;
492+
plat->tso_en = of_property_read_bool(np, "snps,tso");
493+
}
494+
489495
dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg),
490496
GFP_KERNEL);
491497
if (!dma_cfg) {

0 commit comments

Comments
 (0)