Michael Tasche
|
i.mx6 network driver with InterruptLock() ???
|
Michael Tasche
03/10/2014 7:23 AM
post109296
|
i.mx6 network driver with InterruptLock() ???
Hi,
I was looking at the latest changes, to merge any bugfixes to our BSP-Tree.
Can somebody remove this buggy Interrupt spinlocks, please?
Regards
Michwel
//
// all three hardware interrupt sources are handled here
//
int
mx6q_process_interrupt(void *arg, struct nw_work_thread *wtp)
{
mx6q_dev_t *mx6q = arg;
uint32_t *base = mx6q->reg;
uint32_t ievent;
InterruptLock(&mx6q->spinner);
for (;;) {
// read interrupt cause bits
ievent = *(base + MX6Q_IEVENT);
if (mx6q->cfg.verbose > 6) {
log(LOG_ERR, "%s(): ievent 0x%X\n", __FUNCTION__, ievent);
}
if (!ievent) {
break;
}
*(base + MX6Q_IEVENT) = ievent;
if ((ievent & (IEVENT_RFINT | IEVENT_RXB)) != 0) {
mx6q_receive(mx6q, wtp);
}
if ((ievent & IEVENT_TS_AVAIL) != 0) {
mx6q_transmit_complete(mx6q);
}
if ((ievent & IEVENT_TS_TIMER) != 0) {
mx6q->rtc++;
}
}
InterruptUnlock(&mx6q->spinner);
return 1;
}
|
|
|