diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2016-09-19 04:37:22 +0300 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-09-20 22:35:14 +0800 |
commit | 8f39bd1553965f052a9ed84ef7da289b47e96c19 (patch) | |
tree | 873f8d4f6f741631fd808123b131029bdb2cddca /arch/arm | |
parent | 1cecfa48d98f6b07db8ed0cfda6f18ef3c8f9121 (diff) | |
download | linux-stable-8f39bd1553965f052a9ed84ef7da289b47e96c19.tar.gz linux-stable-8f39bd1553965f052a9ed84ef7da289b47e96c19.tar.bz2 linux-stable-8f39bd1553965f052a9ed84ef7da289b47e96c19.zip |
ARM: imx legacy: vpr200: 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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-imx/mach-vpr200.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/arch/arm/mach-imx/mach-vpr200.c b/arch/arm/mach-imx/mach-vpr200.c index 27a8f7e3ec08..5ff154c9a086 100644 --- a/arch/arm/mach-imx/mach-vpr200.c +++ b/arch/arm/mach-imx/mach-vpr200.c @@ -268,6 +268,22 @@ static void __init vpr200_board_init(void) imx35_add_fec(NULL); imx35_add_imx2_wdt(); + + imx35_add_imx_uart0(NULL); + imx35_add_imx_uart2(NULL); + + imx35_add_ipu_core(); + imx35_add_mx3_sdc_fb(&mx3fb_pdata); + + imx35_add_fsl_usb2_udc(&otg_device_pdata); + imx35_add_mxc_ehci_hs(&usb_host_pdata); + + imx35_add_mxc_nand(&vpr200_nand_board_info); + imx35_add_sdhci_esdhc_imx(0, NULL); +} + +static void __init vpr200_late_init(void) +{ imx_add_gpio_keys(&vpr200_gpio_keys_data); platform_add_devices(devices, ARRAY_SIZE(devices)); @@ -282,18 +298,6 @@ static void __init vpr200_board_init(void) else gpio_direction_input(GPIO_PMIC_INT); - imx35_add_imx_uart0(NULL); - imx35_add_imx_uart2(NULL); - - imx35_add_ipu_core(); - imx35_add_mx3_sdc_fb(&mx3fb_pdata); - - imx35_add_fsl_usb2_udc(&otg_device_pdata); - imx35_add_mxc_ehci_hs(&usb_host_pdata); - - imx35_add_mxc_nand(&vpr200_nand_board_info); - imx35_add_sdhci_esdhc_imx(0, NULL); - vpr200_i2c_devices[1].irq = gpio_to_irq(GPIO_PMIC_INT); i2c_register_board_info(0, vpr200_i2c_devices, ARRAY_SIZE(vpr200_i2c_devices)); @@ -313,5 +317,6 @@ MACHINE_START(VPR200, "VPR200") .init_irq = mx35_init_irq, .init_time = vpr200_timer_init, .init_machine = vpr200_board_init, + .init_late = vpr200_late_init, .restart = mxc_restart, MACHINE_END |