diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2009-09-09 21:39:52 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-11 00:19:16 -0400 |
commit | 378a569eaa2bff8f22bb312a76cf0a97d5d329ae (patch) | |
tree | fc35c29aa2222621709eefc5f458eb85d4b52f57 /arch/sh | |
parent | 125ecce6960e3365433ec5c734365a51e88bf3d9 (diff) |
sh: add romimage-macros.h
romimage macros which are used in kfr2r09 is very useful for other board.
This patch divides kfr2r09's romimage.h into
romimage-macros and partner-jet-setup.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/include/asm/romimage-macros.h | 73 | ||||
-rw-r--r-- | arch/sh/include/mach-kfr2r09/mach/romimage.h | 70 |
2 files changed, 74 insertions, 69 deletions
diff --git a/arch/sh/include/asm/romimage-macros.h b/arch/sh/include/asm/romimage-macros.h new file mode 100644 index 000000000000..ae17a150bb58 --- /dev/null +++ b/arch/sh/include/asm/romimage-macros.h | |||
@@ -0,0 +1,73 @@ | |||
1 | #ifndef __ROMIMAGE_MACRO_H | ||
2 | #define __ROMIMAGE_MACRO_H | ||
3 | |||
4 | /* The LIST command is used to include comments in the script */ | ||
5 | .macro LIST comment | ||
6 | .endm | ||
7 | |||
8 | /* The ED command is used to write a 32-bit word */ | ||
9 | .macro ED, addr, data | ||
10 | mov.l 1f, r1 | ||
11 | mov.l 2f, r0 | ||
12 | mov.l r0, @r1 | ||
13 | bra 3f | ||
14 | nop | ||
15 | .align 2 | ||
16 | 1 : .long \addr | ||
17 | 2 : .long \data | ||
18 | 3 : | ||
19 | .endm | ||
20 | |||
21 | /* The EW command is used to write a 16-bit word */ | ||
22 | .macro EW, addr, data | ||
23 | mov.l 1f, r1 | ||
24 | mov.l 2f, r0 | ||
25 | mov.w r0, @r1 | ||
26 | bra 3f | ||
27 | nop | ||
28 | .align 2 | ||
29 | 1 : .long \addr | ||
30 | 2 : .long \data | ||
31 | 3 : | ||
32 | .endm | ||
33 | |||
34 | /* The EB command is used to write an 8-bit word */ | ||
35 | .macro EB, addr, data | ||
36 | mov.l 1f, r1 | ||
37 | mov.l 2f, r0 | ||
38 | mov.b r0, @r1 | ||
39 | bra 3f | ||
40 | nop | ||
41 | .align 2 | ||
42 | 1 : .long \addr | ||
43 | 2 : .long \data | ||
44 | 3 : | ||
45 | .endm | ||
46 | |||
47 | /* The WAIT command is used to delay the execution */ | ||
48 | .macro WAIT, time | ||
49 | mov.l 2f, r3 | ||
50 | 1 : | ||
51 | nop | ||
52 | tst r3, r3 | ||
53 | bf/s 1b | ||
54 | dt r3 | ||
55 | bra 3f | ||
56 | nop | ||
57 | .align 2 | ||
58 | 2 : .long \time * 100 | ||
59 | 3 : | ||
60 | .endm | ||
61 | |||
62 | /* The DD command is used to read a 32-bit word */ | ||
63 | .macro DD, addr, addr2, nr | ||
64 | mov.l 1f, r1 | ||
65 | mov.l @r1, r0 | ||
66 | bra 2f | ||
67 | nop | ||
68 | .align 2 | ||
69 | 1 : .long \addr | ||
70 | 2 : | ||
71 | .endm | ||
72 | |||
73 | #endif /* __ROMIMAGE_MACRO_H */ | ||
diff --git a/arch/sh/include/mach-kfr2r09/mach/romimage.h b/arch/sh/include/mach-kfr2r09/mach/romimage.h index 39ee79443569..a110823f2bde 100644 --- a/arch/sh/include/mach-kfr2r09/mach/romimage.h +++ b/arch/sh/include/mach-kfr2r09/mach/romimage.h | |||
@@ -3,75 +3,7 @@ | |||
3 | * the assembly code is the first code to be executed in the romImage | 3 | * the assembly code is the first code to be executed in the romImage |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* The LIST command is used to include comments in the script */ | 6 | #include <asm/romimage-macros.h> |
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 | ||
18 | 1: .long \addr | ||
19 | 2: .long \data | ||
20 | 3: | ||
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 | ||
31 | 1: .long \addr | ||
32 | 2: .long \data | ||
33 | 3: | ||
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 | ||
44 | 1: .long \addr | ||
45 | 2: .long \data | ||
46 | 3: | ||
47 | .endm | ||
48 | |||
49 | /* The WAIT command is used to delay the execution */ | ||
50 | .macro WAIT, time | ||
51 | mov.l 2f ,r3 | ||
52 | 1: | ||
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 | ||
61 | 3: | ||
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 | ||
71 | 1: .long \addr | ||
72 | 2: | ||
73 | .endm | ||
74 | |||
75 | #include "partner-jet-setup.txt" | 7 | #include "partner-jet-setup.txt" |
76 | 8 | ||
77 | /* execute icbi after enabling cache */ | 9 | /* execute icbi after enabling cache */ |