diff mbox

[U-Boot,v2,1/9] Revert "fdt_support: Add multi-serial support for stdout fixup"

Message ID 1452742746-31746-2-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Bin Meng Jan. 14, 2016, 3:38 a.m. UTC
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>

---

Changes in v2:
- Rewrite the commit message using 'git revert' format.

 common/fdt_support.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

Comments

Simon Glass Jan. 20, 2016, 8:26 p.m. UTC | #1
On 13 January 2016 at 20:38, Bin Meng <bmeng.cn@gmail.com> wrote:
> 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>
>
> ---
>
> Changes in v2:
> - Rewrite the commit message using 'git revert' format.
>
>  common/fdt_support.c | 16 +---------------
>  1 file changed, 1 insertion(+), 15 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass Jan. 21, 2016, 3:18 p.m. UTC | #2
On 20 January 2016 at 13:26, Simon Glass <sjg@chromium.org> wrote:
> On 13 January 2016 at 20:38, Bin Meng <bmeng.cn@gmail.com> wrote:
>> 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>
>>
>> ---
>>
>> Changes in v2:
>> - Rewrite the commit message using 'git revert' format.
>>
>>  common/fdt_support.c | 16 +---------------
>>  1 file changed, 1 insertion(+), 15 deletions(-)
>
> Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!
diff mbox

Patch

diff --git a/common/fdt_support.c b/common/fdt_support.c
index a539389..4e0d07c 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) {