aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson/common/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/loongson/common/serial.c')
-rw-r--r--arch/mips/loongson/common/serial.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/mips/loongson/common/serial.c b/arch/mips/loongson/common/serial.c
index ea29db099aee..23b66a5f88cb 100644
--- a/arch/mips/loongson/common/serial.c
+++ b/arch/mips/loongson/common/serial.c
@@ -57,12 +57,16 @@ static struct platform_device uart8250_device = {
57 57
58static int __init serial_init(void) 58static int __init serial_init(void)
59{ 59{
60 if (uart8250_data[mips_machtype][0].iotype == UPIO_MEM) 60 unsigned char iotype;
61
62 iotype = uart8250_data[mips_machtype][0].iotype;
63
64 if (UPIO_MEM == iotype)
61 uart8250_data[mips_machtype][0].membase = 65 uart8250_data[mips_machtype][0].membase =
62 (void __iomem *)_loongson_uart_base; 66 (void __iomem *)_loongson_uart_base;
63 else if (uart8250_data[mips_machtype][0].iotype == UPIO_PORT) 67 else if (UPIO_PORT == iotype)
64 uart8250_data[mips_machtype][0].iobase = 68 uart8250_data[mips_machtype][0].iobase =
65 uart8250_base[mips_machtype] - LOONGSON_PCIIO_BASE; 69 loongson_uart_base - LOONGSON_PCIIO_BASE;
66 70
67 uart8250_device.dev.platform_data = uart8250_data[mips_machtype]; 71 uart8250_device.dev.platform_data = uart8250_data[mips_machtype];
68 72