Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - i.mx6 network driver with InterruptLock() ???: Page 1 of 6 (6 Items)
   
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;
}