sysreset: syscon: convert to use live dt
authorÁlvaro Fernández Rojas <noltari@gmail.com>
Sat, 17 Mar 2018 11:22:24 +0000 (12:22 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 10 Apr 2018 15:52:16 +0000 (11:52 -0400)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
drivers/sysreset/sysreset_syscon.c

index 3abce7f678679ac838476f77773eabefea9e9802..22c602a4d2a73d50f60aae1e862e46fb19e44407 100644 (file)
@@ -15,8 +15,6 @@
 #include <sysreset.h>
 #include <syscon.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 struct syscon_reboot_priv {
        struct regmap *regmap;
        unsigned int offset;
@@ -55,10 +53,8 @@ int syscon_reboot_probe(struct udevice *dev)
                return -ENODEV;
        }
 
-       priv->offset = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
-                                      "offset", 0);
-       priv->mask = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
-                                      "mask", 0);
+       priv->offset = dev_read_u32_default(dev, "offset", 0);
+       priv->mask = dev_read_u32_default(dev, "mask", 0);
 
        return 0;
 }