summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/uniphier
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-03-24 22:32:43 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-04-01 00:17:25 +0900
commit510454db045143e374a7d64e6bb043799d0023d7 (patch)
tree88a38c56e63658e63fdfcf0c905ea23ad6ce61c4 /drivers/pinctrl/uniphier
parent4f80501b91c06b215e66db12ee778c767124cb13 (diff)
pinctrl: 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/pinctrl/uniphier')
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-core.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
index ffdccab4ad..ac3a06c191 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
@@ -8,13 +8,12 @@
#include <mapmem.h>
#include <linux/io.h>
#include <linux/err.h>
+#include <linux/sizes.h>
#include <dm/device.h>
#include <dm/pinctrl.h>
#include "pinctrl-uniphier.h"
-DECLARE_GLOBAL_DATA_PTR;
-
static int uniphier_pinctrl_get_groups_count(struct udevice *dev)
{
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
@@ -128,14 +127,12 @@ int uniphier_pinctrl_probe(struct udevice *dev,
{
struct uniphier_pinctrl_priv *priv = dev_get_priv(dev);
fdt_addr_t addr;
- fdt_size_t size;
- 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_4K);
if (!priv->base)
return -ENOMEM;