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>
This commit is contained in:
Mike Frysinger 2009-06-03 00:33:31 +00:00
parent f1db88d2a7
commit 685a694f06
1 changed files with 3 additions and 13 deletions
arch/blackfin/kernel

View File

@ -178,25 +178,15 @@ int __init setup_early_printk(char *buf)
asmlinkage void __init init_early_exception_vectors(void) asmlinkage void __init init_early_exception_vectors(void)
{ {
u32 evt;
SSYNC(); SSYNC();
/* cannot program in software: /* cannot program in software:
* evt0 - emulation (jtag) * evt0 - emulation (jtag)
* evt1 - reset * evt1 - reset
*/ */
bfin_write_EVT2(early_trap); for (evt = EVT2; evt <= EVT15; evt += 4)
bfin_write_EVT3(early_trap); bfin_write32(evt, early_trap);
bfin_write_EVT5(early_trap);
bfin_write_EVT6(early_trap);
bfin_write_EVT7(early_trap);
bfin_write_EVT8(early_trap);
bfin_write_EVT9(early_trap);
bfin_write_EVT10(early_trap);
bfin_write_EVT11(early_trap);
bfin_write_EVT12(early_trap);
bfin_write_EVT13(early_trap);
bfin_write_EVT14(early_trap);
bfin_write_EVT15(early_trap);
CSYNC(); CSYNC();
/* Set all the return from interrupt, exception, NMI to a known place /* Set all the return from interrupt, exception, NMI to a known place