summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2021-09-02 10:03:03 +0100
committerMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2021-09-02 10:17:43 +0100
commit9cd695aa3ca280ecc0b867be59d45d0605caf12b (patch)
treef59b982afde628738127d49633cb1c0fba14ab8f
parent4a0041107b8ef77e0e8337bfcb5f8078887261a7 (diff)
downloadqemu-openbios-9cd695aa3ca280ecc0b867be59d45d0605caf12b.tar.gz
escc: add port index to uart_init_line()
This will be needed to allow uart_init_line() to reset the correct port. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-rw-r--r--drivers/escc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/escc.c b/drivers/escc.c
index d9e19909..4da89174 100644
--- a/drivers/escc.c
+++ b/drivers/escc.c
@@ -78,7 +78,7 @@ static void escc_uart_port_putchar(uintptr_t port, unsigned char c)
DATA(port) = c;
}
-static void uart_init_line(volatile unsigned char *port, unsigned long baud)
+static void uart_init_line(volatile unsigned char *port, unsigned long baud, int index)
{
CTRL(port) = 4; // reg 4
CTRL(port) = SB1 | X16CLK; // no parity, async, 1 stop bit, 16x
@@ -110,7 +110,7 @@ int escc_uart_init(phys_addr_t port, unsigned long speed)
#else
escc_serial_dev = (unsigned char *)(uintptr_t)port;
#endif
- uart_init_line(escc_serial_dev, speed);
+ uart_init_line(escc_serial_dev, speed, 1);
return -1;
}
@@ -518,7 +518,7 @@ escc_add_channel(const char *path, const char *node, phys_addr_t addr,
fword("finish-device");
uart_init_line((unsigned char*)addr + offset + reg_offsets[legacy][index][0],
- CONFIG_SERIAL_SPEED);
+ CONFIG_SERIAL_SPEED, index);
}
void