commit: http://blackfin.uclinux.org/git/?p=linux-kernel;a=commitdiff;h=22bf55dbb4e08b59a8f9957813d960c23d71d6c4 branch: http://blackfin.uclinux.org/git/?p=linux-kernel;a=shortlog;h=refs/heads/trunk
Signed-off-by: Steven Miao <[email protected]> Signed-off-by: Bob Liu <[email protected]> --- arch/blackfin/include/asm/dpmc.h | 20 ++------------------ arch/blackfin/mach-bf609/hibernate.S | 12 +++++++++--- arch/blackfin/mach-bf609/pm.c | 20 -------------------- 3 files changed, 11 insertions(+), 41 deletions(-) diff --git a/arch/blackfin/include/asm/dpmc.h b/arch/blackfin/include/asm/dpmc.h index bfd6c36..323d55a 100644 --- a/arch/blackfin/include/asm/dpmc.h +++ b/arch/blackfin/include/asm/dpmc.h @@ -40,25 +40,11 @@ #define PM_REGSET12 R7:0, P5:1 #define PM_REGSET13 R7:0, P5:0 -#define _PM_PUSH(n, x, w, base) \ - [--sp] = (R7:0, P5:0);\ - R0.L = ((x) - base); \ - R1 = FP; \ - R0 = R0 + R1; \ - R1 = w[FP + ((x) - (base))]; \ - call _pm_save_reg; \ - (R7:0, P5:0) = [sp++];\ - PM_REG##n = w[FP + ((x) - (base))]; +#define _PM_PUSH(n, x, w, base) PM_REG##n = w[FP + ((x) - (base))]; #define _PM_POP(n, x, w, base) w[FP + ((x) - (base))] = PM_REG##n; #define PM_PUSH_SYNC(n) [--sp] = (PM_REGSET##n); #define PM_POP_SYNC(n) (PM_REGSET##n) = [sp++]; -#define PM_PUSH(n, x) \ - [--sp] = (R7:0, P5:0);\ - R0 = FP; \ - R1 = [FP]; \ - call _pm_save_reg; \ - (R7:0, P5:0) = [sp++];\ - PM_REG##n = [FP++]; +#define PM_PUSH(n, x) PM_REG##n = [FP++]; #define PM_POP(n, x) [FP--] = PM_REG##n; #define PM_CORE_PUSH(n, x) _PM_PUSH(n, x, , COREMMR_BASE) #define PM_CORE_POP(n, x) _PM_POP(n, x, , COREMMR_BASE) @@ -180,8 +166,6 @@ .Lsave_begin: R1 = [FP]; [--sp] = R1; - R0 = FP; - call _pm_save_reg; .Lsave_end: FP += 8; .endm diff --git a/arch/blackfin/mach-bf609/hibernate.S b/arch/blackfin/mach-bf609/hibernate.S index 23c8302..08a98f4 100644 --- a/arch/blackfin/mach-bf609/hibernate.S +++ b/arch/blackfin/mach-bf609/hibernate.S @@ -14,11 +14,17 @@ ENTRY(_enter_hibernate) call _bf609_ddr_sr; call _bfin_hibernate_syscontrol; + P0.H = HI(DPM0_RESTORE4); + P0.L = LO(DPM0_RESTORE4); + P1.H = _bf609_pm_data; + P1.L = _bf609_pm_data; + [P0] = P1; + P0.H = HI(DPM0_CTL); P0.L = LO(DPM0_CTL); R3.H = HI(0x00000010); R3.L = LO(0x00000010); - W[P0] = R3; + [P0] = R3; SSYNC; ENDPROC(_enter_hibernate_mode) @@ -29,8 +35,8 @@ ENTRY(_bf609_hibernate) bfin_core_mmr_save; bfin_sec_save; - P0.H = HI(0x10); - P0.L = LO(0x10); + P0.H = _bf609_pm_data; + P0.L = _bf609_pm_data; R1.H = 0xDEAD; R1.L = 0xBEEF; R2.H = .Lpm_resume_here; diff --git a/arch/blackfin/mach-bf609/pm.c b/arch/blackfin/mach-bf609/pm.c index 81c9633..fefffa5 100644 --- a/arch/blackfin/mach-bf609/pm.c +++ b/arch/blackfin/mach-bf609/pm.c @@ -131,26 +131,6 @@ void bfin_cpu_suspend(void) ); } -uint32_t pm_reg[512]; -uint32_t pm_reg_val[512]; -uint32_t pm_reg_num = 0; - -void pm_save_reg(uint32_t addr, uint32_t value) -{ - pm_reg[pm_reg_num] = addr; - pm_reg_val[pm_reg_num] = value; - pm_reg_num++; -} - -void pm_dump_reg(void) -{ - int i; - - for (i = 0; i < pm_reg_num; i++) { - printk("reg %08x: %08x\n", pm_reg[i], pm_reg_val[i]); - } -} - __attribute__((l1_text)) void bfin_deepsleep(unsigned long mask) {
_______________________________________________ Linux-kernel-commits mailing list [email protected] https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits
