aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/mach-kfr2r09/mach/romimage.h
blob: 39ee794435696661ac4306816eb0d07c021307c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/* kfr2r09 board specific boot code:
 * converts the "partner-jet-script.txt" script into assembly
 * the assembly code is the first code to be executed in the romImage
 */

/* The LIST command is used to include comments in the script */
.macro	LIST comment
.endm

/* The ED command is used to write a 32-bit word */
.macro  ED, addr, data
        mov.l 1f ,r1
        mov.l 2f ,r0
        mov.l r0, @r1
	bra 3f
	 nop
	.align 2
1:	.long \addr
2:	.long \data
3:
.endm

/* The EW command is used to write a 16-bit word */
.macro  EW, addr, data
        mov.l 1f ,r1
        mov.l 2f ,r0
        mov.w r0, @r1
	bra 3f
	 nop
	.align 2
1:	.long \addr
2:	.long \data
3:
.endm

/* The EB command is used to write an 8-bit word */
.macro  EB, addr, data
        mov.l 1f ,r1
        mov.l 2f ,r0
        mov.b r0, @r1
	bra 3f
	 nop
	.align 2
1:	.long \addr
2:	.long \data
3:
.endm

/* The WAIT command is used to delay the execution */
.macro  WAIT, time
        mov.l  2f ,r3
1:
        nop
        tst     r3, r3
        bf/s    1b
         dt      r3
	bra	3f
	 nop
	.align 2
2:	.long \time * 100
3:
.endm

/* The DD command is used to read a 32-bit word */
.macro  DD, addr, addr2, nr
        mov.l 1f ,r1
        mov.l @r1, r0
	bra 2f
	 nop
	.align 2
1:	.long \addr
2:
.endm

#include "partner-jet-setup.txt"

	/* execute icbi after enabling cache */
	mov.l	1f, r0
	icbi	@r0

	/* jump to cached area */
	mova	2f, r0
	jmp	@r0
	 nop

	.align 2
1:	.long 0xa8000000
2: