aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2009-10-30 00:24:48 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-10-30 01:38:49 -0400
commit58ee987e2fd8acff6263d194d8fa43267cc8b1c9 (patch)
treebf531b135a7a8b34cac4367728e8d75c927285b5 /arch/sh
parentbb3e0eed9dd51987c7462bae2880a3d4d750c55a (diff)
sh: Add KFR2R09 specific memory pre/post R-standby code
Add R-standby support to the KFR2R09 sdram code. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-kfr2r09/sdram.S28
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c3
2 files changed, 30 insertions, 1 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/sdram.S b/arch/sh/boards/mach-kfr2r09/sdram.S
index 4ce78fcf5674..0c9f55bec2fe 100644
--- a/arch/sh/boards/mach-kfr2r09/sdram.S
+++ b/arch/sh/boards/mach-kfr2r09/sdram.S
@@ -39,6 +39,10 @@ ENTRY(kfr2r09_sdram_leave_start)
39 39
40 /* DBSC: put memory in auto-refresh mode */ 40 /* DBSC: put memory in auto-refresh mode */
41 41
42 mov.l @(SH_SLEEP_MODE, r5), r0
43 tst #SUSP_SH_RSTANDBY, r0
44 bf resume_rstandby
45
42 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ 46 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
43 WAIT 1 47 WAIT 1
44 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */ 48 ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */
@@ -49,4 +53,28 @@ ENTRY(kfr2r09_sdram_leave_start)
49 rts 53 rts
50 nop 54 nop
51 55
56resume_rstandby:
57
58 /* DBSC: re-initialize and put in auto-refresh */
59
60 ED 0xFD000108, 0x40000301 /* DBPDCNT0 */
61 ED 0xFD000020, 0x011B0002 /* DBCONF */
62 ED 0xFD000030, 0x03060E02 /* DBTR0 */
63 ED 0xFD000034, 0x01020102 /* DBTR1 */
64 ED 0xFD000038, 0x01090406 /* DBTR2 */
65 ED 0xFD000008, 0x00000004 /* DBKIND */
66 ED 0xFD000040, 0x00000001 /* DBRFPDN0 */
67 ED 0xFD000040, 0x00000000 /* DBRFPDN0 */
68 ED 0xFD000018, 0x00000001 /* DBCKECNT */
69 WAIT 1
70 ED 0xFD000010, 0x00000001 /* DBEN */
71 ED 0xFD000044, 0x000004AF /* DBRFPDN1 */
72 ED 0xFD000048, 0x20CF0037 /* DBRFPDN2 */
73 ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */
74 ED 0xFD000108, 0x40000300 /* DBPDCNT0 */
75 ED 0xFD000040, 0x00010000 /* DBRFPDN0 */
76
77 rts
78 nop
79
52ENTRY(kfr2r09_sdram_leave_end) 80ENTRY(kfr2r09_sdram_leave_end)
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c
index 5dae632092f2..fe80ad0a41f6 100644
--- a/arch/sh/boards/mach-kfr2r09/setup.c
+++ b/arch/sh/boards/mach-kfr2r09/setup.c
@@ -453,7 +453,8 @@ extern char kfr2r09_sdram_leave_end;
453static int __init kfr2r09_devices_setup(void) 453static int __init kfr2r09_devices_setup(void)
454{ 454{
455 /* register board specific self-refresh code */ 455 /* register board specific self-refresh code */
456 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF, 456 sh_mobile_register_self_refresh(SUSP_SH_STANDBY | SUSP_SH_SF |
457 SUSP_SH_RSTANDBY,
457 &kfr2r09_sdram_enter_start, 458 &kfr2r09_sdram_enter_start,
458 &kfr2r09_sdram_enter_end, 459 &kfr2r09_sdram_enter_end,
459 &kfr2r09_sdram_leave_start, 460 &kfr2r09_sdram_leave_start,