Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f39bd15 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Shawn Guo
Browse files

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: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 1cecfa48
Loading
Loading
Loading
Loading
+17 −12
Original line number Diff line number Diff line
@@ -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