lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAhV-H4miSOrtuXS7E9Uc8wbB+-_7KwN97_mna8L58_sEBLvng@mail.gmail.com>
Date: Fri, 28 Nov 2025 16:51:10 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Xi Ruoyao <xry111@...111.site>
Cc: linux-gpio@...r.kernel.org, WANG Xuerui <kernel@...0n.name>, 
	Mingcong Bai <jeffbai@...c.io>, loongarch@...ts.linux.dev, stable@...r.kernel.org, 
	Yinbo Zhu <zhuyinbo@...ngson.cn>, Linus Walleij <linus.walleij@...aro.org>, 
	Bartosz Golaszewski <brgl@...nel.org>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] gpio: loongson: Switch 2K2000/3000 GPIO to BYTE_CTRL_MODE

Hi, Ruoyao,

On Fri, Nov 28, 2025 at 3:51 PM Xi Ruoyao <xry111@...111.site> wrote:
>
> 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.
Use LS2K2000/3000 instead of 2K2000/3000 will be better, others LGTM.
Reviewed-by: Huacai Chen <chenhuacai@...ngson.cn>

>
> Fixes: 3feb70a61740 ("gpio: loongson: add more gpio chip support")
> Cc: stable@...r.kernel.org
> Signed-off-by: Xi Ruoyao <xry111@...111.site>
> ---
>  drivers/gpio/gpio-loongson-64bit.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-loongson-64bit.c b/drivers/gpio/gpio-loongson-64bit.c
> index 02f181cb219e..82d4c3aa4d2f 100644
> --- a/drivers/gpio/gpio-loongson-64bit.c
> +++ b/drivers/gpio/gpio-loongson-64bit.c
> @@ -407,11 +407,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 = {
> --
> 2.52.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