diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-10 08:53:29 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-03-10 08:53:29 -0500 |
commit | 3afdb0f3528991de0833224f2dba60dc061e01fa (patch) | |
tree | 0d9c7529c6cc2b41f0df778cc396edd74699721a /arch/arm/mach-mx5/board-mx50_rdp.c | |
parent | 71d8c5b11e3b5936ae6c2e0b1dd6f5c78b305b65 (diff) | |
parent | f7fdaca910e6bc13659ecdffc28c97938b752e01 (diff) |
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable
Diffstat (limited to 'arch/arm/mach-mx5/board-mx50_rdp.c')
-rw-r--r-- | arch/arm/mach-mx5/board-mx50_rdp.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/arch/arm/mach-mx5/board-mx50_rdp.c b/arch/arm/mach-mx5/board-mx50_rdp.c index fd32e4c450e..dedf7f2d6d0 100644 --- a/arch/arm/mach-mx5/board-mx50_rdp.c +++ b/arch/arm/mach-mx5/board-mx50_rdp.c | |||
@@ -35,7 +35,10 @@ | |||
35 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
36 | #include <asm/mach/time.h> | 36 | #include <asm/mach/time.h> |
37 | 37 | ||
38 | #include "devices-mx50.h" | 38 | #include "devices-imx50.h" |
39 | |||
40 | #define FEC_EN IMX_GPIO_NR(6, 23) | ||
41 | #define FEC_RESET_B IMX_GPIO_NR(4, 12) | ||
39 | 42 | ||
40 | static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | 43 | static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { |
41 | /* SD1 */ | 44 | /* SD1 */ |
@@ -102,7 +105,7 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | |||
102 | MX50_PAD_I2C3_SCL__USBOTG_OC, | 105 | MX50_PAD_I2C3_SCL__USBOTG_OC, |
103 | 106 | ||
104 | MX50_PAD_SSI_RXC__FEC_MDIO, | 107 | MX50_PAD_SSI_RXC__FEC_MDIO, |
105 | MX50_PAD_SSI_RXC__FEC_MDIO, | 108 | MX50_PAD_SSI_RXFS__FEC_MDC, |
106 | MX50_PAD_DISP_D0__FEC_TXCLK, | 109 | MX50_PAD_DISP_D0__FEC_TXCLK, |
107 | MX50_PAD_DISP_D1__FEC_RX_ER, | 110 | MX50_PAD_DISP_D1__FEC_RX_ER, |
108 | MX50_PAD_DISP_D2__FEC_RX_DV, | 111 | MX50_PAD_DISP_D2__FEC_RX_DV, |
@@ -111,7 +114,6 @@ static iomux_v3_cfg_t mx50_rdp_pads[] __initdata = { | |||
111 | MX50_PAD_DISP_D5__FEC_TX_EN, | 114 | MX50_PAD_DISP_D5__FEC_TX_EN, |
112 | MX50_PAD_DISP_D6__FEC_TXD1, | 115 | MX50_PAD_DISP_D6__FEC_TXD1, |
113 | MX50_PAD_DISP_D7__FEC_TXD0, | 116 | MX50_PAD_DISP_D7__FEC_TXD0, |
114 | MX50_PAD_SSI_RXFS__FEC_MDC, | ||
115 | MX50_PAD_I2C3_SDA__GPIO_6_23, | 117 | MX50_PAD_I2C3_SDA__GPIO_6_23, |
116 | MX50_PAD_ECSPI1_SCLK__GPIO_4_12, | 118 | MX50_PAD_ECSPI1_SCLK__GPIO_4_12, |
117 | 119 | ||
@@ -168,6 +170,24 @@ static const struct imxuart_platform_data uart_pdata __initconst = { | |||
168 | .flags = IMXUART_HAVE_RTSCTS, | 170 | .flags = IMXUART_HAVE_RTSCTS, |
169 | }; | 171 | }; |
170 | 172 | ||
173 | static const struct fec_platform_data fec_data __initconst = { | ||
174 | .phy = PHY_INTERFACE_MODE_RMII, | ||
175 | }; | ||
176 | |||
177 | static inline void mx50_rdp_fec_reset(void) | ||
178 | { | ||
179 | gpio_request(FEC_EN, "fec-en"); | ||
180 | gpio_direction_output(FEC_EN, 0); | ||
181 | gpio_request(FEC_RESET_B, "fec-reset_b"); | ||
182 | gpio_direction_output(FEC_RESET_B, 0); | ||
183 | msleep(1); | ||
184 | gpio_set_value(FEC_RESET_B, 1); | ||
185 | } | ||
186 | |||
187 | static const struct imxi2c_platform_data i2c_data __initconst = { | ||
188 | .bitrate = 100000, | ||
189 | }; | ||
190 | |||
171 | /* | 191 | /* |
172 | * Board specific initialization. | 192 | * Board specific initialization. |
173 | */ | 193 | */ |
@@ -178,6 +198,11 @@ static void __init mx50_rdp_board_init(void) | |||
178 | 198 | ||
179 | imx50_add_imx_uart(0, &uart_pdata); | 199 | imx50_add_imx_uart(0, &uart_pdata); |
180 | imx50_add_imx_uart(1, &uart_pdata); | 200 | imx50_add_imx_uart(1, &uart_pdata); |
201 | mx50_rdp_fec_reset(); | ||
202 | imx50_add_fec(&fec_data); | ||
203 | imx50_add_imx_i2c(0, &i2c_data); | ||
204 | imx50_add_imx_i2c(1, &i2c_data); | ||
205 | imx50_add_imx_i2c(2, &i2c_data); | ||
181 | } | 206 | } |
182 | 207 | ||
183 | static void __init mx50_rdp_timer_init(void) | 208 | static void __init mx50_rdp_timer_init(void) |
@@ -191,7 +216,8 @@ static struct sys_timer mx50_rdp_timer = { | |||
191 | 216 | ||
192 | MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") | 217 | MACHINE_START(MX50_RDP, "Freescale MX50 Reference Design Platform") |
193 | .map_io = mx50_map_io, | 218 | .map_io = mx50_map_io, |
219 | .init_early = imx50_init_early, | ||
194 | .init_irq = mx50_init_irq, | 220 | .init_irq = mx50_init_irq, |
195 | .init_machine = mx50_rdp_board_init, | ||
196 | .timer = &mx50_rdp_timer, | 221 | .timer = &mx50_rdp_timer, |
222 | .init_machine = mx50_rdp_board_init, | ||
197 | MACHINE_END | 223 | MACHINE_END |