]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: provide a late_initcall hook for platform initialization
authorShawn Guo <shawn.guo@linaro.org>
Wed, 25 Apr 2012 14:24:44 +0000 (22:24 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Thu, 3 May 2012 15:09:24 +0000 (23:09 +0800)
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>
arch/arm/include/asm/mach/arch.h
arch/arm/kernel/setup.c

index d7692cafde7fdd3d0b4e297620fbf2dd45d611d6..0b1c94b8c65226a85b2a8e696ec51c7cfaea6527 100644 (file)
@@ -43,6 +43,7 @@ struct machine_desc {
        void                    (*init_irq)(void);
        struct sys_timer        *timer;         /* system tick timer    */
        void                    (*init_machine)(void);
+       void                    (*init_late)(void);
 #ifdef CONFIG_MULTI_IRQ_HANDLER
        void                    (*handle_irq)(struct pt_regs *);
 #endif
index ebfac782593f048c9cf81a5619f0b3d24900ca8c..549f036a5cf8279b7f0a5348c763baf209840c3a 100644 (file)
@@ -800,6 +800,14 @@ static int __init customize_machine(void)
 }
 arch_initcall(customize_machine);
 
+static int __init init_machine_late(void)
+{
+       if (machine_desc->init_late)
+               machine_desc->init_late();
+       return 0;
+}
+late_initcall(init_machine_late);
+
 #ifdef CONFIG_KEXEC
 static inline unsigned long long get_total_mem(void)
 {