]> rtime.felk.cvut.cz Git - lincan.git/commitdiff
Added CAN chip specific irq_accept routine for fast interrupt acknowledge.
authorppisa <ppisa>
Thu, 3 Feb 2005 15:38:46 +0000 (15:38 +0000)
committerppisa <ppisa>
Thu, 3 Feb 2005 15:38:46 +0000 (15:38 +0000)
Required to prepare space for solution of problem with multiple VME Unican
cards used with RT-Linux enabled LinCAN driver.

lincan/include/can_queue.h
lincan/include/main.h
lincan/src/c_can.c
lincan/src/i82527.c
lincan/src/setup.c
lincan/src/sja1000.c
lincan/src/sja1000p.c
lincan/src/unican.c
lincan/src/unican_vme.c
lincan/src/virtual.c

index 859334629b3f96d5f3ab3beca0a51cc490a20f9d..42eeef4bae5c7f5d7862fed3d938a6d17caefaa4 100644 (file)
@@ -545,7 +545,7 @@ void canque_edge_do_dead(struct canque_edge_t *edge);
 
 /**
  * canque_edge_incref - increments edge reference count
 
 /**
  * canque_edge_incref - increments edge reference count
- * @qedg: pointer to the edge structure
+ * @edge: pointer to the edge structure
  */
 static inline
 void canque_edge_incref(struct canque_edge_t *edge)
  */
 static inline
 void canque_edge_incref(struct canque_edge_t *edge)
@@ -599,7 +599,7 @@ void __canque_edge_decref_body(struct canque_edge_t *edge)
 #ifndef CAN_HAVE_ARCH_CMPXCHG
 /**
  * canque_edge_decref - decrements edge reference count
 #ifndef CAN_HAVE_ARCH_CMPXCHG
 /**
  * canque_edge_decref - decrements edge reference count
- * @qedg: pointer to the edge structure
+ * @edge: pointer to the edge structure
  *
  * This function has to be called without lock held for both ends of edge.
  * If reference count drops to 0, function canque_edge_do_dead()
  *
  * This function has to be called without lock held for both ends of edge.
  * If reference count drops to 0, function canque_edge_do_dead()
index 0a12ffe2a0bd4da961618b7c73374e2553ebb070..be2534beb22a9744fc5ed684bc17601786682ca8 100644 (file)
@@ -323,6 +323,7 @@ struct hwspecops_t {
  * @start_chip: starts chip message processing
  * @stop_chip: stops chip message processing
  * @irq_handler: interrupt service routine
  * @start_chip: starts chip message processing
  * @stop_chip: stops chip message processing
  * @irq_handler: interrupt service routine
+ * @irq_accept: optional fast irq accept routine responsible for blocking further interrupts
  */
 struct chipspecops_t {
        int (*chip_config)(struct canchip_t *chip);
  */
 struct chipspecops_t {
        int (*chip_config)(struct canchip_t *chip);
@@ -352,6 +353,7 @@ struct chipspecops_t {
        int (*start_chip)(struct canchip_t *chip);
        int (*stop_chip)(struct canchip_t *chip);
        int (*irq_handler)(int irq, struct canchip_t *chip);
        int (*start_chip)(struct canchip_t *chip);
        int (*stop_chip)(struct canchip_t *chip);
        int (*irq_handler)(int irq, struct canchip_t *chip);
+       int (*irq_accept)(int irq, struct canchip_t *chip);
 };
 
 struct mem_addr {
 };
 
 struct mem_addr {
index 94456bb08f309ae677857b711b81df72278d8c22..0efc91fcb538b42204a0549d694fff01f6cb0e60 100644 (file)
@@ -909,6 +909,7 @@ int c_can_register(struct chipspecops_t *chipspecops)
        chipspecops->start_chip=c_can_start_chip;
        chipspecops->stop_chip=c_can_stop_chip;
        chipspecops->irq_handler=c_can_irq_handler;
        chipspecops->start_chip=c_can_start_chip;
        chipspecops->stop_chip=c_can_stop_chip;
        chipspecops->irq_handler=c_can_irq_handler;
+       chipspecops->irq_accept = NULL;
        return 0;
 }
 
        return 0;
 }
 
index 66bdc553cd1918ae136c7c9901641289f874c5d3..7834c1bc8b35ad7cb40dcf52ee8138b7b7987064 100644 (file)
@@ -755,6 +755,7 @@ int i82527_register(struct chipspecops_t *chipspecops)
        chipspecops->start_chip = i82527_start_chip;
        chipspecops->stop_chip = i82527_stop_chip;
        chipspecops->irq_handler = i82527_irq_handler;
        chipspecops->start_chip = i82527_start_chip;
        chipspecops->stop_chip = i82527_stop_chip;
        chipspecops->irq_handler = i82527_irq_handler;
+       chipspecops->irq_accept = NULL;
        return 0;
 }
 
        return 0;
 }
 
index 9c4af7669dce09e11cd66fc8bc5b45a3c4f5120a..167ec2bfbd142894b9c488d00148eaf2c69b638b 100644 (file)
@@ -568,6 +568,16 @@ int init_hwspecops(struct candevice_t *candev, int *irqnum_p)
 
 #ifndef CAN_WITH_RTL
 
 
 #ifndef CAN_WITH_RTL
 
