Skip to content

Commit 44151ea

Browse files
zhangqingmytsbogend
authored andcommitted
MIPS: Loongson64: Add Loongson-2K1000 early_printk_port
Distinguish between Loongson-3A series CPU and Loongson-2K1000 CPU UART0. Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Qing Zhang <[email protected]> Tested-by: Ming Wang <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 95b56e8 commit 44151ea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arch/mips/loongson64/init.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,10 @@ void __init prom_init(void)
120120
#endif
121121

122122
/* Hardcode to CPU UART 0 */
123-
setup_8250_early_printk_port(TO_UNCAC(LOONGSON_REG_BASE + 0x1e0), 0, 1024);
123+
if ((read_c0_prid() & PRID_IMP_MASK) == PRID_IMP_LOONGSON_64R)
124+
setup_8250_early_printk_port(TO_UNCAC(LOONGSON_REG_BASE), 0, 1024);
125+
else
126+
setup_8250_early_printk_port(TO_UNCAC(LOONGSON_REG_BASE + 0x1e0), 0, 1024);
124127

125128
register_smp_ops(&loongson3_smp_ops);
126129
board_nmi_handler_setup = mips_nmi_setup;

0 commit comments

Comments
 (0)