summaryrefslogtreecommitdiff
path: root/drivers/net/can/c_can/c_can.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-04-11 08:13:15 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-04-24 22:08:57 +0200
commitfa39b54ccf28a0a85256f04881297cd75b8ef204 (patch)
tree6e98a32816a07adfa875f9a9acb8d241221b5634 /drivers/net/can/c_can/c_can.h
parentb9011aae9389c8853c1ccc2236f500a6e648c525 (diff)
can: c_can: Get rid of pointless interrupts
The driver handles pointlessly TWO interrupts per packet. The reason is that it enables the status interrupt which fires for each rx and tx packet and it enables the per message object interrupts as well. The status interrupt merily acks or in case of D_CAN ignores the TX/RX state and then the message object interrupt fires. The message objects interrupts are only useful if all message objects have hardware filters activated. But we don't have that and its not simple to implement in that driver without rewriting it completely. So we can ditch the message object interrupts and handle the RX/TX right away from the status interrupt. Instead of TWO we handle ONE. Note: We must keep the TXIE/RXIE bits in the message buffers because the status interrupt alone is not reliable enough in corner cases. If we ever have the need for HW filtering, then this code needs a complete overhaul and we can think about it then. For now we prefer a lower interrupt load. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/c_can/c_can.h')
-rw-r--r--drivers/net/can/c_can/c_can.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h
index faa8404162b3..cd91960ce92c 100644
--- a/drivers/net/can/c_can/c_can.h
+++ b/drivers/net/can/c_can/c_can.h
@@ -185,7 +185,6 @@ struct c_can_priv {
struct device *device;
spinlock_t xmit_lock;
int tx_object;
- int current_status;
int last_status;
u16 (*read_reg) (struct c_can_priv *priv, enum reg index);
void (*write_reg) (struct c_can_priv *priv, enum reg index, u16 val);
@@ -195,11 +194,11 @@ struct c_can_priv {
unsigned int tx_next;
unsigned int tx_echo;
void *priv; /* for board-specific data */
- u16 irqstatus;
enum c_can_dev_id type;
u32 __iomem *raminit_ctrlreg;
unsigned int instance;
void (*raminit) (const struct c_can_priv *priv, bool enable);
+ u32 rxmasked;
u32 dlc[C_CAN_MSG_OBJ_TX_NUM];
};