diff options
Diffstat (limited to 'drivers/serial/sandbox.c')
-rw-r--r-- | drivers/serial/sandbox.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index 545ff3f747..f09d291e04 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -93,7 +93,9 @@ static int sandbox_serial_putc(struct udevice *dev, const char ch) struct sandbox_serial_priv *priv = dev_get_priv(dev); struct sandbox_serial_platdata *plat = dev->platdata; - if (priv->start_of_line && plat->colour != -1) { + /* With of-platdata we don't real the colour correctly, so disable it */ + if (!CONFIG_IS_ENABLED(OF_PLATDATA) && priv->start_of_line && + plat->colour != -1) { priv->start_of_line = false; output_ansi_colour(plat->colour); } @@ -252,8 +254,8 @@ static const struct udevice_id sandbox_serial_ids[] = { { } }; -U_BOOT_DRIVER(serial_sandbox) = { - .name = "serial_sandbox", +U_BOOT_DRIVER(sandbox_serial) = { + .name = "sandbox_serial", .id = UCLASS_SERIAL, .of_match = sandbox_serial_ids, .ofdata_to_platdata = sandbox_serial_ofdata_to_platdata, @@ -270,7 +272,7 @@ static const struct sandbox_serial_platdata platdata_non_fdt = { }; U_BOOT_DEVICE(serial_sandbox_non_fdt) = { - .name = "serial_sandbox", + .name = "sandbox_serial", .platdata = &platdata_non_fdt, }; #endif /* CONFIG_IS_ENABLED(OF_CONTROL) */ |