-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw-mgmt: kernel: patches: Update BF3 patches for kernel version 6.1
Required to add support for kernel versions 6.1.90 and 6.1.94 Signed-off-by: Felix Radensky <[email protected]>
- Loading branch information
1 parent
55e55d4
commit 6f67298
Showing
36 changed files
with
946 additions
and
2,701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
From aa410417368e3141e96e5331c1353b0e9dcf60fa Mon Sep 17 00:00:00 2001 | ||
From 443a0a0f0cf4f432c7af6654b7f2f920d411d379 Mon Sep 17 00:00:00 2001 | ||
From: Andy Shevchenko <[email protected]> | ||
Date: Mon, 19 Dec 2022 14:42:33 +0200 | ||
Subject: [PATCH backport 6.1.42 61/85] pinctrl: Introduce struct pinfunction | ||
and PINCTRL_PINFUNCTION() macro | ||
|
||
BugLink: https://bugs.launchpad.net/bugs/2012743 | ||
Subject: [PATCH] pinctrl: Introduce struct pinfunction and | ||
PINCTRL_PINFUNCTION() macro | ||
|
||
There are many pin control drivers define their own data type for | ||
pin function representation which is the same or embed the same data | ||
|
@@ -14,17 +12,12 @@ for all pin control drivers. | |
Signed-off-by: Andy Shevchenko <[email protected]> | ||
Reviewed-by: Linus Walleij <[email protected]> | ||
Acked-by: Mika Westerberg <[email protected]> | ||
(cherry picked from commit 443a0a0f0cf4f432c7af6654b7f2f920d411d379) | ||
Signed-off-by: Asmaa Mnebhi <[email protected]> | ||
Acked-by: Tim Gardner <[email protected]> | ||
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> | ||
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> | ||
--- | ||
include/linux/pinctrl/pinctrl.h | 20 ++++++++++++++++++++ | ||
1 file changed, 20 insertions(+) | ||
|
||
diff --git a/include/linux/pinctrl/pinctrl.h b/include/linux/pinctrl/pinctrl.h | ||
index 487117ccb1bc..fb25085d0922 100644 | ||
index a0d39b303431..4d252ea00ed1 100644 | ||
--- a/include/linux/pinctrl/pinctrl.h | ||
+++ b/include/linux/pinctrl/pinctrl.h | ||
@@ -206,6 +206,26 @@ extern int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, | ||
|
@@ -55,5 +48,5 @@ index 487117ccb1bc..fb25085d0922 100644 | |
extern struct pinctrl_dev *of_pinctrl_get(struct device_node *np); | ||
#else | ||
-- | ||
2.20.1 | ||
2.44.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
From 1f79825ac209a5aac6e13c87903a6506a5b78565 Mon Sep 17 00:00:00 2001 | ||
From d11f932808dc689717e409bbc81b5093e7902fc9 Mon Sep 17 00:00:00 2001 | ||
From: Asmaa Mnebhi <[email protected]> | ||
Date: Wed, 15 Mar 2023 17:50:27 -0400 | ||
Subject: [PATCH backport 6.1.42 62/85] pinctrl: mlxbf3: Add pinctrl driver | ||
support | ||
|
||
BugLink: https://bugs.launchpad.net/bugs/2012743 | ||
Subject: [PATCH] pinctrl: mlxbf3: Add pinctrl driver support | ||
|
||
NVIDIA BlueField-3 SoC has a few pins that can be used as GPIOs | ||
or take the default hardware functionality. Add a driver for | ||
|
@@ -14,11 +11,6 @@ Signed-off-by: Asmaa Mnebhi <[email protected]> | |
Reviewed-by: Andy Shevchenko <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
Signed-off-by: Linus Walleij <[email protected]> | ||
(cherry picked from commit d11f932808dc689717e409bbc81b5093e7902fc9 linux-next) | ||
Signed-off-by: Asmaa Mnebhi <[email protected]> | ||
Acked-by: Tim Gardner <[email protected]> | ||
Acked-by: Bartlomiej Zolnierkiewicz <[email protected]> | ||
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]> | ||
--- | ||
drivers/pinctrl/Kconfig | 13 ++ | ||
drivers/pinctrl/Makefile | 1 + | ||
|
@@ -27,10 +19,10 @@ Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected] | |
create mode 100644 drivers/pinctrl/pinctrl-mlxbf3.c | ||
|
||
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig | ||
index f71fefff400f..92e97d5bf91f 100644 | ||
index e2a24d668e41..fc6e2858c90c 100644 | ||
--- a/drivers/pinctrl/Kconfig | ||
+++ b/drivers/pinctrl/Kconfig | ||
@@ -512,6 +512,19 @@ config PINCTRL_ZYNQMP | ||
@@ -523,6 +523,19 @@ config PINCTRL_ZYNQMP | ||
This driver can also be built as a module. If so, the module | ||
will be called pinctrl-zynqmp. | ||
|
||
|
@@ -51,17 +43,17 @@ index f71fefff400f..92e97d5bf91f 100644 | |
source "drivers/pinctrl/aspeed/Kconfig" | ||
source "drivers/pinctrl/bcm/Kconfig" | ||
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile | ||
index 89bfa01b5231..89fda1b780b7 100644 | ||
index 413b1e6b6933..930307e248c5 100644 | ||
--- a/drivers/pinctrl/Makefile | ||
+++ b/drivers/pinctrl/Makefile | ||
@@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_MCP23S08_SPI) += pinctrl-mcp23s08_spi.o | ||
@@ -36,6 +36,7 @@ obj-$(CONFIG_PINCTRL_MCP23S08_I2C) += pinctrl-mcp23s08_i2c.o | ||
obj-$(CONFIG_PINCTRL_MCP23S08_SPI) += pinctrl-mcp23s08_spi.o | ||
obj-$(CONFIG_PINCTRL_MCP23S08) += pinctrl-mcp23s08.o | ||
obj-$(CONFIG_PINCTRL_MICROCHIP_SGPIO) += pinctrl-microchip-sgpio.o | ||
obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o | ||
+obj-$(CONFIG_PINCTRL_MLXBF3) += pinctrl-mlxbf3.o | ||
obj-$(CONFIG_PINCTRL_OCELOT) += pinctrl-ocelot.o | ||
obj-$(CONFIG_PINCTRL_OXNAS) += pinctrl-oxnas.o | ||
obj-$(CONFIG_PINCTRL_PALMAS) += pinctrl-palmas.o | ||
obj-$(CONFIG_PINCTRL_PIC32) += pinctrl-pic32.o | ||
diff --git a/drivers/pinctrl/pinctrl-mlxbf3.c b/drivers/pinctrl/pinctrl-mlxbf3.c | ||
new file mode 100644 | ||
index 000000000000..3698f7bbd88d | ||
|
@@ -389,5 +381,5 @@ index 000000000000..3698f7bbd88d | |
+MODULE_AUTHOR("Asmaa Mnebhi <[email protected]>"); | ||
+MODULE_LICENSE("Dual BSD/GPL"); | ||
-- | ||
2.20.1 | ||
2.44.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
From 00cba650c86f494b4a5905d89d304fef2380b0b7 Mon Sep 17 00:00:00 2001 | ||
From 743d3336029ffe2bb38e982a3b572ced243c6d43 Mon Sep 17 00:00:00 2001 | ||
From: Tom Rix <[email protected]> | ||
Date: Mon, 3 Apr 2023 20:45:01 -0400 | ||
Subject: [PATCH backport 6.1.42 2/2] pinctrl: mlxbf3: set varaiable | ||
mlxbf3_pmx_funcs storage-class-specifier to static | ||
Subject: [PATCH] pinctrl: mlxbf3: set varaiable mlxbf3_pmx_funcs | ||
storage-class-specifier to static | ||
|
||
smatch reports | ||
drivers/pinctrl/pinctrl-mlxbf3.c:162:20: warning: symbol | ||
|
@@ -31,5 +31,5 @@ index 3698f7bbd88d..d9944e6a0af9 100644 | |
PINCTRL_PINFUNCTION("gpiofunc", mlxbf3_gpiofunc_group_names, 1), | ||
}; | ||
-- | ||
2.25.1 | ||
2.44.0 | ||
|
65 changes: 65 additions & 0 deletions
65
recipes-kernel/linux/linux-6.1/0064-pinctrl-mlxbf3-Remove-gpio_disable_free.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From 69657e60b8a7faf83b583c658ec7ce1f5ece9eb3 Mon Sep 17 00:00:00 2001 | ||
From: Asmaa Mnebhi <[email protected]> | ||
Date: Fri, 18 Aug 2023 12:43:13 -0400 | ||
Subject: [PATCH] pinctrl: mlxbf3: Remove gpio_disable_free() | ||
|
||
Remove support for gpio_disable_free() because it is called when the libgpiod | ||
command "gpioset" is invoked. This gives the GPIO control back to hardware which | ||
cancels out the effort to set the GPIO value. | ||
|
||
Reminder of the code flow to change a GPIO value from software: | ||
1) All GPIOs are controlled by hardware by default | ||
2) To change the GPIO value, enable software control via a mux. | ||
3) Once software has control over the GPIO pin, the gpio-mlxbf3 driver | ||
will be able to change the direction and value of the GPIO. | ||
|
||
When the user runs "gpioset gpiochip0 0=0" for example, the gpio | ||
pin value should change from 1 to 0. In this case, mlxbf3_gpio_request_enable() | ||
is called via gpiochip_generic_request(). The latter switches GPIO control from | ||
hardware to software. Then the GPIO value is changed from 1 to 0. However, | ||
gpio_disable_free() is also called which changes control back to hardware | ||
which changes the GPIO value back to 1. | ||
|
||
Fixes: d11f932808dc ("pinctrl: mlxbf3: Add pinctrl driver support") | ||
Signed-off-by: Asmaa Mnebhi <[email protected]> | ||
Reviewed-by: Linus Walleij <[email protected]> | ||
Link: https://lore.kernel.org/r/[email protected] | ||
Signed-off-by: Linus Walleij <[email protected]> | ||
--- | ||
drivers/pinctrl/pinctrl-mlxbf3.c | 14 -------------- | ||
1 file changed, 14 deletions(-) | ||
|
||
diff --git a/drivers/pinctrl/pinctrl-mlxbf3.c b/drivers/pinctrl/pinctrl-mlxbf3.c | ||
index 903606b64d2f..7d1713824a89 100644 | ||
--- a/drivers/pinctrl/pinctrl-mlxbf3.c | ||
+++ b/drivers/pinctrl/pinctrl-mlxbf3.c | ||
@@ -223,26 +223,12 @@ static int mlxbf3_gpio_request_enable(struct pinctrl_dev *pctldev, | ||
return 0; | ||
} | ||
|
||
-static void mlxbf3_gpio_disable_free(struct pinctrl_dev *pctldev, | ||
- struct pinctrl_gpio_range *range, | ||
- unsigned int offset) | ||
-{ | ||
- struct mlxbf3_pinctrl *priv = pinctrl_dev_get_drvdata(pctldev); | ||
- | ||
- /* disable GPIO functionality by giving control back to hardware */ | ||
- if (offset < MLXBF3_NGPIOS_GPIO0) | ||
- writel(BIT(offset), priv->fw_ctrl_clr0); | ||
- else | ||
- writel(BIT(offset % MLXBF3_NGPIOS_GPIO0), priv->fw_ctrl_clr1); | ||
-} | ||
- | ||
static const struct pinmux_ops mlxbf3_pmx_ops = { | ||
.get_functions_count = mlxbf3_pmx_get_funcs_count, | ||
.get_function_name = mlxbf3_pmx_get_func_name, | ||
.get_function_groups = mlxbf3_pmx_get_groups, | ||
.set_mux = mlxbf3_pmx_set, | ||
.gpio_request_enable = mlxbf3_gpio_request_enable, | ||
- .gpio_disable_free = mlxbf3_gpio_disable_free, | ||
}; | ||
|
||
static struct pinctrl_desc mlxbf3_pin_desc = { | ||
-- | ||
2.44.0 | ||
|
Oops, something went wrong.