reset: socfpga: convert to livetree
authorSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Thu, 9 May 2019 20:11:59 +0000 (22:11 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 10 May 2019 20:48:11 +0000 (22:48 +0200)
Convert 'socfpga_reset_probe' to use 'dev_read_u32_default'
instead of 'fdtdec_get_int'.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
drivers/reset/reset-socfpga.c

index cb8312619fa076799e38fc5b7596df80687e8e1e..ee4cbcb02ff9ccbcafe6071fa4a3508aad061f5c 100644 (file)
@@ -107,14 +107,12 @@ static const struct reset_ops socfpga_reset_ops = {
 static int socfpga_reset_probe(struct udevice *dev)
 {
        struct socfpga_reset_data *data = dev_get_priv(dev);
-       const void *blob = gd->fdt_blob;
-       int node = dev_of_offset(dev);
        u32 modrst_offset;
        void __iomem *membase;
 
        membase = devfdt_get_addr_ptr(dev);
 
-       modrst_offset = fdtdec_get_int(blob, node, "altr,modrst-offset", 0x10);
+       modrst_offset = dev_read_u32_default(dev, "altr,modrst-offset", 0x10);
        data->modrst_base = membase + modrst_offset;
 
        return 0;