ARM: restart: add restart hook to machine_desc record
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 4 Nov 2011 15:05:24 +0000 (15:05 +0000)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 2 Apr 2012 20:16:53 +0000 (13:16 -0700)
Add a restart hook to the machine_desc record so we don't have to
populate all platforms with init_early methods to initialize the
arm_pm_restart function pointer.

Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit a528721da08a793e0cec6ef6281d404eddd6e27b)

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

arch/arm/include/asm/mach/arch.h
arch/arm/kernel/setup.c

index 2b0efc3..61ae6bb 100644 (file)
@@ -46,6 +46,7 @@ struct machine_desc {
 #ifdef CONFIG_MULTI_IRQ_HANDLER
        void                    (*handle_irq)(struct pt_regs *);
 #endif
+       void                    (*restart)(char, const char *);
 };
 
 /*
index 8fc2c8f..d662dca 100644 (file)
@@ -928,6 +928,9 @@ void __init setup_arch(char **cmdline_p)
        paging_init(mdesc);
        request_standard_resources(mdesc);
 
+       if (mdesc->restart)
+               arm_pm_restart = mdesc->restart;
+
        unflatten_device_tree();
 
 #ifdef CONFIG_SMP