diff options
author | Dinh Nguyen <dinguyen@altera.com> | 2012-07-18 09:28:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-19 13:48:00 -0400 |
commit | 84c9f8c41df9f62a34eb680009b59cc817a76d6e (patch) | |
tree | 84b7069ecbde6f02fca13f578de5c1f424c5f011 | |
parent | 1d962ecf1e8d42c09abac2f715239a592c9415de (diff) |
net: stmmac: Add ip version to dts bindings
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Documentation/devicetree/bindings/net/stmmac.txt | 3 | ||||
-rw-r--r-- | drivers/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 1f62623f8c3..060bbf098ef 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
@@ -1,7 +1,8 @@ | |||
1 | * STMicroelectronics 10/100/1000 Ethernet driver (GMAC) | 1 | * STMicroelectronics 10/100/1000 Ethernet driver (GMAC) |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "st,spear600-gmac" | 4 | - compatible: Should be "snps,dwmac-<ip_version>" "snps,dwmac" |
5 | For backwards compatibility: "st,spear600-gmac" is also supported. | ||
5 | - reg: Address and length of the register set for the device | 6 | - reg: Address and length of the register set for the device |
6 | - interrupt-parent: Should be the phandle for the interrupt controller | 7 | - interrupt-parent: Should be the phandle for the interrupt controller |
7 | that services interrupts for this device | 8 | 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 7d36163d0d2..cd01ee7ecef 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, | |||
49 | * are provided. All other properties should be added | 49 | * are provided. All other properties should be added |
50 | * once needed on other platforms. | 50 | * once needed on other platforms. |
51 | */ | 51 | */ |
52 | if (of_device_is_compatible(np, "st,spear600-gmac")) { | 52 | if (of_device_is_compatible(np, "st,spear600-gmac") || |
53 | of_device_is_compatible(np, "snps,dwmac-3.70a") || | ||
54 | of_device_is_compatible(np, "snps,dwmac")) { | ||
53 | plat->has_gmac = 1; | 55 | plat->has_gmac = 1; |
54 | plat->pmt = 1; | 56 | plat->pmt = 1; |
55 | } | 57 | } |
@@ -252,7 +254,9 @@ static const struct dev_pm_ops stmmac_pltfr_pm_ops; | |||
252 | #endif /* CONFIG_PM */ | 254 | #endif /* CONFIG_PM */ |
253 | 255 | ||
254 | static const struct of_device_id stmmac_dt_ids[] = { | 256 | static const struct of_device_id stmmac_dt_ids[] = { |
255 | { .compatible = "st,spear600-gmac", }, | 257 | { .compatible = "st,spear600-gmac"}, |
258 | { .compatible = "snps,dwmac-3.70a"}, | ||
259 | { .compatible = "snps,dwmac"}, | ||
256 | { /* sentinel */ } | 260 | { /* sentinel */ } |
257 | }; | 261 | }; |
258 | MODULE_DEVICE_TABLE(of, stmmac_dt_ids); | 262 | MODULE_DEVICE_TABLE(of, stmmac_dt_ids); |