MIPS: Alchemy: sleepcode without compile-time cputype dependencies
PATCH RESEND 1/1 MIPS: Alchemy: sleepcode without compile-time cputype dependencies
Split the low-level sleepcode into per-cpu functions instead of relying on compile-time-defined cpu type.
Signed-off-by Manuel Lauss <[email protected]>
---
This patch didn't make it to 2.6.35 so I'm resending it.
arch/mips/alchemy/common/power.c | 12 +++- arch/mips/alchemy/common/sleeper.S | 81 ++++++++++++++++++---------- arch/mips/include/asm/mach-au1x00/au1000.h | 3 +- 3 files changed, 64 insertions(+), 32 deletions(-)
arch/mips/alchemy/common/power.c +9 -3
@@ -193,9 +193,15 @@ static void restore_core_regs(void)void au_sleep (void ) { -save_core_regs (); -au1xxx_save_and_sleep (); -restore_core_regs (); +int cpuid =alchemy_get_cputype (); +if (cpuid !=ALCHEMY_CPU_UNKNOWN ) { +save_core_regs (); +if (cpuid <=ALCHEMY_CPU_AU1500 ) +alchemy_sleep_au1000 (); +else if (cpuid <=ALCHEMY_CPU_AU1200 ) +alchemy_sleep_au1550 (); +restore_core_regs (); + } }#endif /* CONFIG_PM */
arch/mips/alchemy/common/sleeper.S +53 -28
122 lines not on this page · raw message
arch/mips/include/asm/mach-au1x00/au1000.h +2 -1
@@ -188,7 +188,8 @@ extern unsigned long get_au1x00_uart_baud_base(void);extern unsigned long au1xxx_calc_clock (void );/* PM: arch/mips/alchemy/common/sleeper.S, power.c, irq.c */ -void au1xxx_save_and_sleep (void ); +void alchemy_sleep_au1000 (void ); +void alchemy_sleep_au1550 (void );void au_sleep (void );
Signature · 1 line
1.7.1
Quoted 6 lines · Manuel Lauss
Split the low-level sleepcode into per-cpu functions instead of relying on compile-time-defined cpu type.
Signed-off-by Manuel Lauss <[email protected]>---
This patch didn't make it to 2.6.35 so I'm resending it.
Sorry, seems I or my patch-o-matic scripts somehow dropped
http://patchwork.linux-mips.org/patch/1038/ on the ground. That patch was supposed to be applied. Anyway, I marked the old patch as superseeded and I'm applying this one now.
Ralf