diff mbox series

[v3,08/15] pl01x: Convert to dev_read

Message ID 20180125110556.76352-9-agraf@suse.de
State Accepted
Commit b31116308c6ebf4fcebacac8c346f603257547e5
Headers show
Series RPi: Properly handle dynamic serial configuration | expand

Commit Message

Alexander Graf Jan. 25, 2018, 11:05 a.m. UTC
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 | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Tom Rini Jan. 28, 2018, 6:55 p.m. UTC | #1
On Thu, Jan 25, 2018 at 12:05:49PM +0100, Alexander Graf wrote:

> 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>


Applied to u-boot/master, thanks!

-- 
Tom
diff mbox series

Patch

diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index 4ec0f29c42..2cbc84c1b4 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -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