can: mcp251x: optimize 2515, rx int gets cleared automatically
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Wolfgang Grandegger <wg@grandegger.com>
This commit is contained in:
parent
beab675cb4
commit
9c473fc339
1 changed files with 9 additions and 4 deletions
|
@ -793,15 +793,20 @@ static irqreturn_t mcp251x_can_ist(int irq, void *dev_id)
|
||||||
/* receive buffer 0 */
|
/* receive buffer 0 */
|
||||||
if (intf & CANINTF_RX0IF) {
|
if (intf & CANINTF_RX0IF) {
|
||||||
mcp251x_hw_rx(spi, 0);
|
mcp251x_hw_rx(spi, 0);
|
||||||
/* Free one buffer ASAP */
|
/*
|
||||||
mcp251x_write_bits(spi, CANINTF, intf & CANINTF_RX0IF,
|
* Free one buffer ASAP
|
||||||
0x00);
|
* (The MCP2515 does this automatically.)
|
||||||
|
*/
|
||||||
|
if (mcp251x_is_2510(spi))
|
||||||
|
mcp251x_write_bits(spi, CANINTF, CANINTF_RX0IF, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* receive buffer 1 */
|
/* receive buffer 1 */
|
||||||
if (intf & CANINTF_RX1IF) {
|
if (intf & CANINTF_RX1IF) {
|
||||||
mcp251x_hw_rx(spi, 1);
|
mcp251x_hw_rx(spi, 1);
|
||||||
clear_intf |= CANINTF_RX1IF;
|
/* the MCP2515 does this automatically */
|
||||||
|
if (mcp251x_is_2510(spi))
|
||||||
|
clear_intf |= CANINTF_RX1IF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* any error or tx interrupt we need to clear? */
|
/* any error or tx interrupt we need to clear? */
|
||||||
|
|
Loading…
Add table
Reference in a new issue