sh: Fix build of sh7785lcr 32bit mode
PATCH 1/1 sh: Fix build of sh7785lcr 32bit mode
Update lowlevel_init.S and macro.h.
Signed-off-by Nobuhiro Iwamatsu <[email protected]>
--- board/espt/lowlevel_init.S | 10 +--- board/renesas/sh7785lcr/lowlevel_init.S | 96 +++++++++++++------------------ include/asm-sh/macro.h | 37 ++++++++++-- 3 files changed, 71 insertions(+), 72 deletions(-)
board/espt/lowlevel_init.S +1 -9
@@ -72,15 +72,7 @@ lowlevel_init: /* set DDR-SDRAM dummy read */ write32 MMSEL_A, MMSEL_D - mov.l MMSEL_A, r0 - synco - mov.l @r0, r1 - synco - - mov.l CS0_A, r0 - synco - mov.l @r0, r1 - synco + write32 MMSEL_A, CS0_A /* set DDR-SDRAM bus/endian etc */ write32 MIM_U_A, MIM_U_D
(quoted diff) +0 -0
b/board/renesas/sh7785lcr/lowlevel_init.S
index 7faad95..3682efc 100644
board/renesas/sh7785lcr/lowlevel_init.S +40 -56
137 lines not on this page · raw message
include/asm-sh/macro.h +30 -7
@@ -22,30 +22,53 @@#ifdef __ASSEMBLY__ .macro write32, addr, data - mov.l \addr ,r1 - mov.l \data ,r0 + mov.l 1f ,r1 + mov.l 2f ,r0 + bra 3f mov.l r0, @r1 + .align 2 + +1: .long \addr +2: .long \data +3: .endm .macro write16, addr, data - mov.l \addr ,r1 - mov.w \data ,r0 + mov.l 1f ,r1 + mov.w 2f ,r0 + bra 3f mov.w r0, @r1 + .align 2 + +1: .long \addr +2: .word \data +3: .endm .macro write8, addr, data - mov.l \addr ,r1 - mov.l \data ,r0 + mov.l 1f ,r1 + mov.l 2f ,r0 + bra 3f mov.b r0, @r1 + .align 2 + +1: .long \addr +2: .long \data +3: .endm .macro wait_timer, time - mov.l \time ,r3 + mov.l 2f ,r3 + bra 3f 1: nop tst r3, r3 bf/s 1b dt r3 + .align 2 + +2: .long \time +3: .endm #endif /* __ASSEMBLY__ */
Signature · 7 lines
1.6.3.3
--
Nobuhiro Iwamatsu / Debian Developer
iwamatsu at {nigauri.org / debian.org}PATCH 1/1 sh: Fix build of sh7785lcr 32bit mode
Quoted 8 lines · Nobuhiro Iwamatsu
Update
lowlevel_init.Sandmacro.h.Signed-off-by Nobuhiro Iwamatsu <[email protected]>--- board/espt/lowlevel_init.S | 10 +--- board/renesas/sh7785lcr/lowlevel_init.S | 96 +++++++++++++------------------ include/asm-sh/macro.h | 37 ++++++++++-- 3 files changed, 71 insertions(+), 72 deletions(-)
maybe update all other sh assembly would be nice too as IIRC it will increase the binary size otherwise
board/espt/lowlevel_init.S lowlevel_init: · line 73
Quoted 8 lines
board/espt/lowlevel_init.S +0
-0@@ -72,15 +72,7 @@ lowlevel_init: /* set DDR-SDRAM dummy read */ write32 MMSEL_A, MMSEL_D
Best Regards,
J.