summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-08 20:36:49 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 07:58:17 -0700
commit1bf0a4021905ed7ab9f1909a8422b7a71147b653 (patch)
treeacdbbc8d4a99d71b1da33bfb0977aefa9484ada2 /drivers
parentc5ea0167bed3e0fbd0cbee466ede3c70cf345a54 (diff)
downloadu-boot-1bf0a4021905ed7ab9f1909a8422b7a71147b653.tar.gz
u-boot-1bf0a4021905ed7ab9f1909a8422b7a71147b653.tar.bz2
u-boot-1bf0a4021905ed7ab9f1909a8422b7a71147b653.zip
sandbox: serial: Convert to livetree
Use a livetree function to read the colour. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/sandbox.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index e3967deaaf..8c74c3a1b8 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -12,7 +12,6 @@
#include <common.h>
#include <console.h>
#include <dm.h>
-#include <fdtdec.h>
#include <lcd.h>
#include <os.h>
#include <serial.h>
@@ -221,8 +220,7 @@ static int sandbox_serial_ofdata_to_platdata(struct udevice *dev)
if (CONFIG_IS_ENABLED(OF_PLATDATA))
return 0;
plat->colour = -1;
- colour = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
- "sandbox,text-colour", NULL);
+ colour = dev_read_string(dev, "sandbox,text-colour");
if (colour) {
for (i = 0; i < ARRAY_SIZE(ansi_colour); i++) {
if (!strcmp(colour, ansi_colour[i])) {