summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-01-21 19:45:11 -0700
committerSimon Glass <sjg@chromium.org>2016-01-21 20:42:37 -0700
commit2460d18c3383b7b024566dd60bf6a725ae37a661 (patch)
tree7ee735e133808f93018ce9dbea311ee23028e2ca /arch
parent9368104d2fb41e47b360f4a2b1f59b501f57a7e8 (diff)
downloadu-boot-imx-2460d18c3383b7b024566dd60bf6a725ae37a661.zip
u-boot-imx-2460d18c3383b7b024566dd60bf6a725ae37a661.tar.gz
u-boot-imx-2460d18c3383b7b024566dd60bf6a725ae37a661.tar.bz2
rockchip: sdram: Use syscon_get_first_range() where possible
This is a shortcut to obtaining a register address. Use it where possible, to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-rockchip/rk3288/sdram_rk3288.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c b/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
index 2a43574..074cf518 100644
--- a/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
+++ b/arch/arm/mach-rockchip/rk3288/sdram_rk3288.c
@@ -808,20 +808,9 @@ static int rk3288_dmc_probe(struct udevice *dev)
priv->chan[1].msch = (struct rk3288_msch *)
(regmap_get_range(map, 0) + 0x80);
- map = syscon_get_regmap_by_driver_data(ROCKCHIP_SYSCON_GRF);
- if (IS_ERR(map))
- return PTR_ERR(map);
- priv->grf = regmap_get_range(map, 0);
-
- map = syscon_get_regmap_by_driver_data(ROCKCHIP_SYSCON_SGRF);
- if (IS_ERR(map))
- return PTR_ERR(map);
- priv->sgrf = regmap_get_range(map, 0);
-
- map = syscon_get_regmap_by_driver_data(ROCKCHIP_SYSCON_PMU);
- if (IS_ERR(map))
- return PTR_ERR(map);
- priv->pmu = regmap_get_range(map, 0);
+ priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
+ priv->sgrf = syscon_get_first_range(ROCKCHIP_SYSCON_SGRF);
+ priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU);
ret = regmap_init_mem(dev, &map);
if (ret)