All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE" failed to apply to 6.12-stable tree
@ 2025-12-29 14:34 gregkh
  2025-12-30  2:01 ` [PATCH 6.12.y] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE Xi Ruoyao
  0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2025-12-29 14:34 UTC (permalink / raw)
  To: xry111, bartosz.golaszewski, chenhuacai; +Cc: stable


The patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x dae9750105cf93ac1e156ef91f4beeb53bd64777
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2025122958-statue-subtotal-2f1c@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..

Possible dependencies:



thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From dae9750105cf93ac1e156ef91f4beeb53bd64777 Mon Sep 17 00:00:00 2001
From: Xi Ruoyao <xry111@xry111.site>
Date: Fri, 28 Nov 2025 15:50:32 +0800
Subject: [PATCH] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE

The manuals of 2K2000 says both BIT_CTRL_MODE and BYTE_CTRL_MODE are
supported but the latter is recommended.  Also on 2K3000, per the ACPI
DSDT the GPIO controller is compatible with 2K2000, but it fails to
operate GPIOs 62 and 63 (and maybe others) using BIT_CTRL_MODE.
Using BYTE_CTRL_MODE also makes those 2K3000 GPIOs work.

Fixes: 3feb70a61740 ("gpio: loongson: add more gpio chip support")
Cc: stable@vger.kernel.org
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://lore.kernel.org/r/20251128075033.255821-1-xry111@xry111.site
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c
index d4e291b275f0..77d07e31366f 100644
--- a/drivers/gpio/gpio-loongson-64bit.c
+++ b/drivers/gpio/gpio-loongson-64bit.c
@@ -408,11 +408,11 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data0 = {
 
 static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
 	.label = "ls2k2000_gpio",
-	.mode = BIT_CTRL_MODE,
-	.conf_offset = 0x0,
-	.in_offset = 0x20,
-	.out_offset = 0x10,
-	.inten_offset = 0x30,
+	.mode = BYTE_CTRL_MODE,
+	.conf_offset = 0x800,
+	.in_offset = 0xa00,
+	.out_offset = 0x900,
+	.inten_offset = 0xb00,
 };
 
 static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data2 = {


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 6.12.y] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE
  2025-12-29 14:34 FAILED: patch "[PATCH] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE" failed to apply to 6.12-stable tree gregkh
@ 2025-12-30  2:01 ` Xi Ruoyao
  2025-12-30  2:04   ` 陈华才
  0 siblings, 1 reply; 3+ messages in thread
From: Xi Ruoyao @ 2025-12-30  2:01 UTC (permalink / raw)
  To: stable; +Cc: Xi Ruoyao, Huacai Chen, Bartosz Golaszewski

The manuals of 2K2000 says both BIT_CTRL_MODE and BYTE_CTRL_MODE are
supported but the latter is recommended.  Also on 2K3000, per the ACPI
DSDT the GPIO controller is compatible with 2K2000, but it fails to
operate GPIOs 62 and 63 (and maybe others) using BIT_CTRL_MODE.
Using BYTE_CTRL_MODE also makes those 2K3000 GPIOs work.

Fixes: 3feb70a61740 ("gpio: loongson: add more gpio chip support")
Cc: stable@vger.kernel.org
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://lore.kernel.org/r/20251128075033.255821-1-xry111@xry111.site
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
(cherry picked from commit dae9750105cf93ac1e156ef91f4beeb53bd64777)
[Removed inten_offset as 6.12 has no 2K2000/3000 GPIO interrupt support.]
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---
 drivers/gpio/gpio-loongson-64bit.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c
index 7f4d78fd800e..11915898a93d 100644
--- a/drivers/gpio/gpio-loongson-64bit.c
+++ b/drivers/gpio/gpio-loongson-64bit.c
@@ -228,10 +228,10 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data0 = {
 
 static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
 	.label = "ls2k2000_gpio",
-	.mode = BIT_CTRL_MODE,
-	.conf_offset = 0x0,
-	.in_offset = 0x20,
-	.out_offset = 0x10,
+	.mode = BYTE_CTRL_MODE,
+	.conf_offset = 0x800,
+	.in_offset = 0xa00,
+	.out_offset = 0x900,
 };
 
 static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data2 = {
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 6.12.y] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE
  2025-12-30  2:01 ` [PATCH 6.12.y] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE Xi Ruoyao
@ 2025-12-30  2:04   ` 陈华才
  0 siblings, 0 replies; 3+ messages in thread
From: 陈华才 @ 2025-12-30  2:04 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: stable, Bartosz Golaszewski

Hi, Ruoyao,

> -----原始邮件-----
> 发件人: "Xi Ruoyao" <xry111@xry111.site>
> 发送时间:2025-12-30 10:01:04 (星期二)
> 收件人: stable@vger.kernel.org
> 抄送: "Xi Ruoyao" <xry111@xry111.site>, "Huacai Chen" <chenhuacai@loongson.cn>, "Bartosz Golaszewski" <bartosz.golaszewski@linaro.org>
> 主题: [PATCH 6.12.y] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE
> 
> The manuals of 2K2000 says both BIT_CTRL_MODE and BYTE_CTRL_MODE are
> supported but the latter is recommended.  Also on 2K3000, per the ACPI
> DSDT the GPIO controller is compatible with 2K2000, but it fails to
> operate GPIOs 62 and 63 (and maybe others) using BIT_CTRL_MODE.
> Using BYTE_CTRL_MODE also makes those 2K3000 GPIOs work.
> 
> Fixes: 3feb70a61740 ("gpio: loongson: add more gpio chip support")
> Cc: stable@vger.kernel.org
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
> Link: https://lore.kernel.org/r/20251128075033.255821-1-xry111@xry111.site
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> (cherry picked from commit dae9750105cf93ac1e156ef91f4beeb53bd64777)
> [Removed inten_offset as 6.12 has no 2K2000/3000 GPIO interrupt support.]
I prefer to backport "gpio: loongson-64bit: Extend GPIO irq support" as a dependency.

Huacai

> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
>  drivers/gpio/gpio-loongson-64bit.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c
> index 7f4d78fd800e..11915898a93d 100644
> --- a/drivers/gpio/gpio-loongson-64bit.c
> +++ b/drivers/gpio/gpio-loongson-64bit.c
> @@ -228,10 +228,10 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data0 = {
>  
>  static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
>  	.label = "ls2k2000_gpio",
> -	.mode = BIT_CTRL_MODE,
> -	.conf_offset = 0x0,
> -	.in_offset = 0x20,
> -	.out_offset = 0x10,
> +	.mode = BYTE_CTRL_MODE,
> +	.conf_offset = 0x800,
> +	.in_offset = 0xa00,
> +	.out_offset = 0x900,
>  };
>  
>  static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data2 = {
> -- 
> 2.52.0


本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 
This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it. 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-30  2:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-29 14:34 FAILED: patch "[PATCH] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE" failed to apply to 6.12-stable tree gregkh
2025-12-30  2:01 ` [PATCH 6.12.y] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE Xi Ruoyao
2025-12-30  2:04   ` 陈华才

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.