Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Alchemy: Fix up residual devboard poweroff/reboot code.

Clean out stray unused board_reset() calls in pb1x boards, the PB1000 is
different from the rest and gets private methods.

(Cleanup after 32fd6901a6d8d19f94e4de6be4e4b552ab078620)

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1085/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Manuel Lauss and committed by
Ralf Baechle
7b5fcd69 b8853aa3

+15 -22
+15 -1
arch/mips/alchemy/devboards/pb1000/board_setup.c
··· 27 27 #include <linux/gpio.h> 28 28 #include <linux/init.h> 29 29 #include <linux/interrupt.h> 30 + #include <linux/pm.h> 30 31 #include <asm/mach-au1x00/au1000.h> 31 32 #include <asm/mach-pb1x00/pb1000.h> 33 + #include <asm/reboot.h> 32 34 #include <prom.h> 33 35 34 36 #include "../platform.h" ··· 40 38 return "Alchemy Pb1000"; 41 39 } 42 40 43 - void board_reset(void) 41 + static void board_reset(char *c) 44 42 { 43 + asm volatile ("jr %0" : : "r" (0xbfc00000)); 44 + } 45 + 46 + static void board_power_off(void) 47 + { 48 + printk(KERN_ALERT "It's now safe to remove power\n"); 49 + while (1) 50 + asm volatile (".set mips3 ; wait ; .set mips1"); 45 51 } 46 52 47 53 void __init board_setup(void) ··· 187 177 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); 188 178 break; 189 179 } 180 + 181 + pm_power_off = board_power_off; 182 + _machine_halt = board_power_off; 183 + _machine_restart = board_reset; 190 184 } 191 185 192 186 static int __init pb1000_init_irq(void)
-5
arch/mips/alchemy/devboards/pb1100/board_setup.c
··· 39 39 return "Alchemy Pb1100"; 40 40 } 41 41 42 - void board_reset(void) 43 - { 44 - bcsr_write(BCSR_SYSTEM, 0); 45 - } 46 - 47 42 void __init board_setup(void) 48 43 { 49 44 volatile void __iomem *base = (volatile void __iomem *)0xac000000UL;
-6
arch/mips/alchemy/devboards/pb1200/board_setup.c
··· 48 48 return "Alchemy Pb1200"; 49 49 } 50 50 51 - void board_reset(void) 52 - { 53 - bcsr_write(BCSR_RESETS, 0); 54 - bcsr_write(BCSR_SYSTEM, 0); 55 - } 56 - 57 51 void __init board_setup(void) 58 52 { 59 53 printk(KERN_INFO "AMD Alchemy Pb1200 Board\n");
-5
arch/mips/alchemy/devboards/pb1500/board_setup.c
··· 45 45 return "Alchemy Pb1500"; 46 46 } 47 47 48 - void board_reset(void) 49 - { 50 - bcsr_write(BCSR_SYSTEM, 0); 51 - } 52 - 53 48 void __init board_setup(void) 54 49 { 55 50 u32 pin_func;
-5
arch/mips/alchemy/devboards/pb1550/board_setup.c
··· 48 48 return "Alchemy Pb1550"; 49 49 } 50 50 51 - void board_reset(void) 52 - { 53 - bcsr_write(BCSR_SYSTEM, 0); 54 - } 55 - 56 51 void __init board_setup(void) 57 52 { 58 53 u32 pin_func;