diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2016-09-18 21:37:25 -0400 |
---|---|---|
committer | Shawn Guo <shawnguo@kernel.org> | 2016-09-20 10:35:23 -0400 |
commit | c217147b9374e68dd5d127b293c63ed5676db172 (patch) | |
tree | 590dedeb89a85974d718a7b74ced5da31d7cee14 | |
parent | 88b074626fe1931ddbfc22c60ef183514a29365b (diff) |
ARM: imx legacy: mx35-3ds: 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-mx35_3ds.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/mach-imx/mach-mx35_3ds.c b/arch/arm/mach-imx/mach-mx35_3ds.c index 7e315f00648d..c8c2e0956048 100644 --- a/arch/arm/mach-imx/mach-mx35_3ds.c +++ b/arch/arm/mach-imx/mach-mx35_3ds.c | |||
@@ -555,8 +555,6 @@ static const struct imxi2c_platform_data mx35_3ds_i2c0_data __initconst = { | |||
555 | */ | 555 | */ |
556 | static void __init mx35_3ds_init(void) | 556 | static void __init mx35_3ds_init(void) |
557 | { | 557 | { |
558 | struct platform_device *imx35_fb_pdev; | ||
559 | |||
560 | imx35_soc_init(); | 558 | imx35_soc_init(); |
561 | 559 | ||
562 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); | 560 | mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads)); |
@@ -579,9 +577,6 @@ static void __init mx35_3ds_init(void) | |||
579 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); | 577 | imx35_add_mxc_nand(&mx35pdk_nand_board_info); |
580 | imx35_add_sdhci_esdhc_imx(0, NULL); | 578 | imx35_add_sdhci_esdhc_imx(0, NULL); |
581 | 579 | ||
582 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1))) | ||
583 | pr_warn("Init of the debugboard failed, all " | ||
584 | "devices on the debugboard are unusable.\n"); | ||
585 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); | 580 | imx35_add_imx_i2c0(&mx35_3ds_i2c0_data); |
586 | 581 | ||
587 | i2c_register_board_info( | 582 | i2c_register_board_info( |
@@ -590,6 +585,15 @@ static void __init mx35_3ds_init(void) | |||
590 | imx35_add_ipu_core(); | 585 | imx35_add_ipu_core(); |
591 | platform_device_register(&mx35_3ds_ov2640); | 586 | platform_device_register(&mx35_3ds_ov2640); |
592 | imx35_3ds_init_camera(); | 587 | imx35_3ds_init_camera(); |
588 | } | ||
589 | |||
590 | static void __init mx35_3ds_late_init(void) | ||
591 | { | ||
592 | struct platform_device *imx35_fb_pdev; | ||
593 | |||
594 | if (mxc_expio_init(MX35_CS5_BASE_ADDR, IMX_GPIO_NR(1, 1))) | ||
595 | pr_warn("Init of the debugboard failed, all " | ||
596 | "devices on the debugboard are unusable.\n"); | ||
593 | 597 | ||
594 | imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata); | 598 | imx35_fb_pdev = imx35_add_mx3_sdc_fb(&mx3fb_pdata); |
595 | mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev; | 599 | mx35_3ds_lcd.dev.parent = &imx35_fb_pdev->dev; |
@@ -618,6 +622,7 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK") | |||
618 | .init_irq = mx35_init_irq, | 622 | .init_irq = mx35_init_irq, |
619 | .init_time = mx35pdk_timer_init, | 623 | .init_time = mx35pdk_timer_init, |
620 | .init_machine = mx35_3ds_init, | 624 | .init_machine = mx35_3ds_init, |
625 | .init_late = mx35_3ds_late_init, | ||
621 | .reserve = mx35_3ds_reserve, | 626 | .reserve = mx35_3ds_reserve, |
622 | .restart = mxc_restart, | 627 | .restart = mxc_restart, |
623 | MACHINE_END | 628 | MACHINE_END |