All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] gpio: at91: use dev_read_addr() to get base address
@ 2020-08-04  5:14 Masahiro Yamada
  2020-08-04  5:14 ` [PATCH 2/3] ata: mvebu: " Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Masahiro Yamada @ 2020-08-04  5:14 UTC (permalink / raw)
  To: u-boot

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>
---

 drivers/gpio/at91_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-08-22 23:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04  5:14 [PATCH 1/3] gpio: at91: use dev_read_addr() to get base address Masahiro Yamada
2020-08-04  5:14 ` [PATCH 2/3] ata: mvebu: " Masahiro Yamada
2020-08-04  6:36   ` Stefan Roese
2020-08-22 23:18   ` Simon Glass
2020-08-04  5:14 ` [PATCH 3/3] treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr() Masahiro Yamada
2020-08-16  3:39   ` Simon Glass
2020-08-22 23:17   ` Simon Glass
2020-08-16  3:39 ` [PATCH 1/3] gpio: at91: use dev_read_addr() to get base address Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.