Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163567
b: refs/heads/master
c: 378a569
h: refs/heads/master
i:
  163565: fb89575
  163563: 92f845d
  163559: a22ac92
  163551: 2b00964
v: v3
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Sep 11, 2009
1 parent d42654f commit c30b5bb
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 70 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 125ecce6960e3365433ec5c734365a51e88bf3d9
refs/heads/master: 378a569eaa2bff8f22bb312a76cf0a97d5d329ae
73 changes: 73 additions & 0 deletions trunk/arch/sh/include/asm/romimage-macros.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#ifndef __ROMIMAGE_MACRO_H
#define __ROMIMAGE_MACRO_H

/* 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

#endif /* __ROMIMAGE_MACRO_H */
70 changes: 1 addition & 69 deletions trunk/arch/sh/include/mach-kfr2r09/mach/romimage.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,7 @@
* 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 <asm/romimage-macros.h>
#include "partner-jet-setup.txt"

/* execute icbi after enabling cache */
Expand Down

0 comments on commit c30b5bb

Please sign in to comment.