aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/bmips/patches-5.10/074-v5.13-pinctrl-bcm-bcm6362-fix-warning.patch44
-rw-r--r--target/linux/bmips/patches-5.10/075-v5.13-pinctrl-bcm63xx-Fix-dependencies.patch38
2 files changed, 82 insertions, 0 deletions
diff --git a/target/linux/bmips/patches-5.10/074-v5.13-pinctrl-bcm-bcm6362-fix-warning.patch b/target/linux/bmips/patches-5.10/074-v5.13-pinctrl-bcm-bcm6362-fix-warning.patch
new file mode 100644
index 0000000000..92da534af9
--- /dev/null
+++ b/target/linux/bmips/patches-5.10/074-v5.13-pinctrl-bcm-bcm6362-fix-warning.patch
@@ -0,0 +1,44 @@
+From 1978d88cdc8eb0986d36cac0e9541220fa71d87d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Tue, 30 Mar 2021 12:32:25 +0200
+Subject: [PATCH] pinctrl: bcm: bcm6362: fix warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The current implementation of bcm6362_set_gpio() produces the following
+warning on x86_64:
+drivers/pinctrl/bcm/pinctrl-bcm6362.c: In function 'bcm6362_set_gpio':
+drivers/pinctrl/bcm/pinctrl-bcm6362.c:503:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
+ 503 | (uint32_t) desc->drv_data, 0);
+ | ^
+
+Modify the code to make it similar to bcm63268_set_gpio() in order to fix
+the warning.
+
+Fixes: 705791e23ecd ("pinctrl: add a pincontrol driver for BCM6362")
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+Link: https://lore.kernel.org/r/20210330103225.3949-1-noltari@gmail.com
+Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+---
+ drivers/pinctrl/bcm/pinctrl-bcm6362.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/pinctrl/bcm/pinctrl-bcm6362.c
++++ b/drivers/pinctrl/bcm/pinctrl-bcm6362.c
+@@ -496,11 +496,11 @@ static int bcm6362_pinctrl_get_groups(st
+ static void bcm6362_set_gpio(struct bcm63xx_pinctrl *pc, unsigned pin)
+ {
+ const struct pinctrl_pin_desc *desc = &bcm6362_pins[pin];
++ unsigned int basemode = (uintptr_t)desc->drv_data;
+ unsigned int mask = bcm63xx_bank_pin(pin);
+
+- if (desc->drv_data)
+- regmap_update_bits(pc->regs, BCM6362_BASEMODE_REG,
+- (uint32_t) desc->drv_data, 0);
++ if (basemode)
++ regmap_update_bits(pc->regs, BCM6362_BASEMODE_REG, basemode, 0);
+
+ if (pin < BCM63XX_BANK_GPIOS) {
+ /* base mode 0 => gpio 1 => mux function */
diff --git a/target/linux/bmips/patches-5.10/075-v5.13-pinctrl-bcm63xx-Fix-dependencies.patch b/target/linux/bmips/patches-5.10/075-v5.13-pinctrl-bcm63xx-Fix-dependencies.patch
new file mode 100644
index 0000000000..bf27683438
--- /dev/null
+++ b/target/linux/bmips/patches-5.10/075-v5.13-pinctrl-bcm63xx-Fix-dependencies.patch
@@ -0,0 +1,38 @@
+From 26ea7ac92836ba616f75a1ab57e64ffc21da7758 Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij@linaro.org>
+Date: Wed, 31 Mar 2021 14:45:05 +0200
+Subject: [PATCH] pinctrl: bcm63xx: Fix dependencies
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add depends on OF so we don't get weird build errors on
+randconfig.
+
+Also order selects the same as the other drivers for
+pure aestetic reasons.
+
+Reported-by: Randy Dunlap <rdunlap@infradead.org>
+Cc: Álvaro Fernández Rojas <noltari@gmail.com>
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+---
+ drivers/pinctrl/bcm/Kconfig | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/pinctrl/bcm/Kconfig
++++ b/drivers/pinctrl/bcm/Kconfig
+@@ -31,10 +31,12 @@ config PINCTRL_BCM2835
+
+ config PINCTRL_BCM63XX
+ bool
++ depends on OF
++ select PINMUX
++ select PINCONF
+ select GENERIC_PINCONF
++ select GPIOLIB
+ select GPIO_REGMAP
+- select PINCONF
+- select PINMUX
+
+ config PINCTRL_BCM6318
+ bool "Broadcom BCM6318 GPIO driver"