diff options
author | Magnus Damm <damm@opensource.se> | 2009-10-30 00:24:48 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-30 01:38:49 -0400 |
commit | 58ee987e2fd8acff6263d194d8fa43267cc8b1c9 (patch) | |
tree | bf531b135a7a8b34cac4367728e8d75c927285b5 /arch/sh/boards/mach-kfr2r09/sdram.S | |
parent | bb3e0eed9dd51987c7462bae2880a3d4d750c55a (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/boards/mach-kfr2r09/sdram.S')
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/sdram.S | 28 |
1 files changed, 28 insertions, 0 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 | ||
56 | resume_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 | |||
52 | ENTRY(kfr2r09_sdram_leave_end) | 80 | ENTRY(kfr2r09_sdram_leave_end) |