diff options
Diffstat (limited to 'arch/arm/mach-mx3/mach-pcm043.c')
-rw-r--r-- | arch/arm/mach-mx3/mach-pcm043.c | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c index 4e1de87995d4..bcf83fc7e701 100644 --- a/arch/arm/mach-mx3/mach-pcm043.c +++ b/arch/arm/mach-mx3/mach-pcm043.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/i2c/at24.h> | 27 | #include <linux/i2c/at24.h> |
28 | #include <linux/usb/otg.h> | 28 | #include <linux/usb/otg.h> |
29 | #include <linux/usb/ulpi.h> | 29 | #include <linux/usb/ulpi.h> |
30 | #include <linux/fsl_devices.h> | ||
31 | 30 | ||
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -39,7 +38,6 @@ | |||
39 | #include <mach/iomux-mx35.h> | 38 | #include <mach/iomux-mx35.h> |
40 | #include <mach/ipu.h> | 39 | #include <mach/ipu.h> |
41 | #include <mach/mx3fb.h> | 40 | #include <mach/mx3fb.h> |
42 | #include <mach/mxc_ehci.h> | ||
43 | #include <mach/ulpi.h> | 41 | #include <mach/ulpi.h> |
44 | #include <mach/audmux.h> | 42 | #include <mach/audmux.h> |
45 | 43 | ||
@@ -140,10 +138,9 @@ static struct i2c_board_info pcm043_i2c_devices[] = { | |||
140 | 138 | ||
141 | static struct platform_device *devices[] __initdata = { | 139 | static struct platform_device *devices[] __initdata = { |
142 | &pcm043_flash, | 140 | &pcm043_flash, |
143 | &imx_wdt_device0, | ||
144 | }; | 141 | }; |
145 | 142 | ||
146 | static struct pad_desc pcm043_pads[] = { | 143 | static iomux_v3_cfg_t pcm043_pads[] = { |
147 | /* UART1 */ | 144 | /* UART1 */ |
148 | MX35_PAD_CTS1__UART1_CTS, | 145 | MX35_PAD_CTS1__UART1_CTS, |
149 | MX35_PAD_RTS1__UART1_RTS, | 146 | MX35_PAD_RTS1__UART1_RTS, |
@@ -230,8 +227,8 @@ static struct pad_desc pcm043_pads[] = { | |||
230 | 227 | ||
231 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | 228 | static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) |
232 | { | 229 | { |
233 | struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; | 230 | iomux_v3_cfg_t txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; |
234 | struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; | 231 | iomux_v3_cfg_t txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; |
235 | int ret; | 232 | int ret; |
236 | 233 | ||
237 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); | 234 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); |
@@ -240,7 +237,7 @@ static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | |||
240 | return; | 237 | return; |
241 | } | 238 | } |
242 | 239 | ||
243 | mxc_iomux_v3_setup_pad(&txfs_gpio); | 240 | mxc_iomux_v3_setup_pad(txfs_gpio); |
244 | 241 | ||
245 | /* warm reset */ | 242 | /* warm reset */ |
246 | gpio_direction_output(AC97_GPIO_TXFS, 1); | 243 | gpio_direction_output(AC97_GPIO_TXFS, 1); |
@@ -248,16 +245,16 @@ static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) | |||
248 | gpio_set_value(AC97_GPIO_TXFS, 0); | 245 | gpio_set_value(AC97_GPIO_TXFS, 0); |
249 | 246 | ||
250 | gpio_free(AC97_GPIO_TXFS); | 247 | gpio_free(AC97_GPIO_TXFS); |
251 | mxc_iomux_v3_setup_pad(&txfs); | 248 | mxc_iomux_v3_setup_pad(txfs); |
252 | } | 249 | } |
253 | 250 | ||
254 | static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | 251 | static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) |
255 | { | 252 | { |
256 | struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; | 253 | iomux_v3_cfg_t txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; |
257 | struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; | 254 | iomux_v3_cfg_t txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; |
258 | struct pad_desc txd_gpio = MX35_PAD_STXD4__GPIO2_28; | 255 | iomux_v3_cfg_t txd_gpio = MX35_PAD_STXD4__GPIO2_28; |
259 | struct pad_desc txd = MX35_PAD_STXD4__AUDMUX_AUD4_TXD; | 256 | iomux_v3_cfg_t txd = MX35_PAD_STXD4__AUDMUX_AUD4_TXD; |
260 | struct pad_desc reset_gpio = MX35_PAD_SD2_CMD__GPIO2_0; | 257 | iomux_v3_cfg_t reset_gpio = MX35_PAD_SD2_CMD__GPIO2_0; |
261 | int ret; | 258 | int ret; |
262 | 259 | ||
263 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); | 260 | ret = gpio_request(AC97_GPIO_TXFS, "SSI"); |
@@ -272,9 +269,9 @@ static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | |||
272 | if (ret) | 269 | if (ret) |
273 | goto err3; | 270 | goto err3; |
274 | 271 | ||
275 | mxc_iomux_v3_setup_pad(&txfs_gpio); | 272 | mxc_iomux_v3_setup_pad(txfs_gpio); |
276 | mxc_iomux_v3_setup_pad(&txd_gpio); | 273 | mxc_iomux_v3_setup_pad(txd_gpio); |
277 | mxc_iomux_v3_setup_pad(&reset_gpio); | 274 | mxc_iomux_v3_setup_pad(reset_gpio); |
278 | 275 | ||
279 | gpio_direction_output(AC97_GPIO_TXFS, 0); | 276 | gpio_direction_output(AC97_GPIO_TXFS, 0); |
280 | gpio_direction_output(AC97_GPIO_TXD, 0); | 277 | gpio_direction_output(AC97_GPIO_TXD, 0); |
@@ -284,8 +281,8 @@ static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) | |||
284 | udelay(10); | 281 | udelay(10); |
285 | gpio_direction_output(AC97_GPIO_RESET, 1); | 282 | gpio_direction_output(AC97_GPIO_RESET, 1); |
286 | 283 | ||
287 | mxc_iomux_v3_setup_pad(&txd); | 284 | mxc_iomux_v3_setup_pad(txd); |
288 | mxc_iomux_v3_setup_pad(&txfs); | 285 | mxc_iomux_v3_setup_pad(txfs); |
289 | 286 | ||
290 | gpio_free(AC97_GPIO_RESET); | 287 | gpio_free(AC97_GPIO_RESET); |
291 | err3: | 288 | err3: |
@@ -311,19 +308,19 @@ pcm037_nand_board_info __initconst = { | |||
311 | }; | 308 | }; |
312 | 309 | ||
313 | #if defined(CONFIG_USB_ULPI) | 310 | #if defined(CONFIG_USB_ULPI) |
314 | static struct mxc_usbh_platform_data otg_pdata = { | 311 | static struct mxc_usbh_platform_data otg_pdata __initdata = { |
315 | .portsc = MXC_EHCI_MODE_UTMI, | 312 | .portsc = MXC_EHCI_MODE_UTMI, |
316 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, | 313 | .flags = MXC_EHCI_INTERFACE_DIFF_UNI, |
317 | }; | 314 | }; |
318 | 315 | ||
319 | static struct mxc_usbh_platform_data usbh1_pdata = { | 316 | static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { |
320 | .portsc = MXC_EHCI_MODE_SERIAL, | 317 | .portsc = MXC_EHCI_MODE_SERIAL, |
321 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | | 318 | .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY | |
322 | MXC_EHCI_IPPUE_DOWN, | 319 | MXC_EHCI_IPPUE_DOWN, |
323 | }; | 320 | }; |
324 | #endif | 321 | #endif |
325 | 322 | ||
326 | static struct fsl_usb2_platform_data otg_device_pdata = { | 323 | static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { |
327 | .operating_mode = FSL_USB2_DR_DEVICE, | 324 | .operating_mode = FSL_USB2_DR_DEVICE, |
328 | .phy_mode = FSL_USB2_PHY_UTMI, | 325 | .phy_mode = FSL_USB2_PHY_UTMI, |
329 | }; | 326 | }; |
@@ -364,6 +361,7 @@ static void __init mxc_board_init(void) | |||
364 | 361 | ||
365 | imx35_add_fec(NULL); | 362 | imx35_add_fec(NULL); |
366 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 363 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
364 | imx35_add_imx2_wdt(NULL); | ||
367 | 365 | ||
368 | imx35_add_imx_uart0(&uart_pdata); | 366 | imx35_add_imx_uart0(&uart_pdata); |
369 | imx35_add_mxc_nand(&pcm037_nand_board_info); | 367 | imx35_add_mxc_nand(&pcm037_nand_board_info); |
@@ -386,16 +384,16 @@ static void __init mxc_board_init(void) | |||
386 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, | 384 | otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, |
387 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); | 385 | ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); |
388 | 386 | ||
389 | mxc_register_device(&mxc_otg_host, &otg_pdata); | 387 | imx35_add_mxc_ehci_otg(&otg_pdata); |
390 | } | 388 | } |
391 | 389 | ||
392 | mxc_register_device(&mxc_usbh1, &usbh1_pdata); | 390 | imx35_add_mxc_ehci_hs(&usbh1_pdata); |
393 | #endif | 391 | #endif |
394 | if (!otg_mode_host) | 392 | if (!otg_mode_host) |
395 | mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); | 393 | imx35_add_fsl_usb2_udc(&otg_device_pdata); |
396 | 394 | ||
397 | imx35_add_flexcan1(NULL); | 395 | imx35_add_flexcan1(NULL); |
398 | imx35_add_esdhc(0, NULL); | 396 | imx35_add_sdhci_esdhc_imx(0, NULL); |
399 | } | 397 | } |
400 | 398 | ||
401 | static void __init pcm043_timer_init(void) | 399 | static void __init pcm043_timer_init(void) |