From ee13f33b8d96fa86d5ef9eb216b42cd0c9279ae1 Mon Sep 17 00:00:00 2001 From: wanghongliang Date: Wed, 11 Jun 2025 16:31:03 +0800 Subject: [PATCH] anolis: LoongArch: Fix access mode of 7A2000 acpi gpio. ANBZ: #23531 For the Loongson platform, the GPIO controller on the 7A2000 bridge chip supports only bit-wise access mode. Using other access modes (e.g., byte, word, or double word) may cause undefined behavior/errors. Signed-off-by: wanghongliang Signed-off-by: Juxin Gao --- 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 f916a5ae0290..7363736830e1 100644 --- a/drivers/gpio/gpio-loongson-64bit.c +++ b/drivers/gpio/gpio-loongson-64bit.c @@ -334,10 +334,10 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls7a2000_data0 = { static const struct loongson_gpio_chip_data loongson_gpio_ls7a2000_data1 = { .label = "ls7a2000_gpio", - .mode = BYTE_CTRL_MODE, - .conf_offset = 0x84, - .in_offset = 0x88, - .out_offset = 0x80, + .mode = BIT_CTRL_MODE, + .conf_offset = 0x4, + .in_offset = 0x8, + .out_offset = 0x0, }; static const struct loongson_gpio_chip_data loongson_gpio_ls3a6000_data = { -- Gitee