Message ID | 1590394945-5571-1-git-send-email-fugang.duan@nxp.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 139df98bdfef62868df3d626d27f1db9edd9830f |
Headers | show |
Series | stmmac: platform: add "snps, dwmac-5.10a" IP compatible string | expand |
On Mon, May 25, 2020 at 04:22:25PM +0800, Fugang Duan wrote: > Add "snps,dwmac-5.10a" compatible string for 5.10a version that can > avoid to define some plat data in glue layer. Documentation/devicetree/bindings/net/snps,dwmac.yaml ? Andrew
From: Andrew Lunn <andrew@lunn.ch> Sent: Monday, May 25, 2020 10:11 PM > On Mon, May 25, 2020 at 04:22:25PM +0800, Fugang Duan wrote: > > Add "snps,dwmac-5.10a" compatible string for 5.10a version that can > > avoid to define some plat data in glue layer. > > Documentation/devicetree/bindings/net/snps,dwmac.yaml ? > > Andrew Here, we don't want to use generic driver "dwmac-generic.c" for 5.10a version since it requires platform specific code to be functional, like the we implement glue layer driver "dwmac-imx.c" to support 5.10a on i.MX platform. So I think it doesn't require to add the compatible string into dwmac.yaml.
On Mon, May 25, 2020 at 04:00:29PM +0000, Andy Duan wrote: > From: Andrew Lunn <andrew@lunn.ch> Sent: Monday, May 25, 2020 10:11 PM > > On Mon, May 25, 2020 at 04:22:25PM +0800, Fugang Duan wrote: > > > Add "snps,dwmac-5.10a" compatible string for 5.10a version that can > > > avoid to define some plat data in glue layer. > > > > Documentation/devicetree/bindings/net/snps,dwmac.yaml ? > > > > Andrew > > Here, we don't want to use generic driver "dwmac-generic.c" for 5.10a version > since it requires platform specific code to be functional, like the we implement > glue layer driver "dwmac-imx.c" to support 5.10a on i.MX platform. > > So I think it doesn't require to add the compatible string into dwmac.yaml. Hi Andy It needs to be documented somewhere. If not Documentation/devicetree/bindings/net/snps,dwmac.yaml it needs to be in an NXP specific document. Andrew
From: Andrew Lunn <andrew@lunn.ch> Sent: Tuesday, May 26, 2020 12:06 AM > On Mon, May 25, 2020 at 04:00:29PM +0000, Andy Duan wrote: > > From: Andrew Lunn <andrew@lunn.ch> Sent: Monday, May 25, 2020 10:11 > PM > > > On Mon, May 25, 2020 at 04:22:25PM +0800, Fugang Duan wrote: > > > > Add "snps,dwmac-5.10a" compatible string for 5.10a version that > > > > can avoid to define some plat data in glue layer. > > > > > > Documentation/devicetree/bindings/net/snps,dwmac.yaml ? > > > > > > Andrew > > > > Here, we don't want to use generic driver "dwmac-generic.c" for 5.10a > > version since it requires platform specific code to be functional, > > like the we implement glue layer driver "dwmac-imx.c" to support 5.10a on > i.MX platform. > > > > So I think it doesn't require to add the compatible string into dwmac.yaml. > > Hi Andy > > It needs to be documented somewhere. If not > Documentation/devicetree/bindings/net/snps,dwmac.yaml it needs to be in > an NXP specific document. > > Andrew Yes, it can be added into NXP binding document. I wait other's comment for dwmac-imx.c driver review, then will add it together in next version. Thanks for your comments.
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index bcda49d..f32317f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -507,7 +507,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) 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")) { + of_device_is_compatible(np, "snps,dwmac-4.20a") || + of_device_is_compatible(np, "snps,dwmac-5.10a")) { plat->has_gmac4 = 1; plat->has_gmac = 0; plat->pmt = 1;
Add "snps,dwmac-5.10a" compatible string for 5.10a version that can avoid to define some plat data in glue layer. Signed-off-by: Fugang Duan <fugang.duan@nxp.com>