diff options
Diffstat (limited to 'arch/m68k/platform/coldfire/device.c')
-rw-r--r-- | arch/m68k/platform/coldfire/device.c | 57 |
1 files changed, 54 insertions, 3 deletions
diff --git a/arch/m68k/platform/coldfire/device.c b/arch/m68k/platform/coldfire/device.c index 3aa77ddea89d..81f0fb5e51cf 100644 --- a/arch/m68k/platform/coldfire/device.c +++ b/arch/m68k/platform/coldfire/device.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/spi/spi.h> | 14 | #include <linux/spi/spi.h> |
15 | #include <linux/gpio.h> | 15 | #include <linux/gpio.h> |
16 | #include <linux/fec.h> | ||
16 | #include <asm/traps.h> | 17 | #include <asm/traps.h> |
17 | #include <asm/coldfire.h> | 18 | #include <asm/coldfire.h> |
18 | #include <asm/mcfsim.h> | 19 | #include <asm/mcfsim.h> |
@@ -20,7 +21,7 @@ | |||
20 | #include <asm/mcfqspi.h> | 21 | #include <asm/mcfqspi.h> |
21 | 22 | ||
22 | /* | 23 | /* |
23 | * All current ColdFire parts contain from 2, 3 or 4 UARTS. | 24 | * All current ColdFire parts contain from 2, 3, 4 or 10 UARTS. |
24 | */ | 25 | */ |
25 | static struct mcf_platform_uart mcf_uart_platform_data[] = { | 26 | static struct mcf_platform_uart mcf_uart_platform_data[] = { |
26 | { | 27 | { |
@@ -43,6 +44,42 @@ static struct mcf_platform_uart mcf_uart_platform_data[] = { | |||
43 | .irq = MCF_IRQ_UART3, | 44 | .irq = MCF_IRQ_UART3, |
44 | }, | 45 | }, |
45 | #endif | 46 | #endif |
47 | #ifdef MCFUART_BASE4 | ||
48 | { | ||
49 | .mapbase = MCFUART_BASE4, | ||
50 | .irq = MCF_IRQ_UART4, | ||
51 | }, | ||
52 | #endif | ||
53 | #ifdef MCFUART_BASE5 | ||
54 | { | ||
55 | .mapbase = MCFUART_BASE5, | ||
56 | .irq = MCF_IRQ_UART5, | ||
57 | }, | ||
58 | #endif | ||
59 | #ifdef MCFUART_BASE6 | ||
60 | { | ||
61 | .mapbase = MCFUART_BASE6, | ||
62 | .irq = MCF_IRQ_UART6, | ||
63 | }, | ||
64 | #endif | ||
65 | #ifdef MCFUART_BASE7 | ||
66 | { | ||
67 | .mapbase = MCFUART_BASE7, | ||
68 | .irq = MCF_IRQ_UART7, | ||
69 | }, | ||
70 | #endif | ||
71 | #ifdef MCFUART_BASE8 | ||
72 | { | ||
73 | .mapbase = MCFUART_BASE8, | ||
74 | .irq = MCF_IRQ_UART8, | ||
75 | }, | ||
76 | #endif | ||
77 | #ifdef MCFUART_BASE9 | ||
78 | { | ||
79 | .mapbase = MCFUART_BASE9, | ||
80 | .irq = MCF_IRQ_UART9, | ||
81 | }, | ||
82 | #endif | ||
46 | { }, | 83 | { }, |
47 | }; | 84 | }; |
48 | 85 | ||
@@ -53,6 +90,18 @@ static struct platform_device mcf_uart = { | |||
53 | }; | 90 | }; |
54 | 91 | ||
55 | #ifdef CONFIG_FEC | 92 | #ifdef CONFIG_FEC |
93 | |||
94 | #ifdef CONFIG_M5441x | ||
95 | #define FEC_NAME "enet-fec" | ||
96 | static struct fec_platform_data fec_pdata = { | ||
97 | .phy = PHY_INTERFACE_MODE_RMII, | ||
98 | }; | ||
99 | #define FEC_PDATA (&fec_pdata) | ||
100 | #else | ||
101 | #define FEC_NAME "fec" | ||
102 | #define FEC_PDATA NULL | ||
103 | #endif | ||
104 | |||
56 | /* | 105 | /* |
57 | * Some ColdFire cores contain the Fast Ethernet Controller (FEC) | 106 | * Some ColdFire cores contain the Fast Ethernet Controller (FEC) |
58 | * block. It is Freescale's own hardware block. Some ColdFires | 107 | * block. It is Freescale's own hardware block. Some ColdFires |
@@ -82,10 +131,11 @@ static struct resource mcf_fec0_resources[] = { | |||
82 | }; | 131 | }; |
83 | 132 | ||
84 | static struct platform_device mcf_fec0 = { | 133 | static struct platform_device mcf_fec0 = { |
85 | .name = "fec", | 134 | .name = FEC_NAME, |
86 | .id = 0, | 135 | .id = 0, |
87 | .num_resources = ARRAY_SIZE(mcf_fec0_resources), | 136 | .num_resources = ARRAY_SIZE(mcf_fec0_resources), |
88 | .resource = mcf_fec0_resources, | 137 | .resource = mcf_fec0_resources, |
138 | .dev.platform_data = FEC_PDATA, | ||
89 | }; | 139 | }; |
90 | 140 | ||
91 | #ifdef MCFFEC_BASE1 | 141 | #ifdef MCFFEC_BASE1 |
@@ -113,10 +163,11 @@ static struct resource mcf_fec1_resources[] = { | |||
113 | }; | 163 | }; |
114 | 164 | ||
115 | static struct platform_device mcf_fec1 = { | 165 | static struct platform_device mcf_fec1 = { |
116 | .name = "fec", | 166 | .name = FEC_NAME, |
117 | .id = 1, | 167 | .id = 1, |
118 | .num_resources = ARRAY_SIZE(mcf_fec1_resources), | 168 | .num_resources = ARRAY_SIZE(mcf_fec1_resources), |
119 | .resource = mcf_fec1_resources, | 169 | .resource = mcf_fec1_resources, |
170 | .dev.platform_data = FEC_PDATA, | ||
120 | }; | 171 | }; |
121 | #endif /* MCFFEC_BASE1 */ | 172 | #endif /* MCFFEC_BASE1 */ |
122 | #endif /* CONFIG_FEC */ | 173 | #endif /* CONFIG_FEC */ |