diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-03-24 22:32:41 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-04-01 00:17:19 +0900 |
commit | bc82a1310fd00f18c1f68596751540459acafb8c (patch) | |
tree | 9b08dea4ec062bbf9d330d6fc9736b617aab8429 /drivers/gpio | |
parent | 336399fb63cd43aa9d3c1dc8c71c9a5e0c1270d9 (diff) | |
download | u-boot-imx-bc82a1310fd00f18c1f68596751540459acafb8c.zip u-boot-imx-bc82a1310fd00f18c1f68596751540459acafb8c.tar.gz u-boot-imx-bc82a1310fd00f18c1f68596751540459acafb8c.tar.bz2 |
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 <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-uniphier.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 80bb16e..bde51ea 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -9,6 +9,7 @@ #include <mapmem.h> #include <linux/bitops.h> #include <linux/io.h> +#include <linux/sizes.h> #include <asm/errno.h> #include <asm/gpio.h> @@ -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; |