aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 10:54:34 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 19:07:07 +0200
commit8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch)
tree1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch
parent33b6885975ce376ff075362b7f0890326043111b (diff)
downloadupstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch b/target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch
new file mode 100644
index 0000000000..0d4573430e
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.10/950-0595-spi-bcm2835-Increase-the-CS-limit-to-24.patch
@@ -0,0 +1,38 @@
+From c3fbb1e6771dabb14571552c036a049ffa470eb1 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil@raspberrypi.com>
+Date: Fri, 30 Apr 2021 08:34:36 +0100
+Subject: [PATCH] spi: bcm2835: Increase the CS limit to 24
+
+Increase the maximum number of CS lines to 24, and ensure this limit is
+not exceeded.
+
+See: https://github.com/raspberrypi/linux/pull/4281
+
+Suggested-by: Joe Burmeister <joe.burmeister@devtank.co.uk>
+Signed-off-by: Phil Elwell <phil@raspberrypi.com>
+---
+ drivers/spi/spi-bcm2835.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/spi/spi-bcm2835.c
++++ b/drivers/spi/spi-bcm2835.c
+@@ -28,6 +28,7 @@
+ #include <linux/gpio/consumer.h>
+ #include <linux/gpio/machine.h> /* FIXME: using chip internals */
+ #include <linux/gpio/driver.h> /* FIXME: using chip internals */
++#include <linux/of_gpio.h>
+ #include <linux/of_irq.h>
+ #include <linux/spi/spi.h>
+
+@@ -1299,6 +1300,11 @@ static int bcm2835_spi_probe(struct plat
+ struct bcm2835_spi *bs;
+ int err;
+
++ if (of_gpio_named_count(pdev->dev.of_node, "cs-gpios") >
++ BCM2835_SPI_NUM_CS)
++ return dev_err_probe(&pdev->dev, -EINVAL,
++ "too many chip selects\n");
++
+ ctlr = devm_spi_alloc_master(&pdev->dev, ALIGN(sizeof(*bs),
+ dma_get_cache_alignment()));
+ if (!ctlr)