From c64b59fc5eea973ae82430f98046d4cd2af15160 Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Tue, 4 Mar 2014 11:07:07 +0100 Subject: atj213x: various fixes in sample code snippets Change-Id: I78781e1a56cb6705d011ee2296f1789b497a566a --- utils/atj2137/adfuload/test_binary/timer_irq/crt0.S | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'utils/atj2137/adfuload/test_binary/timer_irq/crt0.S') diff --git a/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S b/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S index eb78ba4fee..29fef6404f 100644 --- a/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S +++ b/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S @@ -29,9 +29,9 @@ load_addr: reloc_loop: lw t2, 0(v0) # src addiu v0, 4 # inc src addr - sw t2, 0(t0) # dst - bne t0, t1, reloc_loop addiu t0, 4 # inc dst addr + bne t0, t1, reloc_loop + sw t2, -4(t0) # dst cache_init: # setup caches @@ -47,8 +47,9 @@ cache_init: cache_init_loop: cache 8, 0(t0) # index store icache tag cache 9, 0(t0) # index store dcache tag - bne t0, t1, cache_init_loop addiu t0, t0, 0x10 + bne t0, t1, cache_init_loop + nop intc_setup: li t0, 0xb0020000 # INTC base @@ -73,9 +74,9 @@ core_irq_setup: la t1, bssend clear_bss_loop: - sw zero, 0(t0) - bne t0, t1, clear_bss_loop addiu t0, 4 + bne t0, t1, clear_bss_loop + sw zero, -4(t0) # setup stack la k0, irqstackend @@ -84,9 +85,9 @@ clear_bss_loop: li t1, 0xdeadbeef stack_munge_loop: - sw t1, 0(t0) - bne t0, sp, stack_munge_loop addiu t0, 4 + bne t0, sp, stack_munge_loop + sw t1, -4(t0) # jump to C code with enabled interrupts la t0, main -- cgit v1.2.3