mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
spe: Use generic console_t data structure
Since now the generic console_t structure holds the UART base address as well, let's use that generic location and drop the UART driver specific data structure at all. Change-Id: I75dbfafb67849833b3f7b5047e237651e3f553cd Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
9536a25e03
commit
7b8fe2de31
3 changed files with 7 additions and 12 deletions
|
@ -49,14 +49,14 @@
|
|||
/* -------------------------------------------------
|
||||
* int console_spe_register(uintptr_t baseaddr,
|
||||
* uint32_t clock, uint32_t baud,
|
||||
* console_spe_t *console);
|
||||
* console_t *console);
|
||||
* Function to initialize and register a new spe
|
||||
* console. Storage passed in for the console struct
|
||||
* *must* be persistent (i.e. not from the stack).
|
||||
* In: x0 - UART register base address
|
||||
* w1 - UART clock in Hz
|
||||
* w2 - Baud rate
|
||||
* x3 - pointer to empty console_spe_t struct
|
||||
* x3 - pointer to empty console_t struct
|
||||
* Out: return 1 on success, 0 on error
|
||||
* Clobber list : x0, x1, x2, x6, x7, x14
|
||||
* -------------------------------------------------
|
||||
|
@ -122,7 +122,7 @@ putc_error:
|
|||
endfunc console_spe_core_putc
|
||||
|
||||
/* --------------------------------------------------------
|
||||
* int console_spe_putc(int c, console_spe_t *console)
|
||||
* int console_spe_putc(int c, console_t *console)
|
||||
* Function to output a character over the console. It
|
||||
* returns the character printed on success or -1 on error.
|
||||
* In : w0 - character to be printed
|
||||
|
@ -137,7 +137,7 @@ func console_spe_putc
|
|||
endfunc console_spe_putc
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int console_spe_getc(console_spe_t *console)
|
||||
* int console_spe_getc(console_t *console)
|
||||
* Function to get a character from the console.
|
||||
* It returns the character grabbed on success
|
||||
* or -1 if no character is available.
|
||||
|
@ -174,7 +174,7 @@ flush_error:
|
|||
endfunc console_spe_core_flush
|
||||
|
||||
/* ---------------------------------------------
|
||||
* int console_spe_flush(console_spe_t *console)
|
||||
* int console_spe_flush(console_t *console)
|
||||
* Function to force a write of all buffered
|
||||
* data that hasn't been output.
|
||||
* In : x0 - pointer to console_t structure
|
||||
|
|
|
@ -11,11 +11,6 @@
|
|||
|
||||
#include <drivers/console.h>
|
||||
|
||||
typedef struct {
|
||||
console_t console;
|
||||
uintptr_t base;
|
||||
} console_spe_t;
|
||||
|
||||
/*
|
||||
* Initialize a new spe console instance and register it with the console
|
||||
* framework. The |console| pointer must point to storage that will be valid
|
||||
|
@ -23,6 +18,6 @@ typedef struct {
|
|||
* Its contents will be reinitialized from scratch.
|
||||
*/
|
||||
int console_spe_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
|
||||
console_spe_t *console);
|
||||
console_t *console);
|
||||
|
||||
#endif /* SPE_H */
|
||||
|
|
|
@ -163,7 +163,7 @@ void plat_enable_console(int32_t id)
|
|||
uint32_t console_clock = 0U;
|
||||
|
||||
#if ENABLE_CONSOLE_SPE
|
||||
static console_spe_t spe_console;
|
||||
static console_t spe_console;
|
||||
|
||||
if (id == TEGRA_CONSOLE_SPE_ID) {
|
||||
(void)console_spe_register(TEGRA_CONSOLE_SPE_BASE,
|
||||
|
|
Loading…
Add table
Reference in a new issue