summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-10-28 09:20:56 -0600
committerTom Rini <trini@konsulko.com>2024-10-28 09:20:56 -0600
commitf2533fb04893467cc64fd5e31158a8c861c0a883 (patch)
tree6b8fd72381d41b2d8af7fef322ce912b1af6138d /drivers
parent3df6145db0ed3430a2af089db5a82372bea3f4d5 (diff)
parent9e859849e2caa17d730bc4507fd6ef3c7959d3b4 (diff)
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/23051 - risc-v: Add Zicbom support - board: Support RVVM board - DTS: device tree fixes - configs: Enable some configs
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/dwapb_gpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 7a6eae9ba18..04639a4cb68 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -177,7 +177,9 @@ static int gpio_dwapb_bind(struct udevice *dev)
plat->base = (void *)base;
plat->bank = bank;
- plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);
+
+ if (ofnode_read_u32(node, "ngpios", &plat->pins))
+ plat->pins = ofnode_read_u32_default(node, "snps,nr-gpios", 0);
if (ofnode_read_string_index(node, "bank-name", 0,
&plat->name)) {