From: Lee Jones Date: Tue, 25 Sep 2012 15:03:45 +0000 (+0100) Subject: ARM: ux500: Fix initialisation order for UIBs X-Git-Tag: firefly_0821_release~3680^2~1479^2^2~41 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0ddf855af6162df41345ea6afabd0190d751bfb9;p=firefly-linux-kernel-4.4.55.git ARM: ux500: Fix initialisation order for UIBs An earlier change prevented User Interface Boards (UIBs) from being initialised on boards which did not support them. This change had the undesired effect of reordering the UIB initialisation calls with I2C registration. Here we ensure UIBs are only setup after all required infrastructure is already in place. Acked-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: Lee Jones --- diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 416d436111f2..e7dd757a79fb 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -618,8 +618,6 @@ static void __init mop500_init_machine(void) /* This board has full regulator constraints */ regulator_has_full_constraints(); - - mop500_uib_init(); } static void __init snowball_init_machine(void) @@ -684,8 +682,6 @@ static void __init hrefv60_init_machine(void) /* This board has full regulator constraints */ regulator_has_full_constraints(); - - mop500_uib_init(); } MACHINE_START(U8500, "ST-Ericsson MOP500 platform") @@ -721,7 +717,7 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") .timer = &ux500_timer, .handle_irq = gic_handle_irq, .init_machine = snowball_init_machine, - .init_late = ux500_init_late, + .init_late = NULL, MACHINE_END #ifdef CONFIG_MACH_UX500_DT @@ -811,8 +807,6 @@ static void __init u8500_init_machine(void) i2c_register_board_info(2, mop500_i2c2_devices, ARRAY_SIZE(mop500_i2c2_devices)); - mop500_uib_init(); - } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { mop500_of_audio_init(parent); } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { @@ -824,8 +818,6 @@ static void __init u8500_init_machine(void) mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; platform_add_devices(mop500_platform_devs, ARRAY_SIZE(mop500_platform_devs)); - - mop500_uib_init(); } /* This board has full regulator constraints */ diff --git a/arch/arm/mach-ux500/cpu.c b/arch/arm/mach-ux500/cpu.c index 1f3fbc2bb776..721e7b4275f3 100644 --- a/arch/arm/mach-ux500/cpu.c +++ b/arch/arm/mach-ux500/cpu.c @@ -26,6 +26,8 @@ #include #include +#include "board-mop500.h" + void __iomem *_PRCMU_BASE; /* @@ -82,6 +84,7 @@ void __init ux500_init_irq(void) void __init ux500_init_late(void) { + mop500_uib_init(); } static const char * __init ux500_get_machine(void)