diff options
author | David Daney <ddaney@caviumnetworks.com> | 2010-05-19 17:16:32 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-05-21 16:31:23 -0400 |
commit | 606c958e2857d29106b8d3b2fc30e22f376c80c5 (patch) | |
tree | d5ea9847b33df34228570f36733bf2eadfae45b5 /arch/mips/cavium-octeon/serial.c | |
parent | 1dd5216e80318b4cb25c1785f5d11a6f042f0a3b (diff) |
MIPS: Octeon: Serial port fixes for OCTEON simulator.
For the simulator, fake a slow clock to get fast output.
In prom_putchar we have to mask the value so the simulator doesn't
ASSERT when printing non-ASCII characters.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1255/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/cavium-octeon/serial.c')
-rw-r--r-- | arch/mips/cavium-octeon/serial.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/mips/cavium-octeon/serial.c b/arch/mips/cavium-octeon/serial.c index 8240728d485a..83eac37a1ff9 100644 --- a/arch/mips/cavium-octeon/serial.c +++ b/arch/mips/cavium-octeon/serial.c | |||
@@ -65,7 +65,11 @@ static void __init octeon_uart_set_common(struct plat_serial8250_port *p) | |||
65 | p->type = PORT_OCTEON; | 65 | p->type = PORT_OCTEON; |
66 | p->iotype = UPIO_MEM; | 66 | p->iotype = UPIO_MEM; |
67 | p->regshift = 3; /* I/O addresses are every 8 bytes */ | 67 | p->regshift = 3; /* I/O addresses are every 8 bytes */ |
68 | p->uartclk = mips_hpt_frequency; | 68 | if (octeon_is_simulation()) |
69 | /* Make simulator output fast*/ | ||
70 | p->uartclk = 115200 * 16; | ||
71 | else | ||
72 | p->uartclk = mips_hpt_frequency; | ||
69 | p->serial_in = octeon_serial_in; | 73 | p->serial_in = octeon_serial_in; |
70 | p->serial_out = octeon_serial_out; | 74 | p->serial_out = octeon_serial_out; |
71 | } | 75 | } |