diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:03:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-09 22:03:16 -0500 |
commit | 3a43aaa31790c36b69ebf8a6396f37fade86b531 (patch) | |
tree | 7c7f8da6219d546f2b44534cb7be1fb5591d6ac4 /arch/sh/boards/mach-kfr2r09/sdram.S | |
parent | aed886ce777590eac87f7ce2897d9f8357754331 (diff) | |
parent | 6a5a0b9139b19dd1a107870269a35bc9cf18d2dc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (137 commits)
sh: include empty zero page in romImage
sh: Make associative cache writes fatal on all SH-4A parts.
sh: Drop associative writes for SH-4 cache flushes.
sh: Partial revert of copy/clear_user_highpage() optimizations.
sh: Add default uImage rule for se7724, ap325rxa, and migor.
sh: allow runtime pm without suspend/resume callbacks
sh: mach-ecovec24: Remove un-defined settings for VPU
sh: mach-ecovec24: LCDC drive ability become high
sh: fix sh7724 VEU3F resource size
serial: sh-sci: Fix too early port disabling.
sh: pfc: pr_info() -> pr_debug() cleanups.
sh: pfc: Convert from ctrl_xxx() to __raw_xxx() I/O routines.
sh: Improve kfr2r09 serial port setup code
sh: Break out SuperH PFC code
sh: Move KEYSC header file
sh: convert /proc/cpu/aligmnent, /proc/cpu/kernel_alignment to seq_file
sh: Add CPG save/restore code for sh7724 R-standby
sh: Add SDHI power control support to Ecovec
mfd: Add power control platform data to SDHI driver
sh: mach-ecovec24: modify address map
...
Diffstat (limited to 'arch/sh/boards/mach-kfr2r09/sdram.S')
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/sdram.S | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/sdram.S b/arch/sh/boards/mach-kfr2r09/sdram.S new file mode 100644 index 000000000000..0c9f55bec2fe --- /dev/null +++ b/arch/sh/boards/mach-kfr2r09/sdram.S | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * KFR2R09 sdram self/auto-refresh setup code | ||
3 | * | ||
4 | * Copyright (C) 2009 Magnus Damm | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/sys.h> | ||
12 | #include <linux/errno.h> | ||
13 | #include <linux/linkage.h> | ||
14 | #include <asm/asm-offsets.h> | ||
15 | #include <asm/suspend.h> | ||
16 | #include <asm/romimage-macros.h> | ||
17 | |||
18 | /* code to enter and leave self-refresh. must be self-contained. | ||
19 | * this code will be copied to on-chip memory and executed from there. | ||
20 | */ | ||
21 | .balign 4 | ||
22 | ENTRY(kfr2r09_sdram_enter_start) | ||
23 | |||
24 | /* DBSC: put memory in self-refresh mode */ | ||
25 | |||
26 | ED 0xFD000010, 0x00000000 /* DBEN */ | ||
27 | ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ | ||
28 | ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */ | ||
29 | ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */ | ||
30 | ED 0xFD000040, 0x00000001 /* DBRFPDN0 */ | ||
31 | |||
32 | rts | ||
33 | nop | ||
34 | |||
35 | ENTRY(kfr2r09_sdram_enter_end) | ||
36 | |||
37 | .balign 4 | ||
38 | ENTRY(kfr2r09_sdram_leave_start) | ||
39 | |||
40 | /* DBSC: put memory in auto-refresh mode */ | ||
41 | |||
42 | mov.l @(SH_SLEEP_MODE, r5), r0 | ||
43 | tst #SUSP_SH_RSTANDBY, r0 | ||
44 | bf resume_rstandby | ||
45 | |||
46 | ED 0xFD000040, 0x00000000 /* DBRFPDN0 */ | ||
47 | WAIT 1 | ||
48 | ED 0xFD000014, 0x00000002 /* DBCMDCNT (PALL) */ | ||
49 | ED 0xFD000014, 0x00000004 /* DBCMDCNT (REF) */ | ||
50 | ED 0xFD000010, 0x00000001 /* DBEN */ | ||
51 | ED 0xFD000040, 0x00010000 /* DBRFPDN0 */ | ||
52 | |||
53 | rts | ||
54 | nop | ||
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 | |||
80 | ENTRY(kfr2r09_sdram_leave_end) | ||