aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/mach-pca100.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/mach-pca100.c')
-rw-r--r--arch/arm/mach-imx/mach-pca100.c33
1 files changed, 12 insertions, 21 deletions
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c
index 8c720d44602a..cccc0a0a9c72 100644
--- a/arch/arm/mach-imx/mach-pca100.c
+++ b/arch/arm/mach-imx/mach-pca100.c
@@ -29,7 +29,6 @@
29#include <linux/gpio.h> 29#include <linux/gpio.h>
30#include <linux/usb/otg.h> 30#include <linux/usb/otg.h>
31#include <linux/usb/ulpi.h> 31#include <linux/usb/ulpi.h>
32#include <linux/fsl_devices.h>
33 32
34#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
35#include <asm/mach-types.h> 34#include <asm/mach-types.h>
@@ -40,13 +39,9 @@
40#include <mach/audmux.h> 39#include <mach/audmux.h>
41#include <mach/mxc_nand.h> 40#include <mach/mxc_nand.h>
42#include <mach/irqs.h> 41#include <mach/irqs.h>
43#include <mach/mmc.h>
44#include <mach/mxc_ehci.h>
45#include <mach/ulpi.h> 42#include <mach/ulpi.h>
46#include <mach/imxfb.h>
47 43
48#include "devices-imx27.h" 44#include "devices-imx27.h"
49#include "devices.h"
50 45
51#define OTG_PHY_CS_GPIO (GPIO_PORTB + 23) 46#define OTG_PHY_CS_GPIO (GPIO_PORTB + 23)
52#define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24) 47#define USBH2_PHY_CS_GPIO (GPIO_PORTB + 24)
@@ -171,11 +166,6 @@ pca100_nand_board_info __initconst = {
171 .hw_ecc = 1, 166 .hw_ecc = 1,
172}; 167};
173 168
174static struct platform_device *platform_devices[] __initdata = {
175 &mxc_w1_master_device,
176 &mxc_wdt,
177};
178
179static const struct imxi2c_platform_data pca100_i2c1_data __initconst = { 169static const struct imxi2c_platform_data pca100_i2c1_data __initconst = {
180 .bitrate = 100000, 170 .bitrate = 100000,
181}; 171};
@@ -274,7 +264,7 @@ static void pca100_sdhc2_exit(struct device *dev, void *data)
274 free_irq(IRQ_GPIOC(29), data); 264 free_irq(IRQ_GPIOC(29), data);
275} 265}
276 266
277static struct imxmmc_platform_data sdhc_pdata = { 267static const struct imxmmc_platform_data sdhc_pdata __initconst = {
278 .init = pca100_sdhc2_init, 268 .init = pca100_sdhc2_init,
279 .exit = pca100_sdhc2_exit, 269 .exit = pca100_sdhc2_exit,
280}; 270};
@@ -286,7 +276,7 @@ static int otg_phy_init(struct platform_device *pdev)
286 return 0; 276 return 0;
287} 277}
288 278
289static struct mxc_usbh_platform_data otg_pdata = { 279static struct mxc_usbh_platform_data otg_pdata __initdata = {
290 .init = otg_phy_init, 280 .init = otg_phy_init,
291 .portsc = MXC_EHCI_MODE_ULPI, 281 .portsc = MXC_EHCI_MODE_ULPI,
292 .flags = MXC_EHCI_INTERFACE_DIFF_UNI, 282 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
@@ -298,14 +288,14 @@ static int usbh2_phy_init(struct platform_device *pdev)
298 return 0; 288 return 0;
299} 289}
300 290
301static struct mxc_usbh_platform_data usbh2_pdata = { 291static struct mxc_usbh_platform_data usbh2_pdata __initdata = {
302 .init = usbh2_phy_init, 292 .init = usbh2_phy_init,
303 .portsc = MXC_EHCI_MODE_ULPI, 293 .portsc = MXC_EHCI_MODE_ULPI,
304 .flags = MXC_EHCI_INTERFACE_DIFF_UNI, 294 .flags = MXC_EHCI_INTERFACE_DIFF_UNI,
305}; 295};
306#endif 296#endif
307 297
308static struct fsl_usb2_platform_data otg_device_pdata = { 298static const struct fsl_usb2_platform_data otg_device_pdata __initconst = {
309 .operating_mode = FSL_USB2_DR_DEVICE, 299 .operating_mode = FSL_USB2_DR_DEVICE,
310 .phy_mode = FSL_USB2_PHY_ULPI, 300 .phy_mode = FSL_USB2_PHY_ULPI,
311}; 301};
@@ -355,7 +345,7 @@ static struct imx_fb_videomode pca100_fb_modes[] = {
355 }, 345 },
356}; 346};
357 347
358static struct imx_fb_platform_data pca100_fb_data = { 348static const struct imx_fb_platform_data pca100_fb_data __initconst = {
359 .mode = pca100_fb_modes, 349 .mode = pca100_fb_modes,
360 .num_modes = ARRAY_SIZE(pca100_fb_modes), 350 .num_modes = ARRAY_SIZE(pca100_fb_modes),
361 351
@@ -389,7 +379,7 @@ static void __init pca100_init(void)
389 379
390 imx27_add_imx_uart0(&uart_pdata); 380 imx27_add_imx_uart0(&uart_pdata);
391 381
392 mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); 382 imx27_add_mxc_mmc(1, &sdhc_pdata);
393 383
394 imx27_add_mxc_nand(&pca100_nand_board_info); 384 imx27_add_mxc_nand(&pca100_nand_board_info);
395 385
@@ -417,23 +407,24 @@ static void __init pca100_init(void)
417 otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 407 otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
418 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 408 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
419 409
420 mxc_register_device(&mxc_otg_host, &otg_pdata); 410 imx27_add_mxc_ehci_otg(&otg_pdata);
421 } 411 }
422 412
423 usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops, 413 usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
424 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT); 414 ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);
425 415
426 mxc_register_device(&mxc_usbh2, &usbh2_pdata); 416 imx27_add_mxc_ehci_hs(2, &usbh2_pdata);
427#endif 417#endif
428 if (!otg_mode_host) { 418 if (!otg_mode_host) {
429 gpio_set_value(OTG_PHY_CS_GPIO, 0); 419 gpio_set_value(OTG_PHY_CS_GPIO, 0);
430 mxc_register_device(&mxc_otg_udc_device, &otg_device_pdata); 420 imx27_add_fsl_usb2_udc(&otg_device_pdata);
431 } 421 }
432 422
433 mxc_register_device(&mxc_fb_device, &pca100_fb_data); 423 imx27_add_imx_fb(&pca100_fb_data);
434 424
435 imx27_add_fec(NULL); 425 imx27_add_fec(NULL);
436 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 426 imx27_add_imx2_wdt(NULL);
427 imx27_add_mxc_w1(NULL);
437} 428}
438 429
439static void __init pca100_timer_init(void) 430static void __init pca100_timer_init(void)