Skip to content

Commit e59f4c9

Browse files
AaronDotBartosz Golaszewski
authored andcommitted
gpio: loongson: Fix Loongson-2K2000 ACPI GPIO register offset
Since commit 3feb70a ("gpio: loongson: add more gpio chip support"), the Loongson-2K2000 GPIO is supported. However, according to the firmware development specification, the Loongson-2K2000 ACPI GPIO register offsets in the driver do not match the register base addresses in the firmware, resulting in the registers not being accessed properly. Now, we fix it to ensure the GPIO function works properly. Cc: [email protected] Cc: Yinbo Zhu <[email protected]> Fixes: 3feb70a ("gpio: loongson: add more gpio chip support") Co-developed-by: Hongliang Wang <[email protected]> Signed-off-by: Hongliang Wang <[email protected]> Signed-off-by: Binbin Zhou <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 8bd76b3 commit e59f4c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio-loongson-64bit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data1 = {
237237
static const struct loongson_gpio_chip_data loongson_gpio_ls2k2000_data2 = {
238238
.label = "ls2k2000_gpio",
239239
.mode = BIT_CTRL_MODE,
240-
.conf_offset = 0x84,
241-
.in_offset = 0x88,
242-
.out_offset = 0x80,
240+
.conf_offset = 0x4,
241+
.in_offset = 0x8,
242+
.out_offset = 0x0,
243243
};
244244

245245
static const struct loongson_gpio_chip_data loongson_gpio_ls3a5000_data = {

0 commit comments

Comments
 (0)