* [PATCHv1] net: stmmac: Add ip version to dts bindings
@ 2012-07-18 23:28 dinguyen
2012-07-19 7:25 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: dinguyen @ 2012-07-18 23:28 UTC (permalink / raw)
To: netdev
Cc: dinh.linux, peppe.cavallaro, sr, shiraz.hashim, deepak.sikri,
pavel, arnd, Dinh Nguyen
From: Dinh Nguyen <dinguyen@altera.com>
Because there are multiple variants to the stmmac/dwmac driver, the
dts bindings should be updated to include version of the IP used.
Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
---
Documentation/devicetree/bindings/net/stmmac.txt | 3 ++-
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 8 ++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index 1f62623..060bbf0 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -1,7 +1,8 @@
* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
Required properties:
-- compatible: Should be "st,spear600-gmac"
+- compatible: Should be "snps,dwmac-<ip_version>" "snps,dwmac"
+ For backwards compatibility: "st,spear600-gmac" is also supported.
- reg: Address and length of the register set for the device
- interrupt-parent: Should be the phandle for the interrupt controller
that services interrupts for this device
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index 680d2b8..87cadcf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -49,7 +49,9 @@ static int __devinit stmmac_probe_config_dt(struct platform_device *pdev,
* are provided. All other properties should be added
* once needed on other platforms.
*/
- if (of_device_is_compatible(np, "st,spear600-gmac")) {
+ if (of_device_is_compatible(np, "st,spear600-gmac") ||
+ of_device_is_compatible(np, "snps,dwmac-3.70a") ||
+ of_device_is_compatible(np, "snps,dwmac")) {
plat->has_gmac = 1;
plat->pmt = 1;
}
@@ -250,7 +252,9 @@ static const struct dev_pm_ops stmmac_pltfr_pm_ops;
#endif /* CONFIG_PM */
static const struct of_device_id stmmac_dt_ids[] = {
- { .compatible = "st,spear600-gmac", },
+ { .compatible = "st,spear600-gmac"},
+ { .compatible = "snps,dwmac-3.70a"},
+ { .compatible = "snps,dwmac"},
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, stmmac_dt_ids);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv1] net: stmmac: Add ip version to dts bindings
2012-07-18 23:28 [PATCHv1] net: stmmac: Add ip version to dts bindings dinguyen
@ 2012-07-19 7:25 ` Stefan Roese
2012-07-19 17:50 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Roese @ 2012-07-19 7:25 UTC (permalink / raw)
To: dinguyen
Cc: netdev, dinh.linux, peppe.cavallaro, shiraz.hashim, deepak.sikri,
pavel, arnd
On Thursday 19 July 2012 01:28:26 dinguyen@altera.com wrote:
> From: Dinh Nguyen <dinguyen@altera.com>
>
> Because there are multiple variants to the stmmac/dwmac driver, the
> dts bindings should be updated to include version of the IP used.
>
> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCHv1] net: stmmac: Add ip version to dts bindings
2012-07-19 7:25 ` Stefan Roese
@ 2012-07-19 17:50 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2012-07-19 17:50 UTC (permalink / raw)
To: sr
Cc: dinguyen, netdev, dinh.linux, peppe.cavallaro, shiraz.hashim,
deepak.sikri, pavel, arnd
From: Stefan Roese <sr@denx.de>
Date: Thu, 19 Jul 2012 09:25:58 +0200
> On Thursday 19 July 2012 01:28:26 dinguyen@altera.com wrote:
>> From: Dinh Nguyen <dinguyen@altera.com>
>>
>> Because there are multiple variants to the stmmac/dwmac driver, the
>> dts bindings should be updated to include version of the IP used.
>>
>> Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
>
> Acked-by: Stefan Roese <sr@denx.de>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-19 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 23:28 [PATCHv1] net: stmmac: Add ip version to dts bindings dinguyen
2012-07-19 7:25 ` Stefan Roese
2012-07-19 17:50 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.