summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/sandbox_sdl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/video/sandbox_sdl.c b/drivers/video/sandbox_sdl.c
index d1272d0918..1196e6c671 100644
--- a/drivers/video/sandbox_sdl.c
+++ b/drivers/video/sandbox_sdl.c
@@ -47,13 +47,11 @@ static int sandbox_sdl_bind(struct udevice *dev)
{
struct video_uc_platdata *uc_plat = dev_get_uclass_platdata(dev);
struct sandbox_sdl_plat *plat = dev_get_platdata(dev);
- const void *blob = gd->fdt_blob;
- int node = dev_of_offset(dev);
int ret = 0;
- plat->xres = fdtdec_get_int(blob, node, "xres", LCD_MAX_WIDTH);
- plat->yres = fdtdec_get_int(blob, node, "yres", LCD_MAX_HEIGHT);
- plat->bpix = VIDEO_BPP16;
+ plat->xres = dev_read_u32_default(dev, "xres", LCD_MAX_WIDTH);
+ plat->yres = dev_read_u32_default(dev, "yres", LCD_MAX_HEIGHT);
+ plat->bpix = dev_read_u32_default(dev, "log2-depth", VIDEO_BPP16);
uc_plat->size = plat->xres * plat->yres * (1 << plat->bpix) / 8;
debug("%s: Frame buffer size %x\n", __func__, uc_plat->size);