diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-08-04 08:14:41 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-08-22 17:51:44 +0300 |
commit | 0cbf3e08fc735b54e7918138e73b34870a213333 (patch) | |
tree | 946a30ca588b7660eddf0dc9207bb458a0472a90 /drivers | |
parent | 6e64830f0bca623180d5d1667df02c288616ea5c (diff) | |
download | u-boot-0cbf3e08fc735b54e7918138e73b34870a213333.tar.xz |
gpio: at91: use dev_read_addr() to get base address
It is strange to use devfdt_get_addr_ptr(), then cast the pointer
back to uint32 because you could use devfdt_get_addr() without casting.
Convert it to dev_read_addr(), which is capable to CONFIG_OF_LIVE.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpio/at91_gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/at91_gpio.c b/drivers/gpio/at91_gpio.c index 4a8b2e6ff6..ef7984374b 100644 --- a/drivers/gpio/at91_gpio.c +++ b/drivers/gpio/at91_gpio.c @@ -606,7 +606,7 @@ static int at91_gpio_probe(struct udevice *dev) clk_free(&clk); #if CONFIG_IS_ENABLED(OF_CONTROL) - plat->base_addr = (uint32_t)devfdt_get_addr_ptr(dev); + plat->base_addr = dev_read_addr(dev); #endif plat->bank_name = at91_get_bank_name(plat->base_addr); port->regs = (struct at91_port *)plat->base_addr; |