[U-Boot] [PATCH 2/3] gpio: s5p: use dev_get_reg() instead of dev_get_addr()

Przemyslaw Marczak p.marczak at samsung.com
Tue Dec 15 17:32:02 CET 2015


In a result of enabling the CONFIG_OF_TRANSLAE, function dev_get_addr(),
doesn't support device tree nodes with 'size-cells == 0'.

But this is the way how the s5p gpio driver's compatible device tree
nodes are defined. Switching the driver to use function dev_get_reg(),
fixes this issue.

Signed-off-by: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Stephen Warren <swarren at nvidia.com>
Cc: Minkyu Kang <mk7.kang at samsung.com>
Cc: Simon Glass <sjg at chromium.org>
---
 drivers/gpio/s5p_gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/s5p_gpio.c b/drivers/gpio/s5p_gpio.c
index 0f22b23..383c6ce 100644
--- a/drivers/gpio/s5p_gpio.c
+++ b/drivers/gpio/s5p_gpio.c
@@ -350,7 +350,7 @@ static int gpio_exynos_bind(struct udevice *parent)
 
 		dev->of_offset = node;
 
-		reg = dev_get_addr(dev);
+		reg = dev_get_reg(dev);
 		if (reg != FDT_ADDR_T_NONE)
 			bank = (struct s5p_gpio_bank *)((ulong)base + reg);
 
-- 
1.9.1



More information about the U-Boot mailing list