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>
This commit is contained in:
parent
080e14f0f4
commit
3620e6b969
|
@ -13,7 +13,7 @@
|
|||
* @param c Character to output
|
||||
* @return The character passed as input.
|
||||
*/
|
||||
static int console_out(int c)
|
||||
int arch_printk_char_out(int c)
|
||||
{
|
||||
char buf[16];
|
||||
|
||||
|
@ -54,8 +54,8 @@ extern void __printk_hook_install(int (*fn)(int));
|
|||
*/
|
||||
static void xt_sim_console_hook_install(void)
|
||||
{
|
||||
__stdout_hook_install(console_out);
|
||||
__printk_hook_install(console_out);
|
||||
__stdout_hook_install(arch_printk_char_out);
|
||||
__printk_hook_install(arch_printk_char_out);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue