diff options
author | Josh Blum <josh@joshknows.com> | 2010-12-22 19:11:45 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-12-22 19:11:45 -0800 |
commit | 71fc99d006f2347a356c5339905593f64ff902ec (patch) | |
tree | 36c141adca7a2e5cf2f84660b5a2e3543f1dfaba /firmware/microblaze/lib/pic.c | |
parent | 434ee07c4ba1ce9faee8ecf3a309042ca424cbda (diff) | |
download | uhd-71fc99d006f2347a356c5339905593f64ff902ec.tar.gz uhd-71fc99d006f2347a356c5339905593f64ff902ec.tar.bz2 uhd-71fc99d006f2347a356c5339905593f64ff902ec.zip |
usrp2: got fw working on usrp2+nseries (crosses fingers)
The abort issue seemed to be cause by the listeners table not being initialized.
Also gave the pic handler the initialization works to be consistent but not needed as it was static initialized.
And finally, doubly set the packet router handshake ctrl before entering the claim calls (seemed to fix the lockup, perhaps a bad init state?)
Diffstat (limited to 'firmware/microblaze/lib/pic.c')
-rw-r--r-- | firmware/microblaze/lib/pic.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/firmware/microblaze/lib/pic.c b/firmware/microblaze/lib/pic.c index b8beda311..bd627ce6b 100644 --- a/firmware/microblaze/lib/pic.c +++ b/firmware/microblaze/lib/pic.c @@ -26,17 +26,7 @@ /* * Our secondary interrupt vector. */ -irq_handler_t pic_vector[NVECTORS] = { - nop_handler, - nop_handler, - nop_handler, - nop_handler, - nop_handler, - nop_handler, - nop_handler, - nop_handler -}; - +irq_handler_t pic_vector[NVECTORS]; void pic_init(void) @@ -47,6 +37,10 @@ pic_init(void) pic_regs->edge_enable = PIC_ONETIME_INT | PIC_UNDERRUN_INT | PIC_OVERRUN_INT | PIC_PPS_INT; pic_regs->polarity = ~0 & ~PIC_PHY_INT; // rising edge pic_regs->pending = ~0; // clear all pending ints + + for (int i = 0; i < NVECTORS; i++){ + pic_vector[i] = pic_nop_handler; + } } /* @@ -89,7 +83,7 @@ pic_register_handler(unsigned irq, irq_handler_t handler) } void -nop_handler(unsigned irq) +pic_nop_handler(unsigned irq) { // nop } |