summaryrefslogtreecommitdiff
path: root/utils/atj2137/adfuload/test_binary/timer_irq/crt0.S
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2014-03-04 11:07:07 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2014-03-04 11:07:07 +0100
commitc64b59fc5eea973ae82430f98046d4cd2af15160 (patch)
tree583f9a19d7b5220d35f698090315f6d0b090e0bf /utils/atj2137/adfuload/test_binary/timer_irq/crt0.S
parent2f21f77ade790a9fbd4a92f103f57f6d4bbb5af2 (diff)
downloadrockbox-c64b59fc5eea973ae82430f98046d4cd2af15160.tar.gz
rockbox-c64b59fc5eea973ae82430f98046d4cd2af15160.zip
atj213x: various fixes in sample code snippets
Change-Id: I78781e1a56cb6705d011ee2296f1789b497a566a
Diffstat (limited to 'utils/atj2137/adfuload/test_binary/timer_irq/crt0.S')
-rw-r--r--utils/atj2137/adfuload/test_binary/timer_irq/crt0.S15
1 files changed, 8 insertions, 7 deletions
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:
29reloc_loop: 29reloc_loop:
30 lw t2, 0(v0) # src 30 lw t2, 0(v0) # src
31 addiu v0, 4 # inc src addr 31 addiu v0, 4 # inc src addr
32 sw t2, 0(t0) # dst
33 bne t0, t1, reloc_loop
34 addiu t0, 4 # inc dst addr 32 addiu t0, 4 # inc dst addr
33 bne t0, t1, reloc_loop
34 sw t2, -4(t0) # dst
35 35
36cache_init: 36cache_init:
37 # setup caches 37 # setup caches
@@ -47,8 +47,9 @@ cache_init:
47cache_init_loop: 47cache_init_loop:
48 cache 8, 0(t0) # index store icache tag 48 cache 8, 0(t0) # index store icache tag
49 cache 9, 0(t0) # index store dcache tag 49 cache 9, 0(t0) # index store dcache tag
50 bne t0, t1, cache_init_loop
51 addiu t0, t0, 0x10 50 addiu t0, t0, 0x10
51 bne t0, t1, cache_init_loop
52 nop
52 53
53intc_setup: 54intc_setup:
54 li t0, 0xb0020000 # INTC base 55 li t0, 0xb0020000 # INTC base
@@ -73,9 +74,9 @@ core_irq_setup:
73 la t1, bssend 74 la t1, bssend
74 75
75clear_bss_loop: 76clear_bss_loop:
76 sw zero, 0(t0)
77 bne t0, t1, clear_bss_loop
78 addiu t0, 4 77 addiu t0, 4
78 bne t0, t1, clear_bss_loop
79 sw zero, -4(t0)
79 80
80 # setup stack 81 # setup stack
81 la k0, irqstackend 82 la k0, irqstackend
@@ -84,9 +85,9 @@ clear_bss_loop:
84 li t1, 0xdeadbeef 85 li t1, 0xdeadbeef
85 86
86stack_munge_loop: 87stack_munge_loop:
87 sw t1, 0(t0)
88 bne t0, sp, stack_munge_loop
89 addiu t0, 4 88 addiu t0, 4
89 bne t0, sp, stack_munge_loop
90 sw t1, -4(t0)
90 91
91 # jump to C code with enabled interrupts 92 # jump to C code with enabled interrupts
92 la t0, main 93 la t0, main