From 42954857190b9df16d9d873ecc7f6cc38e013e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Tue, 9 Jul 2019 20:32:28 +0200 Subject: brcm2708: add linux 4.19 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Boot tested on Raspberry Pi B+ (BCM2708) and Raspberry Pi 2 (BCM2709) Signed-off-by: Álvaro Fernández Rojas --- ...4-mcp2515-Use-DT-supplied-interrupt-flags.patch | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 target/linux/brcm2708/patches-4.19/950-0104-mcp2515-Use-DT-supplied-interrupt-flags.patch (limited to 'target/linux/brcm2708/patches-4.19/950-0104-mcp2515-Use-DT-supplied-interrupt-flags.patch') diff --git a/target/linux/brcm2708/patches-4.19/950-0104-mcp2515-Use-DT-supplied-interrupt-flags.patch b/target/linux/brcm2708/patches-4.19/950-0104-mcp2515-Use-DT-supplied-interrupt-flags.patch new file mode 100644 index 0000000000..14fe567977 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0104-mcp2515-Use-DT-supplied-interrupt-flags.patch @@ -0,0 +1,36 @@ +From a3ba7e3519d3dce17a0224b552fb88b7728f7061 Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Tue, 14 Nov 2017 11:03:22 +0000 +Subject: [PATCH 104/703] mcp2515: Use DT-supplied interrupt flags + +The MCP2515 datasheet clearly describes a level-triggered interrupt +pin. Therefore the receiving interrupt controller must also be +configured for level-triggered operation otherwise there is a danger +of a missed interrupt condition blocking all subsequent interrupts. +The ONESHOT flag ensures that the interrupt is masked until the +threaded interrupt handler exits. + +Rather than change the flags globally (they must have worked for at +least one user), allow the flags to be overridden from Device Tree +in the event that the device has a DT node. + +See: https://github.com/raspberrypi/linux/issues/2175 + https://github.com/raspberrypi/linux/issues/2263 + +Signed-off-by: Phil Elwell +--- + drivers/net/can/spi/mcp251x.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/can/spi/mcp251x.c ++++ b/drivers/net/can/spi/mcp251x.c +@@ -951,6 +951,9 @@ static int mcp251x_open(struct net_devic + priv->tx_skb = NULL; + priv->tx_len = 0; + ++ if (spi->dev.of_node) ++ flags = 0; ++ + ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist, + flags | IRQF_ONESHOT, DEVICE_NAME, priv); + if (ret) { -- cgit v1.2.3