]> git.sur5r.net Git - u-boot/commitdiff
pl01x: Convert to dev_read
authorAlexander Graf <agraf@suse.de>
Thu, 25 Jan 2018 11:05:49 +0000 (12:05 +0100)
committerTom Rini <trini@konsulko.com>
Sun, 28 Jan 2018 17:27:34 +0000 (12:27 -0500)
The fdtdec API is deprecated, convert the pl010 and pl011 devices to
use the dev_read API instead.

Signed-off-by: Alexander Graf <agraf@suse.de>
drivers/serial/serial_pl01x.c

index 4ec0f29c429bdcb0610a72be103aa3cd4c60e9c9..2cbc84c1b46aa50eec0f5a949fca182fe3a1e105 100644 (file)
@@ -20,7 +20,6 @@
 #include <dm/platform_data/serial_pl01x.h>
 #include <linux/compiler.h>
 #include "serial_pl01x_internal.h"
-#include <fdtdec.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -354,11 +353,10 @@ static int pl01x_serial_ofdata_to_platdata(struct udevice *dev)
                return -EINVAL;
 
        plat->base = addr;
-       plat->clock = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev), "clock",
-                                    1);
+       plat->clock = dev_read_u32_default(dev, "clock", 1);
        plat->type = dev_get_driver_data(dev);
-       plat->skip_init = fdtdec_get_bool(gd->fdt_blob, dev_of_offset(dev),
-                                         "skip-init");
+       plat->skip_init = dev_read_bool(dev, "skip-init");
+
        return 0;
 }
 #endif