sh: LED9, LED10 and LED11 support for Solution Engine 7724
[linux-2.6/linux-2.6-openrd.git] / arch / sh / include / mach-kfr2r09 / romimage.h
blobf5aa8e16770c8c8b740978f2fdd3671539ce8a08
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 */
6 /* The LIST command is used to include comments in the script */
7 .macro LIST comment
8 .endm
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
18 1: .long \addr
19 2: .long \data
21 .endm
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
31 1: .long \addr
32 2: .long \data
34 .endm
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
44 1: .long \addr
45 2: .long \data
47 .endm
49 /* The WAIT command is used to delay the execution */
50 .macro WAIT, time
51 mov.l 2f ,r3
53 nop
54 tst r3, r3
55 bf/s 1b
56 dt r3
57 bra 3f
58 nop
59 .align 2
60 2: .long \time * 100
62 .endm
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
71 1: .long \addr
73 .endm
75 #include "partner-jet-setup.txt"