diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2016-09-18 21:37:31 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-09-20 10:39:07 -0400 |
commit | 23fe1fd01c1e065907fdcd5cbfd35c02e5a418a2 (patch) | |
tree | 1bfa34ee921a640ca03e7d324bfee30fab534702 | |
parent | f0ebbdc423296934ac284da6baf2267cabab0e43 (diff) |
ARM: imx legacy: pca100: move peripheral initialization to .init_late
The change moves some of peripheral registrations and initializations
(all peripherals dependent on GPIOs) from .init_machine to .init_late
level, this allows to safely shift the shared GPIO controller driver
initialization level after init level of i.MX IOMUXC driver.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r-- | arch/arm/mach-imx/mach-pca100.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index 2d1c50bd8bdf..ed675863655b 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c | |||
@@ -362,12 +362,8 @@ static void __init pca100_init(void) | |||
362 | if (ret) | 362 | if (ret) |
363 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); | 363 | printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); |
364 | 364 | ||
365 | imx27_add_imx_ssi(0, &pca100_ssi_pdata); | ||
366 | |||
367 | imx27_add_imx_uart0(&uart_pdata); | 365 | imx27_add_imx_uart0(&uart_pdata); |
368 | 366 | ||
369 | imx27_add_mxc_mmc(1, &sdhc_pdata); | ||
370 | |||
371 | imx27_add_mxc_nand(&pca100_nand_board_info); | 367 | imx27_add_mxc_nand(&pca100_nand_board_info); |
372 | 368 | ||
373 | /* only the i2c master 1 is used on this CPU card */ | 369 | /* only the i2c master 1 is used on this CPU card */ |
@@ -382,6 +378,19 @@ static void __init pca100_init(void) | |||
382 | ARRAY_SIZE(pca100_spi_board_info)); | 378 | ARRAY_SIZE(pca100_spi_board_info)); |
383 | imx27_add_spi_imx0(&pca100_spi0_data); | 379 | imx27_add_spi_imx0(&pca100_spi0_data); |
384 | 380 | ||
381 | imx27_add_imx_fb(&pca100_fb_data); | ||
382 | |||
383 | imx27_add_fec(NULL); | ||
384 | imx27_add_imx2_wdt(); | ||
385 | imx27_add_mxc_w1(); | ||
386 | } | ||
387 | |||
388 | static void __init pca100_late_init(void) | ||
389 | { | ||
390 | imx27_add_imx_ssi(0, &pca100_ssi_pdata); | ||
391 | |||
392 | imx27_add_mxc_mmc(1, &sdhc_pdata); | ||
393 | |||
385 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); | 394 | gpio_request(OTG_PHY_CS_GPIO, "usb-otg-cs"); |
386 | gpio_direction_output(OTG_PHY_CS_GPIO, 1); | 395 | gpio_direction_output(OTG_PHY_CS_GPIO, 1); |
387 | gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs"); | 396 | gpio_request(USBH2_PHY_CS_GPIO, "usb-host2-cs"); |
@@ -403,12 +412,6 @@ static void __init pca100_init(void) | |||
403 | 412 | ||
404 | if (usbh2_pdata.otg) | 413 | if (usbh2_pdata.otg) |
405 | imx27_add_mxc_ehci_hs(2, &usbh2_pdata); | 414 | imx27_add_mxc_ehci_hs(2, &usbh2_pdata); |
406 | |||
407 | imx27_add_imx_fb(&pca100_fb_data); | ||
408 | |||
409 | imx27_add_fec(NULL); | ||
410 | imx27_add_imx2_wdt(); | ||
411 | imx27_add_mxc_w1(); | ||
412 | } | 415 | } |
413 | 416 | ||
414 | static void __init pca100_timer_init(void) | 417 | static void __init pca100_timer_init(void) |
@@ -421,7 +424,8 @@ MACHINE_START(PCA100, "phyCARD-i.MX27") | |||
421 | .map_io = mx27_map_io, | 424 | .map_io = mx27_map_io, |
422 | .init_early = imx27_init_early, | 425 | .init_early = imx27_init_early, |
423 | .init_irq = mx27_init_irq, | 426 | .init_irq = mx27_init_irq, |
424 | .init_machine = pca100_init, | 427 | .init_machine = pca100_init, |
428 | .init_late = pca100_late_init, | ||
425 | .init_time = pca100_timer_init, | 429 | .init_time = pca100_timer_init, |
426 | .restart = mxc_restart, | 430 | .restart = mxc_restart, |
427 | MACHINE_END | 431 | MACHINE_END |