Skip to content
Snippets Groups Projects
Commit 9f29aeb8 authored by Bin Meng's avatar Bin Meng Committed by Simon Glass
Browse files

Revert "fdt_support: Add multi-serial support for stdout fixup"


This reverts commit 3e303f74.

The fix up in the /aliases node does not work under the following
scenarios:
- Not every non-DM serial driver was written to have a driver name
  that conforms the format of "serial%d" or "eserial%d".
- With driver model serial, the stdio_devices[] stores the serial
  device node name in the device tree.

Signed-off-by: default avatarBin Meng <bmeng.cn@gmail.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 1c8b4d5f
No related branches found
No related tags found
No related merge requests found
...@@ -131,18 +131,6 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff) ...@@ -131,18 +131,6 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)
OF_STDOUT_PATH, strlen(OF_STDOUT_PATH) + 1); OF_STDOUT_PATH, strlen(OF_STDOUT_PATH) + 1);
} }
#elif defined(CONFIG_OF_STDOUT_VIA_ALIAS) && defined(CONFIG_CONS_INDEX) #elif defined(CONFIG_OF_STDOUT_VIA_ALIAS) && defined(CONFIG_CONS_INDEX)
static void fdt_fill_multisername(char *sername, size_t maxlen)
{
const char *outname = stdio_devices[stdout]->name;
if (strcmp(outname, "serial") > 0)
strncpy(sername, outname, maxlen);
/* eserial? */
if (strcmp(outname + 1, "serial") > 0)
strncpy(sername, outname + 1, maxlen);
}
static int fdt_fixup_stdout(void *fdt, int chosenoff) static int fdt_fixup_stdout(void *fdt, int chosenoff)
{ {
int err; int err;
...@@ -152,9 +140,7 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff) ...@@ -152,9 +140,7 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)
int len; int len;
char tmp[256]; /* long enough */ char tmp[256]; /* long enough */
fdt_fill_multisername(sername, sizeof(sername) - 1); sprintf(sername, "serial%d", CONFIG_CONS_INDEX - 1);
if (!sername[0])
sprintf(sername, "serial%d", CONFIG_CONS_INDEX - 1);
aliasoff = fdt_path_offset(fdt, "/aliases"); aliasoff = fdt_path_offset(fdt, "/aliases");
if (aliasoff < 0) { if (aliasoff < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment