summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2016-01-13 19:38:58 -0800
committerSimon Glass <sjg@chromium.org>2016-01-20 19:10:12 -0700
commit9f29aeb89de8199ebaea9995dbb30ea5fa2f1085 (patch)
tree75ef7183f0d9f9263945ced3d4a0a874b7555a23 /common
parent1c8b4d5f4f6a8bad12b2b690a04f96731410bb73 (diff)
Revert "fdt_support: Add multi-serial support for stdout fixup"
This reverts commit 3e303f748cf57fb23e8ec95ab7eac0074be50e2b. 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: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/fdt_support.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 09f923716ca..75d0858e763 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -131,18 +131,6 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)
OF_STDOUT_PATH, strlen(OF_STDOUT_PATH) + 1);
}
#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)
{
int err;
@@ -152,9 +140,7 @@ static int fdt_fixup_stdout(void *fdt, int chosenoff)
int len;
char tmp[256]; /* long enough */
- fdt_fill_multisername(sername, sizeof(sername) - 1);
- if (!sername[0])
- sprintf(sername, "serial%d", CONFIG_CONS_INDEX - 1);
+ sprintf(sername, "serial%d", CONFIG_CONS_INDEX - 1);
aliasoff = fdt_path_offset(fdt, "/aliases");
if (aliasoff < 0) {