From: Masahiro Yamada Date: Thu, 24 Mar 2016 13:32:41 +0000 (+0900) Subject: gpio: uniphier: use devm_get_addr() to get base address X-Git-Tag: v2016.05-rc1~112 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=bc82a1310fd00f18c1f68596751540459acafb8c;p=u-boot gpio: uniphier: use devm_get_addr() to get base address Currently, fdtdec_get_addr_size() does not support the address translation, so it cannot handle device trees with non-straight "ranges" properties. (This would be a problem with DTS for UniPhier ARMv8 SoCs.) Signed-off-by: Masahiro Yamada --- diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 80bb16ec06..bde51eab15 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include @@ -91,17 +92,14 @@ static int uniphier_gpio_probe(struct udevice *dev) { struct uniphier_gpio_priv *priv = dev_get_priv(dev); struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev); - DECLARE_GLOBAL_DATA_PTR; fdt_addr_t addr; - fdt_size_t size; unsigned int tmp; - addr = fdtdec_get_addr_size(gd->fdt_blob, dev->of_offset, "reg", - &size); + addr = dev_get_addr(dev); if (addr == FDT_ADDR_T_NONE) return -EINVAL; - priv->base = map_sysmem(addr, size); + priv->base = map_sysmem(addr, SZ_8); if (!priv->base) return -ENOMEM;