aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/include/mach-kfr2r09/partner-jet-setup.txt134
-rw-r--r--arch/sh/include/mach-kfr2r09/romimage.h75
2 files changed, 209 insertions, 0 deletions
diff --git a/arch/sh/include/mach-kfr2r09/partner-jet-setup.txt b/arch/sh/include/mach-kfr2r09/partner-jet-setup.txt
new file mode 100644
index 00000000000..9c85088728a
--- /dev/null
+++ b/arch/sh/include/mach-kfr2r09/partner-jet-setup.txt
@@ -0,0 +1,134 @@
1LIST "partner-jet-setup.txt - 20090729 Magnus Damm"
2LIST "set up enough of the kfr2r09 hardware to boot the kernel"
3
4LIST "zImage (RAM boot)"
5LIST "This script can be used to boot the kernel from RAM via JTAG:"
6LIST "> < partner-jet-setup.txt"
7LIST "> RD zImage, 0xa8800000"
8LIST "> G=0xa8800000"
9
10LIST "romImage (Flash boot)"
11LIST "Use the following command to burn the zImage to flash via JTAG:"
12LIST "> RD romImage, 0"
13
14LIST "--------------------------------"
15
16LIST "disable watchdog"
17EW 0xa4520004, 0xa507
18
19LIST "select mode for cs5 + cs6"
20ED 0xff800020, 0xa5a50001
21ED 0xfec10000, 0x0000001b
22
23LIST "setup clocks"
24ED 0xa4150004, 0x00000050
25ED 0xa4150000, 0x91053508
26WAIT 1
27ED 0xa4150024, 0x00005000
28
29LIST "setup pins"
30EB 0xa4050120, 0x00
31EB 0xa4050122, 0x00
32EB 0xa4050124, 0x00
33EB 0xa4050126, 0x00
34EB 0xa4050128, 0xA0
35EB 0xa405012A, 0x10
36EB 0xa405012C, 0x00
37EB 0xa405012E, 0x00
38EB 0xa4050130, 0x00
39EB 0xa4050132, 0x00
40EB 0xa4050134, 0x01
41EB 0xa4050136, 0x40
42EB 0xa4050138, 0x00
43EB 0xa405013A, 0x00
44EB 0xa405013C, 0x00
45EB 0xa405013E, 0x20
46EB 0xa4050160, 0x00
47EB 0xa4050162, 0x40
48EB 0xa4050164, 0x03
49EB 0xa4050166, 0x00
50EB 0xa4050168, 0x00
51EB 0xa405016A, 0x00
52EB 0xa405016C, 0x00
53
54EW 0xa405014E, 0x5660
55EW 0xa4050150, 0x0145
56EW 0xa4050152, 0x1550
57EW 0xa4050154, 0x0200
58EW 0xa4050156, 0x0040
59
60EW 0xa4050158, 0x0000
61EW 0xa405015a, 0x0000
62EW 0xa405015c, 0x0000
63EW 0xa405015e, 0x0000
64
65EW 0xa4050180, 0x0000
66EW 0xa4050182, 0x8002
67EW 0xa4050184, 0x0000
68
69EW 0xa405018a, 0x9991
70EW 0xa405018c, 0x8011
71EW 0xa405018e, 0x9550
72
73EW 0xa4050100, 0x0000
74EW 0xa4050102, 0x5540
75EW 0xa4050104, 0x0000
76EW 0xa4050106, 0x0000
77EW 0xa4050108, 0x4550
78EW 0xa405010a, 0x0130
79EW 0xa405010c, 0x0555
80EW 0xa405010e, 0x0000
81EW 0xa4050110, 0x0000
82EW 0xa4050112, 0xAAA8
83EW 0xa4050114, 0x8305
84EW 0xa4050116, 0x10F0
85EW 0xa4050118, 0x0F50
86EW 0xa405011a, 0x0000
87EW 0xa405011c, 0x0000
88EW 0xa405011e, 0x0555
89EW 0xa4050140, 0x0000
90EW 0xa4050142, 0x5141
91EW 0xa4050144, 0x5005
92EW 0xa4050146, 0xAAA9
93EW 0xa4050148, 0xFAA9
94EW 0xa405014a, 0x3000
95EW 0xa405014c, 0x0000
96
97LIST "setup sdram"
98ED 0xFD000108, 0x40000301
99ED 0xFD000020, 0x011B0002
100ED 0xFD000030, 0x03060E02
101ED 0xFD000034, 0x01020102
102ED 0xFD000038, 0x01090406
103ED 0xFD000008, 0x00000004
104ED 0xFD000040, 0x00000001
105ED 0xFD000040, 0x00000000
106ED 0xFD000018, 0x00000001
107
108WAIT 1
109
110ED 0xFD000014, 0x00000002
111ED 0xFD000060, 0x00000032
112ED 0xFD000060, 0x00020000
113ED 0xFD000014, 0x00000004
114ED 0xFD000014, 0x00000004
115ED 0xFD000010, 0x00000001
116ED 0xFD000044, 0x000004AF
117ED 0xFD000048, 0x20CF0037
118
119LIST "read 16 bytes from sdram"
120DD 0xa8000000, 0xa8000000, 1
121DD 0xa8000004, 0xa8000004, 1
122DD 0xa8000008, 0xa8000008, 1
123DD 0xa800000c, 0xa800000c, 1
124
125ED 0xFD000014, 0x00000002
126ED 0xFD000014, 0x00000004
127ED 0xFD000108, 0x40000300
128ED 0xFD000040, 0x00010000
129
130LIST "write to internal ram"
131ED 0xfd8007fc, 0
132
133LIST "setup cache"
134ED 0xff00001c, 0x0000090b
diff --git a/arch/sh/include/mach-kfr2r09/romimage.h b/arch/sh/include/mach-kfr2r09/romimage.h
new file mode 100644
index 00000000000..f5aa8e16770
--- /dev/null
+++ b/arch/sh/include/mach-kfr2r09/romimage.h
@@ -0,0 +1,75 @@
1/* kfr2r09 board specific boot code:
2 * converts the "partner-jet-script.txt" script into assembly
3 * the assembly code is the first code to be executed in the romImage
4 */
5
6/* The LIST command is used to include comments in the script */
7.macro LIST comment
8.endm
9
10/* The ED command is used to write a 32-bit word */
11.macro ED, addr, data
12 mov.l 1f ,r1
13 mov.l 2f ,r0
14 mov.l r0, @r1
15 bra 3f
16 nop
17 .align 2
181: .long \addr
192: .long \data
203:
21.endm
22
23/* The EW command is used to write a 16-bit word */
24.macro EW, addr, data
25 mov.l 1f ,r1
26 mov.l 2f ,r0
27 mov.w r0, @r1
28 bra 3f
29 nop
30 .align 2
311: .long \addr
322: .long \data
333:
34.endm
35
36/* The EB command is used to write an 8-bit word */
37.macro EB, addr, data
38 mov.l 1f ,r1
39 mov.l 2f ,r0
40 mov.b r0, @r1
41 bra 3f
42 nop
43 .align 2
441: .long \addr
452: .long \data
463:
47.endm
48
49/* The WAIT command is used to delay the execution */
50.macro WAIT, time
51 mov.l 2f ,r3
521:
53 nop
54 tst r3, r3
55 bf/s 1b
56 dt r3
57 bra 3f
58 nop
59 .align 2
602: .long \time * 100
613:
62.endm
63
64/* The DD command is used to read a 32-bit word */
65.macro DD, addr, addr2, nr
66 mov.l 1f ,r1
67 mov.l @r1, r0
68 bra 2f
69 nop
70 .align 2
711: .long \addr
722:
73.endm
74
75#include "partner-jet-setup.txt"