From a7c609c262d5beba968519903fed297dc4b601c1 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 9 Sep 2015 13:27:09 +0200 Subject: libpayload: Fix merge of PL011 UART support Wished I hadn't seen that. Git saw the conflict (file was gone), both committer and reviewer thought it would be a good idea to re-add it as dead code (see 558e9b5: libpayload: Add minimal support for PL011 UART). Change-Id: Ifea8113fbc59e0463eaedb86b976f54ec11113a9 Signed-off-by: Nico Huber Reviewed-on: http://review.coreboot.org/11604 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Stefan Reinauer --- payloads/libpayload/drivers/serial/8250.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'payloads/libpayload/drivers/serial') diff --git a/payloads/libpayload/drivers/serial/8250.c b/payloads/libpayload/drivers/serial/8250.c index e9550f3e33..7fe9920a6c 100644 --- a/payloads/libpayload/drivers/serial/8250.c +++ b/payloads/libpayload/drivers/serial/8250.c @@ -67,6 +67,7 @@ static void serial_hardware_init(int speed, int word_bits, { unsigned char reg; +#if !IS_ENABLED(CONFIG_LP_PL011_SERIAL_CONSOLE) /* Disable interrupts. */ serial_write_reg(0, 0x01); @@ -85,6 +86,7 @@ static void serial_hardware_init(int speed, int word_bits, /* Restore the previous value of the divisor. * And set 8 bits per character */ serial_write_reg((reg & ~0x80) | 3, 0x03); +#endif } #endif @@ -139,7 +141,9 @@ void serial_putchar(unsigned int c) { if (!serial_hardware_is_present) return; +#if !IS_ENABLED(CONFIG_LP_PL011_SERIAL_CONSOLE) while ((serial_read_reg(0x05) & 0x20) == 0) ; +#endif serial_write_reg(c, 0x00); if (c == '\n') serial_putchar('\r'); -- cgit v1.2.3