aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-pcm043.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-mx3/mach-pcm043.c')
-rw-r--r--arch/arm/mach-mx3/mach-pcm043.c54
1 files changed, 28 insertions, 26 deletions
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index bcf83fc7e701..b3ecfb22d241 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -115,7 +115,6 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
115 .flags = IMXUART_HAVE_RTSCTS, 115 .flags = IMXUART_HAVE_RTSCTS,
116}; 116};
117 117
118#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
119static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = { 118static const struct imxi2c_platform_data pcm043_i2c0_data __initconst = {
120 .bitrate = 50000, 119 .bitrate = 50000,
121}; 120};
@@ -134,7 +133,6 @@ static struct i2c_board_info pcm043_i2c_devices[] = {
134 I2C_BOARD_INFO("pcf8563", 0x51), 133 I2C_BOARD_INFO("pcf8563", 0x51),
135 } 134 }
136}; 135};
137#endif
138 136
139static struct platform_device *devices[] __initdata = { 137static struct platform_device *devices[] __initdata = {
140 &pcm043_flash, 138 &pcm043_flash,
@@ -221,9 +219,9 @@ static iomux_v3_cfg_t pcm043_pads[] = {
221 MX35_PAD_SD1_DATA3__ESDHC1_DAT3, 219 MX35_PAD_SD1_DATA3__ESDHC1_DAT3,
222}; 220};
223 221
224#define AC97_GPIO_TXFS (1 * 32 + 31) 222#define AC97_GPIO_TXFS IMX_GPIO_NR(2, 31)
225#define AC97_GPIO_TXD (1 * 32 + 28) 223#define AC97_GPIO_TXD IMX_GPIO_NR(2, 28)
226#define AC97_GPIO_RESET (1 * 32 + 0) 224#define AC97_GPIO_RESET IMX_GPIO_NR(2, 0)
227 225
228static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) 226static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97)
229{ 227{
@@ -307,18 +305,26 @@ pcm037_nand_board_info __initconst = {
307 .hw_ecc = 1, 305 .hw_ecc = 1,
308}; 306};
309 307
310#if defined(CONFIG_USB_ULPI) 308static int pcm043_otg_init(struct platform_device *pdev)
309{
310 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_DIFF_UNI);
311}
312
311static struct mxc_usbh_platform_data otg_pdata __initdata = { 313static struct mxc_usbh_platform_data otg_pdata __initdata = {
314 .init = pcm043_otg_init,
312 .portsc = MXC_EHCI_MODE_UTMI, 315 .portsc = MXC_EHCI_MODE_UTMI,
313 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
314}; 316};
315 317
318static int pcm043_usbh1_init(struct platform_device *pdev)
319{
320 return mx35_initialize_usb_hw(pdev->id, MXC_EHCI_INTERFACE_SINGLE_UNI |
321 MXC_EHCI_INTERNAL_PHY | MXC_EHCI_IPPUE_DOWN);
322}
323
316static const struct mxc_usbh_platform_data usbh1_pdata __initconst = { 324static const struct mxc_usbh_platform_data usbh1_pdata __initconst = {
325 .init = pcm043_usbh1_init,
317 .portsc = MXC_EHCI_MODE_SERIAL, 326 .portsc = MXC_EHCI_MODE_SERIAL,
318 .flags = MXC_EHCI_INTERFACE_SINGLE_UNI | MXC_EHCI_INTERNAL_PHY |
319 MXC_EHCI_IPPUE_DOWN,
320}; 327};
321#endif
322 328
323static const struct fsl_usb2_platform_data otg_device_pdata __initconst = { 329static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
324 .operating_mode = FSL_USB2_DR_DEVICE, 330 .operating_mode = FSL_USB2_DR_DEVICE,
@@ -343,7 +349,7 @@ __setup("otg_mode=", pcm043_otg_mode);
343/* 349/*
344 * Board specific initialization. 350 * Board specific initialization.
345 */ 351 */
346static void __init mxc_board_init(void) 352static void __init pcm043_init(void)
347{ 353{
348 mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); 354 mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
349 355
@@ -369,26 +375,22 @@ static void __init mxc_board_init(void)
369 375
370 imx35_add_imx_uart1(&uart_pdata); 376 imx35_add_imx_uart1(&uart_pdata);
371 377
372#if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE
373 i2c_register_board_info(0, pcm043_i2c_devices, 378 i2c_register_board_info(0, pcm043_i2c_devices,
374 ARRAY_SIZE(pcm043_i2c_devices)); 379 ARRAY_SIZE(pcm043_i2c_devices));
375 380
376 imx35_add_imx_i2c0(&pcm043_i2c0_data); 381 imx35_add_imx_i2c0(&pcm043_i2c0_data);
377#endif
378 382
379 mxc_register_device(&mx3_ipu, &mx3_ipu_data); 383 mxc_register_device(&mx3_ipu, &mx3_ipu_data);
380 mxc_register_device(&mx3_fb, &mx3fb_pdata); 384 mxc_register_device(&mx3_fb, &mx3fb_pdata);
381 385
382#if defined(CONFIG_USB_ULPI)
383 if (otg_mode_host) { 386 if (otg_mode_host) {
384 otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 387 otg_pdata.otg = imx_otg_ulpi_create(ULPI_OTG_DRVVBUS |
385 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 388 ULPI_OTG_DRVVBUS_EXT);
386 389 if (otg_pdata.otg)
387 imx35_add_mxc_ehci_otg(&otg_pdata); 390 imx35_add_mxc_ehci_otg(&otg_pdata);
388 } 391 }
389
390 imx35_add_mxc_ehci_hs(&usbh1_pdata); 392 imx35_add_mxc_ehci_hs(&usbh1_pdata);
391#endif 393
392 if (!otg_mode_host) 394 if (!otg_mode_host)
393 imx35_add_fsl_usb2_udc(&otg_device_pdata); 395 imx35_add_fsl_usb2_udc(&otg_device_pdata);
394 396
@@ -407,10 +409,10 @@ struct sys_timer pcm043_timer = {
407 409
408MACHINE_START(PCM043, "Phytec Phycore pcm043") 410MACHINE_START(PCM043, "Phytec Phycore pcm043")
409 /* Maintainer: Pengutronix */ 411 /* Maintainer: Pengutronix */
410 .boot_params = MX3x_PHYS_OFFSET + 0x100, 412 .boot_params = MX3x_PHYS_OFFSET + 0x100,
411 .map_io = mx35_map_io, 413 .map_io = mx35_map_io,
412 .init_irq = mx35_init_irq, 414 .init_early = imx35_init_early,
413 .init_machine = mxc_board_init, 415 .init_irq = mx35_init_irq,
414 .timer = &pcm043_timer, 416 .timer = &pcm043_timer,
417 .init_machine = pcm043_init,
415MACHINE_END 418MACHINE_END
416