Skip to content

Commit b0c556f

Browse files
committed
[DM][OFW] Support only option name way for earlycon
Like "earlycon=hvc earlycon=sbi"... Signed-off-by: GuEe-GUI <[email protected]>
1 parent f1b6fc1 commit b0c556f

File tree

1 file changed

+8
-0
lines changed
  • components/drivers/ofw

1 file changed

+8
-0
lines changed

components/drivers/ofw/fdt.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,11 @@ rt_err_t rt_fdt_scan_chosen_stdout(void)
692692

693693
if (*options)
694694
{
695+
int type_len_no_option;
696+
695697
type_len = strchrnul(options, ',') - options;
698+
type_len_no_option = strchrnul(options, ' ') - options;
699+
type_len = rt_min(type_len, type_len_no_option);
696700
}
697701
}
698702

@@ -795,6 +799,10 @@ rt_err_t rt_fdt_scan_chosen_stdout(void)
795799
LOG_I("Earlycon: %s at MMIO/PIO %p (options '%s')",
796800
con_type, fdt_earlycon.mmio, fdt_earlycon.options);
797801
}
802+
else if (con_type)
803+
{
804+
LOG_I("Earlycon: %s (options '%s')", con_type, fdt_earlycon.options);
805+
}
798806

799807
return err;
800808
}

0 commit comments

Comments
 (0)