提交 01d42abd 编写于 作者: R Ralf Baechle

Using get_nasid() to find the console node will blow up nicely if

called on a another node than the console node, so use the master_nasid
instead and in the unlikely case that one isn't initialized yet, fall
back to get_nasid().
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 c4559f67
......@@ -30,8 +30,10 @@
static inline struct ioc3_uartregs *console_uart(void)
{
struct ioc3 *ioc3;
nasid_t nasid;
ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(get_nasid())->memory_base;
nasid = (master_nasid == INVALID_NASID) ? get_nasid() : master_nasid;
ioc3 = (struct ioc3 *)KL_CONFIG_CH_CONS_INFO(nasid)->memory_base;
return &ioc3->sregs.uarta;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册