]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: add support for dwmac 3.40a
authorHerve Codina <herve.codina@bootlin.com>
Fri, 8 Oct 2021 10:34:39 +0000 (12:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Oct 2021 15:22:39 +0000 (16:22 +0100)
dwmac 3.40a is an old ip version that can be found on SPEAr3xx soc.

Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-generic.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c

index fbfda55b4c5263112070323a97f7baf39c516855..5e731a72cce81a4c2d50dbece319465588e3df70 100644 (file)
@@ -71,6 +71,7 @@ err_remove_config_dt:
 
 static const struct of_device_id dwmac_generic_match[] = {
        { .compatible = "st,spear600-gmac"},
+       { .compatible = "snps,dwmac-3.40a"},
        { .compatible = "snps,dwmac-3.50a"},
        { .compatible = "snps,dwmac-3.610"},
        { .compatible = "snps,dwmac-3.70a"},
index 62cec9bfcd33722d6b124695fcd327ca6d238248..232ac98943cd08a66a4bd65b53c2d100843d29f1 100644 (file)
@@ -508,6 +508,14 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac)
                plat->pmt = 1;
        }
 
+       if (of_device_is_compatible(np, "snps,dwmac-3.40a")) {
+               plat->has_gmac = 1;
+               plat->enh_desc = 1;
+               plat->tx_coe = 1;
+               plat->bugged_jumbo = 1;
+               plat->pmt = 1;
+       }
+
        if (of_device_is_compatible(np, "snps,dwmac-4.00") ||
            of_device_is_compatible(np, "snps,dwmac-4.10a") ||
            of_device_is_compatible(np, "snps,dwmac-4.20a") ||