]> git.sur5r.net Git - u-boot/commitdiff
rockchip: pinctrl: dm: convert fdt_get to dev_read
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Wed, 7 Jun 2017 16:45:57 +0000 (18:45 +0200)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 11 Jul 2017 10:13:43 +0000 (12:13 +0200)
With the new dev_read functions available, we can convert the rockchip
architecture-specific drivers and common drivers used by these devices
over to the dev_read family of calls.

This change covers the pinctrl drivers for the Rockchip devices.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/pinctrl/rockchip/pinctrl_rk3036.c
drivers/pinctrl/rockchip/pinctrl_rk3188.c
drivers/pinctrl/rockchip/pinctrl_rk3288.c
drivers/pinctrl/rockchip/pinctrl_rk3328.c
drivers/pinctrl/rockchip/pinctrl_rk3399.c
drivers/pinctrl/rockchip/pinctrl_rv1108.c

index 9215d6c96e2752d2110b0072cc2e28f801da9825..94f6d7ad403a33725a2540c8109288a1e41311f3 100644 (file)
@@ -193,8 +193,7 @@ static int rk3036_pinctrl_get_periph_id(struct udevice *dev,
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
-                                  "interrupts", cell, ARRAY_SIZE(cell));
+       ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
        if (ret < 0)
                return -EINVAL;
 
index 65c1f665ea9cd01a2f29d2540e99828437675cab..692d8e298d02434b13ff820c431a7a33cde945bf 100644 (file)
@@ -370,8 +370,7 @@ static int rk3188_pinctrl_get_periph_id(struct udevice *dev,
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
-                                  "interrupts", cell, ARRAY_SIZE(cell));
+       ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
        if (ret < 0)
                return -EINVAL;
 
index cb13d30da8e9e8769a1053a6281f4126ac10af2d..de5e8343e578bece735c1a262124b69d1dacb25f 100644 (file)
@@ -479,8 +479,7 @@ static int rk3288_pinctrl_get_periph_id(struct udevice *dev,
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
-                                  "interrupts", cell, ARRAY_SIZE(cell));
+       ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
        if (ret < 0)
                return -EINVAL;
 
index d0ffeb1f0447d68c999fa2217e33b860894a1809..efa5b3105ce5abacabe7b01f77ba718284dc1850 100644 (file)
@@ -251,8 +251,7 @@ static int rk3328_pinctrl_get_periph_id(struct udevice *dev,
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
-                                  "interrupts", cell, ARRAY_SIZE(cell));
+       ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
        if (ret < 0)
                return -EINVAL;
 
index d93b90310b0ab3f9aa8647b8779f6daa3ff4fa21..cab268c7d6c281ac9a214e63b014a5bb156eb224 100644 (file)
@@ -350,8 +350,7 @@ static int rk3399_pinctrl_get_periph_id(struct udevice *dev,
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
-                                  "interrupts", cell, ARRAY_SIZE(cell));
+       ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
        if (ret < 0)
                return -EINVAL;
 
index bdf3910a88572c3ca71bad34d67c3ee4ffce435c..cda94f49575911b3ea22d4400c2c194d905f163a 100644 (file)
@@ -108,8 +108,7 @@ static int rv1108_pinctrl_get_periph_id(struct udevice *dev,
        u32 cell[3];
        int ret;
 
-       ret = fdtdec_get_int_array(gd->fdt_blob, dev_of_offset(periph),
-                                  "interrupts", cell, ARRAY_SIZE(cell));
+       ret = dev_read_u32_array(periph, "interrupts", cell, ARRAY_SIZE(cell));
        if (ret < 0)
                return -EINVAL;