]> git.sur5r.net Git - u-boot/commitdiff
rockchip: sdram: Use syscon_get_first_range() where possible
authorSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 02:45:11 +0000 (19:45 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 22 Jan 2016 03:42:37 +0000 (20:42 -0700)
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>
arch/arm/mach-rockchip/rk3288/sdram_rk3288.c

index 2a43574a79aa3a8769ea1a09892afab3c61d123a..074cf518709cd8560febe43bb86d640e30ef32aa 100644 (file)
@@ -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)