Commit 93bb7a0a authored by Andre Przywara's avatar Andre Przywara
Browse files

arm_fpga: Use Generic UART



The SCP firmware on the ARM FPGA initialises the UART already. This allows
us to treat the PL011 as an SBSA Generic UART, which does not require
any further setup.

This in particular removes the need for any baudrate and base clock related
settings to be hard coded into the BL31 image.

Change-Id: I16fc943526267356b97166a7068459e06ff77f0f
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent 7a61114d
......@@ -108,8 +108,6 @@ endfunc plat_fpga_calc_core_pos
func plat_crash_console_init
mov_imm x0, PLAT_FPGA_CRASH_UART_BASE
mov_imm x1, PLAT_FPGA_CRASH_UART_CLK_IN_HZ
mov_imm x2, PLAT_FPGA_CONSOLE_BAUDRATE
b console_pl011_core_init
endfunc plat_crash_console_init
......
......@@ -13,9 +13,7 @@ static console_t console;
void fpga_console_init(void)
{
(void)console_pl011_register(PLAT_FPGA_BOOT_UART_BASE,
PLAT_FPGA_BOOT_UART_CLK_IN_HZ,
PLAT_FPGA_CONSOLE_BAUDRATE,
(void)console_pl011_register(PLAT_FPGA_BOOT_UART_BASE, 0, 0,
&console);
console_set_scope(&console, CONSOLE_FLAG_BOOT |
......
......@@ -23,17 +23,13 @@
#define FPGA_MAX_PE_PER_CPU 4
#define FPGA_PRIMARY_CPU 0x0
/*******************************************************************************
* FPGA image memory map related constants
******************************************************************************/
/* UART base address and clock frequency, as configured by the image */
/* UART base address, as configured by the image */
#define PLAT_FPGA_BOOT_UART_BASE 0x7ff80000
#define PLAT_FPGA_BOOT_UART_CLK_IN_HZ 10000000
#define PLAT_FPGA_CRASH_UART_BASE PLAT_FPGA_BOOT_UART_BASE
#define PLAT_FPGA_CRASH_UART_CLK_IN_HZ PLAT_FPGA_BOOT_UART_CLK_IN_HZ
#define FPGA_TIMER_FREQUENCY 10000000
......
......@@ -87,6 +87,4 @@
#define PLAT_FPGA_HOLD_STATE_WAIT 0
#define PLAT_FPGA_HOLD_STATE_GO 1
#define PLAT_FPGA_CONSOLE_BAUDRATE 38400
#endif
......@@ -38,6 +38,8 @@ USE_COHERENT_MEM := 0
# This can be overridden depending on CPU(s) used in the FPGA image
HW_ASSISTED_COHERENCY := 1
PL011_GENERIC_UART := 1
FPGA_CPU_LIBS := lib/cpus/${ARCH}/aem_generic.S
# select a different set of CPU files, depending on whether we compile for
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment