]> git.sur5r.net Git - u-boot/blobdiff - drivers/serial/sandbox.c
Merge branch 'master' of git://git.denx.de/u-boot-socfpga
[u-boot] / drivers / serial / sandbox.c
index 45dff98d9d10cea6e28bc2c7ce89723cc8ea7526..d2e007284c4bb30d4f8a00ea6535bd8fbc2cdb47 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2011 The Chromium OS Authors.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -25,7 +24,7 @@ DECLARE_GLOBAL_DATA_PTR;
 /*
  *
  *   serial_buf: A buffer that holds keyboard characters for the
- *              Sandbox U-boot.
+ *              Sandbox U-Boot.
  *
  * invariants:
  *   serial_buf_write           == serial_buf_read -> empty buffer
@@ -115,7 +114,9 @@ static int sandbox_serial_pending(struct udevice *dev, bool input)
                return 0;
 
        os_usleep(100);
+#ifndef CONFIG_SPL_BUILD
        video_sync_all();
+#endif
        if (next_index == serial_buf_read)
                return 1;       /* buffer full */
 
@@ -150,7 +151,7 @@ static int sandbox_serial_ofdata_to_platdata(struct udevice *dev)
        int i;
 
        plat->colour = -1;
-       colour = fdt_getprop(gd->fdt_blob, dev->of_offset,
+       colour = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
                             "sandbox,text-colour", NULL);
        if (colour) {
                for (i = 0; i < ARRAY_SIZE(ansi_colour); i++) {