• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/sh/include/asm/
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
161 :	.long \addr
172 :	.long \data
183 :
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
291 :	.long \addr
302 :	.long \data
313 :
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
421 :	.long \addr
432 :	.long \data
443 :
45.endm
46
47/* The WAIT command is used to delay the execution */
48.macro  WAIT, time
49	mov.l  2f, r3
501 :
51	nop
52	tst     r3, r3
53	bf/s    1b
54	dt      r3
55	bra	3f
56	 nop
57	.align 2
582 :	.long \time * 100
593 :
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
691 :	.long \addr
702 :
71.endm
72
73#endif /* __ROMIMAGE_MACRO_H */
74