Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

stmmac: add new DT platform entries for GMAC4

This is to support the snps,dwmac-4.00 and snps,dwmac-4.10a
and related features on the platform driver.
See binding doc for further details.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexandre TORGUE and committed by
David S. Miller
ee2ae1ed 36ff7c1e

+11
+2
Documentation/devicetree/bindings/net/stmmac.txt
··· 59 59 - snps,fb: fixed-burst 60 60 - snps,mb: mixed-burst 61 61 - snps,rb: rebuild INCRx Burst 62 + - snps,tso: this enables the TSO feature otherwise it will be managed by 63 + MAC HW capability register. 62 64 - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus. 63 65 64 66 Examples:
+7
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
··· 284 284 plat->pmt = 1; 285 285 } 286 286 287 + if (of_device_is_compatible(np, "snps,dwmac-4.00") || 288 + of_device_is_compatible(np, "snps,dwmac-4.10a")) { 289 + plat->has_gmac4 = 1; 290 + plat->pmt = 1; 291 + plat->tso_en = of_property_read_bool(np, "snps,tso"); 292 + } 293 + 287 294 if (of_device_is_compatible(np, "snps,dwmac-3.610") || 288 295 of_device_is_compatible(np, "snps,dwmac-3.710")) { 289 296 plat->enh_desc = 1;
+2
include/linux/stmmac.h
··· 137 137 void (*exit)(struct platform_device *pdev, void *priv); 138 138 void *bsp_priv; 139 139 struct stmmac_axi *axi; 140 + int has_gmac4; 141 + bool tso_en; 140 142 }; 141 143 #endif