Commit 7db9a0b9 authored by Andre Przywara's avatar Andre Przywara
Browse files

marvell: Consolidate console register calls



Now that different UARTs share the same console_t struct, we can
simplify the console selection for the Marvell platforms:
We share the same console_t pointers, just change the name of the
console register functions, depending on the selected platform.

Change-Id: I6fe3e49fd7f208a9b3372c5deef43236a12867bc
Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
parent af1e8fda
...@@ -14,15 +14,14 @@ ...@@ -14,15 +14,14 @@
#ifdef PLAT_a3700 #ifdef PLAT_a3700
#include <drivers/marvell/uart/a3700_console.h> #include <drivers/marvell/uart/a3700_console.h>
#define console_marvell_register console_a3700_register
static console_t marvell_boot_console;
static console_t marvell_runtime_console;
#else #else
#include <drivers/ti/uart/uart_16550.h> #include <drivers/ti/uart/uart_16550.h>
#define console_marvell_register console_16550_register
#endif
static console_t marvell_boot_console; static console_t marvell_boot_console;
static console_t marvell_runtime_console; static console_t marvell_runtime_console;
#endif
/******************************************************************************* /*******************************************************************************
* Functions that set up the console * Functions that set up the console
...@@ -32,12 +31,7 @@ static console_t marvell_runtime_console; ...@@ -32,12 +31,7 @@ static console_t marvell_runtime_console;
void marvell_console_boot_init(void) void marvell_console_boot_init(void)
{ {
int rc = int rc =
#ifdef PLAT_a3700 console_marvell_register(PLAT_MARVELL_BOOT_UART_BASE,
console_a3700_register(
#else
console_16550_register(
#endif
PLAT_MARVELL_BOOT_UART_BASE,
PLAT_MARVELL_BOOT_UART_CLK_IN_HZ, PLAT_MARVELL_BOOT_UART_CLK_IN_HZ,
MARVELL_CONSOLE_BAUDRATE, MARVELL_CONSOLE_BAUDRATE,
&marvell_boot_console); &marvell_boot_console);
...@@ -64,12 +58,7 @@ void marvell_console_boot_end(void) ...@@ -64,12 +58,7 @@ void marvell_console_boot_end(void)
void marvell_console_runtime_init(void) void marvell_console_runtime_init(void)
{ {
int rc = int rc =
#ifdef PLAT_a3700 console_marvell_register(PLAT_MARVELL_BOOT_UART_BASE,
console_a3700_register(
#else
console_16550_register(
#endif
PLAT_MARVELL_BOOT_UART_BASE,
PLAT_MARVELL_BOOT_UART_CLK_IN_HZ, PLAT_MARVELL_BOOT_UART_CLK_IN_HZ,
MARVELL_CONSOLE_BAUDRATE, MARVELL_CONSOLE_BAUDRATE,
&marvell_runtime_console); &marvell_runtime_console);
......
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