diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2012-04-25 10:24:44 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2012-05-03 11:09:24 -0400 |
commit | 90de41375ccf8373c0a39d04547f3e3c65d90ec0 (patch) | |
tree | d44e023054745ba4d89aba9e95c721528fef890a /arch | |
parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) |
ARM: provide a late_initcall hook for platform initialization
This allows platforms to set up things that need to be done at
late_initcall time.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Robert Lee <rob.lee@linaro.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/mach/arch.h | 1 | ||||
-rw-r--r-- | arch/arm/kernel/setup.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index d7692cafde7f..0b1c94b8c652 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -43,6 +43,7 @@ struct machine_desc { | |||
43 | void (*init_irq)(void); | 43 | void (*init_irq)(void); |
44 | struct sys_timer *timer; /* system tick timer */ | 44 | struct sys_timer *timer; /* system tick timer */ |
45 | void (*init_machine)(void); | 45 | void (*init_machine)(void); |
46 | void (*init_late)(void); | ||
46 | #ifdef CONFIG_MULTI_IRQ_HANDLER | 47 | #ifdef CONFIG_MULTI_IRQ_HANDLER |
47 | void (*handle_irq)(struct pt_regs *); | 48 | void (*handle_irq)(struct pt_regs *); |
48 | #endif | 49 | #endif |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index ebfac782593f..549f036a5cf8 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -800,6 +800,14 @@ static int __init customize_machine(void) | |||
800 | } | 800 | } |
801 | arch_initcall(customize_machine); | 801 | arch_initcall(customize_machine); |
802 | 802 | ||
803 | static int __init init_machine_late(void) | ||
804 | { | ||
805 | if (machine_desc->init_late) | ||
806 | machine_desc->init_late(); | ||
807 | return 0; | ||
808 | } | ||
809 | late_initcall(init_machine_late); | ||
810 | |||
803 | #ifdef CONFIG_KEXEC | 811 | #ifdef CONFIG_KEXEC |
804 | static inline unsigned long long get_total_mem(void) | 812 | static inline unsigned long long get_total_mem(void) |
805 | { | 813 | { |