summaryrefslogtreecommitdiff
path: root/src/drivers/uart/pl011.c
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2016-05-07 09:04:46 -0700
committerLeroy P Leahy <leroy.p.leahy@intel.com>2016-05-09 18:45:44 +0200
commit6ec72c9b4f4a903d9a451bc17629e679399aa9ee (patch)
tree815f70ba90e3646911d8380d803c823f1fefb507 /src/drivers/uart/pl011.c
parent148762110c8a00c88b8e0326ec69dc7392bf3739 (diff)
downloadcoreboot-6ec72c9b4f4a903d9a451bc17629e679399aa9ee.tar.xz
drivers/uart: Use uart_platform_refclk for all UART models
Allow the platform to override the input clock for the UART by implementing the routine uart_platform_refclk and setting the Kconfig value UART_OVERRIDE_REFCLK. Provide a default uart_platform_refclk routine which is disabled when UART_OVERRIDE_REFCLK is selected. This works around ROMCC not supporting weak routines. Testing on Galileo: * Edit the src/mainboard/intel/galileo/Makefile.inc file: * Add "select ADD_FSP_PDAT_FILE" * Add "select ADD_FSP_RAW_BIN" * Add "select ADD_RMU_FILE" * Place the FSP.bin file in the location specified by CONFIG_FSP_FILE * Place the pdat.bin files in the location specified by CONFIG_FSP_PDAT_FILE * Place the rmu.bin file in the location specified by CONFIG_RMU_FILE * Build EDK2 CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc to generate UEFIPAYLOAD.fd * Testing is successful when CorebootPayloadPkg is able to properly initialize the serial port without using built-in values. Change-Id: If4afc45a828e5ba935fecb6d95b239625e912d14 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-on: https://review.coreboot.org/14612 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/drivers/uart/pl011.c')
-rw-r--r--src/drivers/uart/pl011.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/drivers/uart/pl011.c b/src/drivers/uart/pl011.c
index 808cb46538..0c7ac08ed5 100644
--- a/src/drivers/uart/pl011.c
+++ b/src/drivers/uart/pl011.c
@@ -48,10 +48,7 @@ void uart_fill_lb(void *data)
serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
serial.baud = default_baudrate();
serial.regwidth = 1;
- if (IS_ENABLED(CONFIG_UART_USE_REFCLK_AS_INPUT_CLOCK))
- serial.input_hertz = uart_platform_refclk();
- else
- serial.input_hertz = 0;
+ serial.input_hertz = uart_platform_refclk();
serial.uart_pci_addr = CONFIG_UART_PCI_ADDR;
lb_add_serial(&serial, data);