aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-mxc/devices
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-07-01 06:11:22 -0400
committerShawn Guo <shawn.guo@linaro.org>2011-07-26 21:30:50 -0400
commit0ca1e290b7c517300bf6cc4f14ebcedb5dfea5cc (patch)
treed66e2af8bd869ed6be022419354d2e6def93adc5 /arch/arm/plat-mxc/devices
parent22698aa252e5e10f5b6d171bf82669deeab3bee1 (diff)
net/fec: gasket needs to be enabled for some i.mx
On the recent i.mx (mx25/50/53), there is a gasket inside fec controller which needs to be enabled no matter phy works in MII or RMII mode. The current code enables the gasket only when phy interface is RMII. It's broken when the driver works with a MII phy. The patch uses platform_device_id to distinguish the SoCs that have the gasket and enables it on these SoCs for both MII and RMII mode. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reported-by: Troy Kisky <troy.kisky@boundarydevices.com> Cc: David S. Miller <davem@davemloft.net> Cc: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/arm/plat-mxc/devices')
-rw-r--r--arch/arm/plat-mxc/devices/platform-fec.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/arm/plat-mxc/devices/platform-fec.c b/arch/arm/plat-mxc/devices/platform-fec.c
index 4fc6ffc2a13e..0bae44e890db 100644
--- a/arch/arm/plat-mxc/devices/platform-fec.c
+++ b/arch/arm/plat-mxc/devices/platform-fec.c
@@ -11,40 +11,45 @@
11#include <mach/hardware.h> 11#include <mach/hardware.h>
12#include <mach/devices-common.h> 12#include <mach/devices-common.h>
13 13
14#define imx_fec_data_entry_single(soc) \ 14#define imx_fec_data_entry_single(soc, _devid) \
15 { \ 15 { \
16 .devid = _devid, \
16 .iobase = soc ## _FEC_BASE_ADDR, \ 17 .iobase = soc ## _FEC_BASE_ADDR, \
17 .irq = soc ## _INT_FEC, \ 18 .irq = soc ## _INT_FEC, \
18 } 19 }
19 20
20#ifdef CONFIG_SOC_IMX25 21#ifdef CONFIG_SOC_IMX25
21const struct imx_fec_data imx25_fec_data __initconst = 22const struct imx_fec_data imx25_fec_data __initconst =
22 imx_fec_data_entry_single(MX25); 23 imx_fec_data_entry_single(MX25, "imx25-fec");
23#endif /* ifdef CONFIG_SOC_IMX25 */ 24#endif /* ifdef CONFIG_SOC_IMX25 */
24 25
25#ifdef CONFIG_SOC_IMX27 26#ifdef CONFIG_SOC_IMX27
26const struct imx_fec_data imx27_fec_data __initconst = 27const struct imx_fec_data imx27_fec_data __initconst =
27 imx_fec_data_entry_single(MX27); 28 imx_fec_data_entry_single(MX27, "imx27-fec");
28#endif /* ifdef CONFIG_SOC_IMX27 */ 29#endif /* ifdef CONFIG_SOC_IMX27 */
29 30
30#ifdef CONFIG_SOC_IMX35 31#ifdef CONFIG_SOC_IMX35
32/* i.mx35 has the i.mx27 type fec */
31const struct imx_fec_data imx35_fec_data __initconst = 33const struct imx_fec_data imx35_fec_data __initconst =
32 imx_fec_data_entry_single(MX35); 34 imx_fec_data_entry_single(MX35, "imx27-fec");
33#endif 35#endif
34 36
35#ifdef CONFIG_SOC_IMX50 37#ifdef CONFIG_SOC_IMX50
38/* i.mx50 has the i.mx25 type fec */
36const struct imx_fec_data imx50_fec_data __initconst = 39const struct imx_fec_data imx50_fec_data __initconst =
37 imx_fec_data_entry_single(MX50); 40 imx_fec_data_entry_single(MX50, "imx25-fec");
38#endif 41#endif
39 42
40#ifdef CONFIG_SOC_IMX51 43#ifdef CONFIG_SOC_IMX51
44/* i.mx51 has the i.mx27 type fec */
41const struct imx_fec_data imx51_fec_data __initconst = 45const struct imx_fec_data imx51_fec_data __initconst =
42 imx_fec_data_entry_single(MX51); 46 imx_fec_data_entry_single(MX51, "imx27-fec");
43#endif 47#endif
44 48
45#ifdef CONFIG_SOC_IMX53 49#ifdef CONFIG_SOC_IMX53
50/* i.mx53 has the i.mx25 type fec */
46const struct imx_fec_data imx53_fec_data __initconst = 51const struct imx_fec_data imx53_fec_data __initconst =
47 imx_fec_data_entry_single(MX53); 52 imx_fec_data_entry_single(MX53, "imx25-fec");
48#endif 53#endif
49 54
50struct platform_device *__init imx_add_fec( 55struct platform_device *__init imx_add_fec(
@@ -63,7 +68,7 @@ struct platform_device *__init imx_add_fec(
63 }, 68 },
64 }; 69 };
65 70
66 return imx_add_platform_device_dmamask("fec", 0, 71 return imx_add_platform_device_dmamask(data->devid, 0,
67 res, ARRAY_SIZE(res), 72 res, ARRAY_SIZE(res),
68 pdata, sizeof(*pdata), DMA_BIT_MASK(32)); 73 pdata, sizeof(*pdata), DMA_BIT_MASK(32));
69} 74}