ARM: restart: allow platforms more flexibility specifying restart mode
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 1 Nov 2011 14:27:33 +0000 (14:27 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 10 Nov 2011 22:30:10 +0000 (22:30 +0000)
Change 'soft_reboot' into a more generic 'restart_mode' variable,
allowing the default restart mode to be specified.

Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/mach/arch.h
arch/arm/kernel/setup.c
arch/arm/mach-ebsa110/core.c
arch/arm/mach-footbridge/cats-hw.c

index 8aa397a5ea7273d0ad673a9610e716ba7cfed4d0..6fe6cf0895c94e7c191a8592a2218c91bd916005 100644 (file)
@@ -30,10 +30,10 @@ struct machine_desc {
        unsigned int            video_start;    /* start of video RAM   */
        unsigned int            video_end;      /* end of video RAM     */
 
-       unsigned int            reserve_lp0 :1; /* never has lp0        */
-       unsigned int            reserve_lp1 :1; /* never has lp1        */
-       unsigned int            reserve_lp2 :1; /* never has lp2        */
-       unsigned int            soft_reboot :1; /* soft reboot          */
+       unsigned char           reserve_lp0 :1; /* never has lp0        */
+       unsigned char           reserve_lp1 :1; /* never has lp1        */
+       unsigned char           reserve_lp2 :1; /* never has lp2        */
+       char                    restart_mode;   /* default restart mode */
        void                    (*fixup)(struct tag *, char **,
                                         struct meminfo *);
        void                    (*reserve)(void);/* reserve mem blocks  */
index 4755e2827dc3ff7d42ccb8c11129578c694ce6c6..a753880e984b9c74822763963a0ec43e5db8d60a 100644 (file)
@@ -902,8 +902,8 @@ void __init setup_arch(char **cmdline_p)
        machine_desc = mdesc;
        machine_name = mdesc->name;
 
-       if (mdesc->soft_reboot)
-               reboot_setup("s");
+       if (mdesc->restart_mode)
+               reboot_setup(&mdesc->restart_mode);
 
        init_mm.start_code = (unsigned long) _text;
        init_mm.end_code   = (unsigned long) _etext;
index d0ce8abdd4b67d4929d1f66d545004ec0fae3a8d..ce3ed244c4b0319afb3f2ecb0a64fe4cf84e564f 100644 (file)
@@ -283,7 +283,7 @@ MACHINE_START(EBSA110, "EBSA110")
        .atag_offset    = 0x400,
        .reserve_lp0    = 1,
        .reserve_lp2    = 1,
-       .soft_reboot    = 1,
+       .restart_mode   = 's',
        .map_io         = ebsa110_map_io,
        .init_irq       = ebsa110_init_irq,
        .timer          = &ebsa110_timer,
index d5f178540928604b414d538ffd00421c9e07c7b6..60b6774e1eaa069c3e49dd357eb22d1502cad9f3 100644 (file)
@@ -86,7 +86,7 @@ fixup_cats(struct tag *tags, char **cmdline, struct meminfo *mi)
 MACHINE_START(CATS, "Chalice-CATS")
        /* Maintainer: Philip Blundell */
        .atag_offset    = 0x100,
-       .soft_reboot    = 1,
+       .restart_mode   = 's',
        .fixup          = fixup_cats,
        .map_io         = footbridge_map_io,
        .init_irq       = footbridge_init_irq,