1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (C) 2008 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> 4 */ 5 6 #ifndef __MACRO_H__ 7 #define __MACRO_H__ 8 #ifdef __ASSEMBLY__ 9 10 .macro write32, addr, data 11 mov.l \addr ,r1 12 mov.l \data ,r0 13 mov.l r0, @r1 14 .endm 15 16 .macro write16, addr, data 17 mov.l \addr ,r1 18 mov.w \data ,r0 19 mov.w r0, @r1 20 .endm 21 22 .macro write8, addr, data 23 mov.l \addr ,r1 24 mov.l \data ,r0 25 mov.b r0, @r1 26 .endm 27 28 .macro wait_timer, time 29 mov.l \time ,r3 30 1: 31 nop 32 tst r3, r3 33 bf/s 1b 34 dt r3 35 .endm 36 37 #endif /* __ASSEMBLY__ */ 38 #endif /* __MACRO_H__ */ 39