boot: Support IO UARTs for earlycon and console
Update the string to take account of UARTs which are connected on I/O ports, as on x86. Fix a typo in an error message in the same command, while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -942,8 +942,9 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg)
|
|||||||
*buf = '\0';
|
*buf = '\0';
|
||||||
if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) {
|
if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_16550_COMPATIBLE) {
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"uart8250,mmio32,%#lx,%dn8", info.addr,
|
"uart8250,%s,%#lx,%dn8",
|
||||||
info.baudrate);
|
info.addr_space == SERIAL_ADDRESS_SPACE_IO ? "io" :
|
||||||
|
"mmio", info.addr, info.baudrate);
|
||||||
} else if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_PL01X) {
|
} else if (!strcmp("earlycon", arg) && info.type == SERIAL_CHIP_PL01X) {
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"pl011,mmio32,%#lx,%dn8", info.addr,
|
"pl011,mmio32,%#lx,%dn8", info.addr,
|
||||||
@@ -954,7 +955,7 @@ int bootflow_cmdline_auto(struct bootflow *bflow, const char *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!*buf) {
|
if (!*buf) {
|
||||||
printf("Unknown param '%s\n", arg);
|
printf("Unknown param '%s'\n", arg);
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user