+/**
+ * can_default_irq_dispatch - the first level interrupt dispatch handler
+ * @irq: interrupt vector number, this value is system specific
+ * @dev_id: driver private pointer registered at time of request_irq() call.
+ *     The CAN driver uses this pointer to store relationship of interrupt
+ *     to chip state structure - @struct canchip_t
+ * @regs: system dependent value pointing to registers stored in exception frame
+ * 
+ * File: src/setup.c
+ */
 can_irqreturn_t can_default_irq_dispatch(int irq, void *dev_id, struct pt_regs *regs)
 {
        int retval;
 can_irqreturn_t can_default_irq_dispatch(int irq, void *dev_id, struct pt_regs *regs)
 {
        int retval;
index 127c45362dd226b6e8ddef9b4f41ac44e3113977..d43de2f176622cccb03281359f0d9840925803f6 100644 (file)
@@ -500,6 +500,7 @@ int sja1000_register(struct chipspecops_t *chipspecops)
        chipspecops->start_chip = sja1000_start_chip;
        chipspecops->stop_chip = sja1000_stop_chip;
        chipspecops->irq_handler = sja1000_irq_handler;
        chipspecops->start_chip = sja1000_start_chip;
        chipspecops->stop_chip = sja1000_stop_chip;
        chipspecops->irq_handler = sja1000_irq_handler;
+       chipspecops->irq_handler = NULL;
        return 0;
 }
 
        return 0;
 }
 
index 5deedc617d048edea6fa4edf754464ff908397c3..70a99c4094e5fb5fc6c1db5d6a900fc84fb4e342 100644 (file)
@@ -599,10 +599,7 @@ void sja1000p_irq_write_handler(struct canchip_t *chip, struct msgobj_t *obj)
 /**
  * sja1000p_irq_handler: - interrupt service routine
  * @irq: interrupt vector number, this value is system specific
 /**
  * sja1000p_irq_handler: - interrupt service routine
  * @irq: interrupt vector number, this value is system specific
- * @dev_id: driver private pointer registered at time of request_irq() call.
- *     The CAN driver uses this pointer to store relationship of interrupt
- *     to chip state structure - @struct canchip_t
- * @regs: system dependent value pointing to registers stored in exception frame
+ * @chip: pointer to chip state structure
  * 
  * Interrupt handler is activated when state of CAN controller chip changes,
  * there is message to be read or there is more space for new messages or
  * 
  * Interrupt handler is activated when state of CAN controller chip changes,
  * there is message to be read or there is more space for new messages or
@@ -753,6 +750,7 @@ int sja1000p_register(struct chipspecops_t *chipspecops)
        chipspecops->start_chip=sja1000p_start_chip;
        chipspecops->stop_chip=sja1000p_stop_chip;
        chipspecops->irq_handler=sja1000p_irq_handler;
        chipspecops->start_chip=sja1000p_start_chip;
        chipspecops->stop_chip=sja1000p_stop_chip;
        chipspecops->irq_handler=sja1000p_irq_handler;
+       chipspecops->irq_accept=NULL;
        return 0;
 }
 
        return 0;
 }
 
index d93063ab7e92bceb4f668852b08e8b259407ffb7..4efabc874e98ef4be97510e1effc2f184fd08b93 100644 (file)
@@ -797,6 +797,7 @@ int unican_init_chip_data(struct candevice_t *candev, int chipnr)
        chip->chipspecops->start_chip=unican_start_chip;
        chip->chipspecops->stop_chip=unican_stop_chip;
        chip->chipspecops->irq_handler=unican_irq_handler;
        chip->chipspecops->start_chip=unican_start_chip;
        chip->chipspecops->stop_chip=unican_stop_chip;
        chip->chipspecops->irq_handler=unican_irq_handler;
+       chip->chipspecops->irq_accept=NULL;
 
        return 0;
 }
 
        return 0;
 }
index a4f9c05eaaef96147c6021c88bcdbf7251de693e..e69694c4ff92accd14b171f6e636478c181c93e8 100644 (file)
@@ -46,7 +46,7 @@ int unican_vme_init_chip_data(struct candevice_t *candev, int chipnr)
        unican_init_chip_data(candev, chipnr);
 
        chip->flags |= CHIP_IRQ_VME;
        unican_init_chip_data(candev, chipnr);
 
        chip->flags |= CHIP_IRQ_VME;
-       chip->chipspecops->irq_handler=unican_irq_handler;
+       /*chip->chipspecops->irq_handler=unican_irq_handler;*/
        return 0;
 }
 
        return 0;
 }
 
index 1281885b29938caf79e3377735c84c9da488729c..3b300a992813f8bf46c182ecac2b320f4c9a97cd 100644 (file)
@@ -477,6 +477,7 @@ int virtual_init_chip_data(struct candevice_t *candev, int chipnr)
        chip->chipspecops->start_chip=virtual_start_chip;
        chip->chipspecops->stop_chip=virtual_stop_chip;
        chip->chipspecops->irq_handler=NULL;
        chip->chipspecops->start_chip=virtual_start_chip;
        chip->chipspecops->stop_chip=virtual_stop_chip;
        chip->chipspecops->irq_handler=NULL;
+       chip->chipspecops->irq_accept=NULL;
 
        return 0;
 }
 
        return 0;
 }