diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-06-02 20:33:31 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-12 06:12:01 -0400 |
commit | 685a694f0653b7db49f663b2cd6953695214fb30 (patch) | |
tree | 2b75af85e5be0f32d521e66c12a9412ea55fb5c4 /arch/blackfin | |
parent | f1db88d2a7f1c92284e64f5dbb5c7a316a22576d (diff) |
Blackfin: convert early_printk EVT init to a loop
The EVT registers are all contiguous in the memory map, so using a loop to
initialize them all rather than hardcoding the list results in much better
generated code (a hardware loop rather than a whole bunch of individual
loads).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/early_printk.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c index c8ad051742e2..3302719173ca 100644 --- a/arch/blackfin/kernel/early_printk.c +++ b/arch/blackfin/kernel/early_printk.c | |||
@@ -178,25 +178,15 @@ int __init setup_early_printk(char *buf) | |||
178 | 178 | ||
179 | asmlinkage void __init init_early_exception_vectors(void) | 179 | asmlinkage void __init init_early_exception_vectors(void) |
180 | { | 180 | { |
181 | u32 evt; | ||
181 | SSYNC(); | 182 | SSYNC(); |
182 | 183 | ||
183 | /* cannot program in software: | 184 | /* cannot program in software: |
184 | * evt0 - emulation (jtag) | 185 | * evt0 - emulation (jtag) |
185 | * evt1 - reset | 186 | * evt1 - reset |
186 | */ | 187 | */ |
187 | bfin_write_EVT2(early_trap); | 188 | for (evt = EVT2; evt <= EVT15; evt += 4) |
188 | bfin_write_EVT3(early_trap); | 189 | bfin_write32(evt, early_trap); |
189 | bfin_write_EVT5(early_trap); | ||
190 | bfin_write_EVT6(early_trap); | ||
191 | bfin_write_EVT7(early_trap); | ||
192 | bfin_write_EVT8(early_trap); | ||
193 | bfin_write_EVT9(early_trap); | ||
194 | bfin_write_EVT10(early_trap); | ||
195 | bfin_write_EVT11(early_trap); | ||
196 | bfin_write_EVT12(early_trap); | ||
197 | bfin_write_EVT13(early_trap); | ||
198 | bfin_write_EVT14(early_trap); | ||
199 | bfin_write_EVT15(early_trap); | ||
200 | CSYNC(); | 190 | CSYNC(); |
201 | 191 | ||
202 | /* Set all the return from interrupt, exception, NMI to a known place | 192 | /* Set all the return from interrupt, exception, NMI to a known place |