]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/src/c_can_irq.c
Merge: C_CAN changes
[lincan.git] / lincan / src / c_can_irq.c
index eb03ac8f440f680a0f869bf75a8b7236b6b962fc..72ac0b5154cfb52435611ff34f64f47e5cebd753 100644 (file)
@@ -163,8 +163,6 @@ inline void c_can_irq_read_handler( struct canchip_t *pchip,
                pchip->stat.cntRxData += pmsgobj->rx_msg.length;
            #endif /*CAN_WITH_STATISTICS*/
 
-               spin_unlock( &c_can_sprlock );
-
                // Check if new data arrived
                if (c_can_if1_busycheck(pchip)) ;
                c_can_write_reg_w(pchip, readMaskCM, CCIF1CM);
@@ -214,7 +212,7 @@ void c_can_irq_sync_activities(struct canchip_t *chip, struct msgobj_t *obj)
 // c_can_irq_handler
 //
 
-int c_can_irq_handler(int irq, struct canchip_t *chip)
+int c_can_irq_handler(int irq, struct canchip_t *pchip)
 {
        struct rtr_id *rtr_search = hardware_p->rtr_queue;
        u16 chip_status;
@@ -223,15 +221,7 @@ int c_can_irq_handler(int irq, struct canchip_t *chip)
        u16 irqreg = 0;
        u32 msgid = 0;
        u16 tempCntlReg = 0;
-       //#ifdef CAN_DEBUG
-       // u32 intCntrVAddr = 0;
-       //#endif
-       //unsigned short flags = 0;
 
-       //if (pchip->ntype != CAN_CHIPTYPE_C_CAN)       {
-       //      DEBUGMSG("\n(c%d)IRQ not for c_can_irq_handler(...)\n", pchip->chip_idx);
-       //      return;
-       //}
 
        irqreg = c_can_read_reg_w( pchip, CCINTR );
 
@@ -253,28 +243,6 @@ int c_can_irq_handler(int irq, struct canchip_t *chip)
        c_can_registerdump(pchip);
     #endif
 
-/*
-#ifdef CAN_DEBUG
-       if ( (!( intCntrVAddr = (u32)ioremap( 0x80024000, 0xCD ) ))) {
-               DEBUGMSG("Failed to map Interrupt Controller IO-memory\n");
-       }
-       else {
-
-   DEBUGMSG( "Mapped Interrupt Controller IO-memory: 0x%lx - 0x%lx to 0x%lx\n",
-               (unsigned long)0X80024000,
-             (unsigned long)0X800240CC,
-             (unsigned long)intCntrVAddr);
-       }
-
-       DEBUGMSG("Current Interrupt Status Register (ISR): 0x%4.4lx\n",
-                               (long)readl(intCntrVAddr + 4));
-       DEBUGMSG("Current Interrupt ID: %d\n",
-                               (int)(readl(intCntrVAddr + 0x90) & 0xF));
-       iounmap( (void*)intCntrVAddr);
-       DEBUGMSG( "Unmapped Interrupt Controller IO-memory: 0x%lx\n",
-             (unsigned long)intCntrVAddr);
-#endif
-*/
        while ( irqreg ){
                // Handle change in status register