Skip to content

Commit 8e7d434

Browse files
committed
drivers/console: xtensa_sim_console: implement arch_printk_char_out()
This is an older driver and didn't support the weak arch_printk_char_out() hook, which is a link-time symbol that allows logging to work from the first instruction. Some drivers can't do that because they need an initialization step, but this one works great. Signed-off-by: Andy Ross <andyross@google.com>
1 parent 27dedec commit 8e7d434

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/console/xtensa_sim_console.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @param c Character to output
1414
* @return The character passed as input.
1515
*/
16-
static int console_out(int c)
16+
int arch_printk_char_out(int c)
1717
{
1818
char buf[16];
1919

@@ -54,8 +54,8 @@ extern void __printk_hook_install(int (*fn)(int));
5454
*/
5555
static void xt_sim_console_hook_install(void)
5656
{
57-
__stdout_hook_install(console_out);
58-
__printk_hook_install(console_out);
57+
__stdout_hook_install(arch_printk_char_out);
58+
__printk_hook_install(arch_printk_char_out);
5959
}
6060

6161
/**

0 commit comments

Comments
 (0)