Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 606c958e authored by David Daney's avatar David Daney Committed by Ralf Baechle
Browse files

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: default avatarDavid Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1255/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 1dd5216e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -65,6 +65,10 @@ static void __init octeon_uart_set_common(struct plat_serial8250_port *p)
	p->type = PORT_OCTEON;
	p->iotype = UPIO_MEM;
	p->regshift = 3;	/* I/O addresses are every 8 bytes */
	if (octeon_is_simulation())
		/* Make simulator output fast*/
		p->uartclk = 115200 * 16;
	else
		p->uartclk = mips_hpt_frequency;
	p->serial_in = octeon_serial_in;
	p->serial_out = octeon_serial_out;
+1 −1
Original line number Diff line number Diff line
@@ -702,7 +702,7 @@ int prom_putchar(char c)
	} while ((lsrval & 0x20) == 0);

	/* Write the byte */
	cvmx_write_csr(CVMX_MIO_UARTX_THR(octeon_uart), c);
	cvmx_write_csr(CVMX_MIO_UARTX_THR(octeon_uart), c & 0xffull);
	return 1;
}