Commit 4bc2e627 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Shawn Guo

ARM: imx legacy: kzm: 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.

The change is tested on qemu kzm target.
Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 29b4817d
...@@ -245,13 +245,17 @@ static void __init kzm_board_init(void) ...@@ -245,13 +245,17 @@ static void __init kzm_board_init(void)
mxc_iomux_setup_multiple_pins(kzm_pins, mxc_iomux_setup_multiple_pins(kzm_pins,
ARRAY_SIZE(kzm_pins), "kzm"); ARRAY_SIZE(kzm_pins), "kzm");
kzm_init_ext_uart();
kzm_init_smsc9118();
kzm_init_imx_uart(); kzm_init_imx_uart();
pr_info("Clock input source is 26MHz\n"); pr_info("Clock input source is 26MHz\n");
} }
static void __init kzm_late_init(void)
{
kzm_init_ext_uart();
kzm_init_smsc9118();
}
/* /*
* This structure defines static mappings for the kzm-arm11-01 board. * This structure defines static mappings for the kzm-arm11-01 board.
*/ */
...@@ -291,5 +295,6 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01") ...@@ -291,5 +295,6 @@ MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
.init_irq = mx31_init_irq, .init_irq = mx31_init_irq,
.init_time = kzm_timer_init, .init_time = kzm_timer_init,
.init_machine = kzm_board_init, .init_machine = kzm_board_init,
.init_late = kzm_late_init,
.restart = mxc_restart, .restart = mxc_restart,
MACHINE_END MACHINE_END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment