diff options
author | Mark Dykes <mardyk01@review.trustedfirmware.org> | 2020-02-25 23:39:33 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2020-02-25 23:39:33 +0000 |
commit | 896d684de648b38b6d79f337c213606021f73bb0 (patch) | |
tree | 94fc42666fb6622b34b2389c2fcf720ba2334714 /drivers | |
parent | c723ef018f55c708b398f7d5b9868cd2b20c22f4 (diff) | |
parent | 7db9a0b9df68fbc2772dcf8c1b59506a7329c637 (diff) | |
download | platform_external_arm-trusted-firmware-896d684de648b38b6d79f337c213606021f73bb0.tar.gz platform_external_arm-trusted-firmware-896d684de648b38b6d79f337c213606021f73bb0.tar.bz2 platform_external_arm-trusted-firmware-896d684de648b38b6d79f337c213606021f73bb0.zip |
Merge changes from topic "console_t_cleanup" into integration
* changes:
marvell: Consolidate console register calls
uniphier: Use generic console_t data structure
spe: Use generic console_t data structure
LS 16550: Use generic console_t data structure
stm32: Use generic console_t data structure
rcar: Use generic console_t data structure
a3700: Use generic console_t data structure
16550: Use generic console_t data structure
imx: Use generic console_t data structure
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/imx/uart/imx_uart.h | 7 | ||||
-rw-r--r-- | drivers/marvell/uart/a3700_console.S | 18 | ||||
-rw-r--r-- | drivers/renesas/rcar/console/rcar_console.S | 10 | ||||
-rw-r--r-- | drivers/renesas/rcar/scif/scif.S | 6 | ||||
-rw-r--r-- | drivers/st/uart/aarch32/stm32_console.S | 14 | ||||
-rw-r--r-- | drivers/ti/uart/aarch32/16550_console.S | 18 | ||||
-rw-r--r-- | drivers/ti/uart/aarch64/16550_console.S | 18 |
7 files changed, 43 insertions, 48 deletions
diff --git a/drivers/imx/uart/imx_uart.h b/drivers/imx/uart/imx_uart.h index 4f6d3de2e..a13302484 100644 --- a/drivers/imx/uart/imx_uart.h +++ b/drivers/imx/uart/imx_uart.h @@ -154,15 +154,10 @@ #ifndef __ASSEMBLER__ -typedef struct { - console_t console; - uintptr_t base; -} console_imx_uart_t; - int console_imx_uart_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud, - console_imx_uart_t *console); + console_t *console); #endif /*__ASSEMBLER__*/ #endif /* IMX_UART_H */ diff --git a/drivers/marvell/uart/a3700_console.S b/drivers/marvell/uart/a3700_console.S index da1ce351c..ecd494ca7 100644 --- a/drivers/marvell/uart/a3700_console.S +++ b/drivers/marvell/uart/a3700_console.S @@ -110,7 +110,7 @@ endfunc console_a3700_core_init .globl console_a3700_register /* ----------------------------------------------- - * int console_a3700_register(console_16550_t *console, + * int console_a3700_register(console_t *console, uintptr_t base, uint32_t clk, uint32_t baud) * Function to initialize and register a new a3700 * console. Storage passed in for the console struct @@ -118,7 +118,7 @@ endfunc console_a3700_core_init * In: x0 - UART register base address * w1 - UART clock in Hz * w2 - Baud rate - * x3 - pointer to empty console_a3700_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 * ----------------------------------------------- @@ -127,7 +127,7 @@ func console_a3700_register mov x7, x30 mov x6, x3 cbz x6, register_fail - str x0, [x6, #CONSOLE_T_A3700_BASE] + str x0, [x6, #CONSOLE_T_BASE] bl console_a3700_core_init cbz x0, register_fail @@ -178,7 +178,7 @@ putc_error: endfunc console_a3700_core_putc /* -------------------------------------------------------- - * int console_a3700_putc(int c, console_a3700_t *console) + * int console_a3700_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 @@ -188,7 +188,7 @@ endfunc console_a3700_core_putc * -------------------------------------------------------- */ func console_a3700_putc - ldr x1, [x1, #CONSOLE_T_A3700_BASE] + ldr x1, [x1, #CONSOLE_T_BASE] b console_a3700_core_putc endfunc console_a3700_putc @@ -208,7 +208,7 @@ func console_a3700_core_getc endfunc console_a3700_core_getc /* --------------------------------------------- - * int console_a3700_getc(console_a3700_t *console) + * int console_a3700_getc(console_t *console) * Function to get a character from the console. * It returns the character grabbed on success * or -1 on if no character is available. @@ -218,7 +218,7 @@ endfunc console_a3700_core_getc * --------------------------------------------- */ func console_a3700_getc - ldr x0, [x0, #CONSOLE_T_A3700_BASE] + ldr x0, [x0, #CONSOLE_T_BASE] b console_a3700_core_getc endfunc console_a3700_getc @@ -237,7 +237,7 @@ func console_a3700_core_flush endfunc console_a3700_core_flush /* --------------------------------------------- - * int console_a3700_flush(console_a3700_t *console) + * int console_a3700_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 @@ -246,7 +246,7 @@ endfunc console_a3700_core_flush * --------------------------------------------- */ func console_a3700_flush - ldr x0, [x0, #CONSOLE_T_A3700_BASE] + ldr x0, [x0, #CONSOLE_T_BASE] b console_a3700_core_flush endfunc console_a3700_flush diff --git a/drivers/renesas/rcar/console/rcar_console.S b/drivers/renesas/rcar/console/rcar_console.S index 859efeceb..4d006b703 100644 --- a/drivers/renesas/rcar/console/rcar_console.S +++ b/drivers/renesas/rcar/console/rcar_console.S @@ -20,14 +20,14 @@ /* ----------------------------------------------- * int console_rcar_register( * uintptr_t base, uint32_t clk, uint32_t baud, - * console_rcar_t *console) + * console_t *console) * Function to initialize and register a new rcar * 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_rcar_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 * ----------------------------------------------- @@ -36,7 +36,7 @@ func console_rcar_register mov x7, x30 mov x6, x3 cbz x6, register_fail - str x0, [x6, #CONSOLE_T_RCAR_BASE] + str x0, [x6, #CONSOLE_T_BASE] bl rcar_log_init cbz x0, register_fail @@ -68,11 +68,11 @@ func console_rcar_init endfunc console_rcar_init /* -------------------------------------------------------- - * int console_rcar_putc(int c, console_rcar_t *console) + * int console_rcar_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 - * x1 - pointer to console_rcar_t structure + * x1 - pointer to console_t structure * Out : return -1 on error else return character. * Clobber list : x2 * -------------------------------------------------------- diff --git a/drivers/renesas/rcar/scif/scif.S b/drivers/renesas/rcar/scif/scif.S index 8309bb26e..064aba471 100644 --- a/drivers/renesas/rcar/scif/scif.S +++ b/drivers/renesas/rcar/scif/scif.S @@ -126,14 +126,14 @@ /* ----------------------------------------------- * int console_rcar_register( * uintptr_t base, uint32_t clk, uint32_t baud, - * console_rcar_t *console) + * console_t *console) * Function to initialize and register a new rcar * 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_rcar_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 * ----------------------------------------------- @@ -142,7 +142,7 @@ func console_rcar_register mov x7, x30 mov x6, x3 cbz x6, register_fail - str x0, [x6, #CONSOLE_T_RCAR_BASE] + str x0, [x6, #CONSOLE_T_BASE] bl console_rcar_init diff --git a/drivers/st/uart/aarch32/stm32_console.S b/drivers/st/uart/aarch32/stm32_console.S index ca3c1f618..0ed37d1bd 100644 --- a/drivers/st/uart/aarch32/stm32_console.S +++ b/drivers/st/uart/aarch32/stm32_console.S @@ -91,14 +91,14 @@ endfunc console_stm32_core_init /* ------------------------------------------------------- * int console_stm32_register(uintptr_t baseaddr, * uint32_t clock, uint32_t baud, - * struct console_stm32 *console); + * console_t *console); * Function to initialize and register a new STM32 * console. Storage passed in for the console struct * *must* be persistent (i.e. not from the stack). * In: r0 - UART register base address * r1 - UART clock in Hz * r2 - Baud rate - * r3 - pointer to empty console_stm32 struct + * r3 - pointer to empty console_t struct * Out: return 1 on success, 0 on error * Clobber list : r0, r1, r2 * ------------------------------------------------------- @@ -108,7 +108,7 @@ func console_stm32_register mov r4, r3 cmp r4, #0 beq register_fail - str r0, [r4, #CONSOLE_T_STM32_BASE] + str r0, [r4, #CONSOLE_T_BASE] bl console_stm32_core_init cmp r0, #0 @@ -157,7 +157,7 @@ putc_error: endfunc console_stm32_core_putc /* ------------------------------------------------------------ - * int console_stm32_putc(int c, struct console_stm32 *console) + * int console_stm32_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: r0 - character to be printed @@ -171,7 +171,7 @@ func console_stm32_putc cmp r1, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr r1, [r1, #CONSOLE_T_STM32_BASE] + ldr r1, [r1, #CONSOLE_T_BASE] b console_stm32_core_putc endfunc console_stm32_putc @@ -219,7 +219,7 @@ flush_error: endfunc console_stm32_core_flush /* ------------------------------------------------------ - * int console_stm32_flush(struct console_stm32 *console) + * int console_stm32_flush(console_t *console) * Function to force a write of all buffered * data that hasn't been output. * In : r0 - pointer to console_t structure @@ -232,6 +232,6 @@ func console_stm32_flush cmp r0, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr r0, [r0, #CONSOLE_T_STM32_BASE] + ldr r0, [r0, #CONSOLE_T_BASE] b console_stm32_core_flush endfunc console_stm32_flush diff --git a/drivers/ti/uart/aarch32/16550_console.S b/drivers/ti/uart/aarch32/16550_console.S index 5cd9b30cd..bc0b3ab1c 100644 --- a/drivers/ti/uart/aarch32/16550_console.S +++ b/drivers/ti/uart/aarch32/16550_console.S @@ -91,7 +91,7 @@ endfunc console_16550_core_init /* ------------------------------------------------------- * int console_16550_register(uintptr_t baseaddr, * uint32_t clock, uint32_t baud, - * console_16550_t *console); + * console_t *console); * Function to initialize and register a new 16550 * console. Storage passed in for the console struct * *must* be persistent (i.e. not from the stack). @@ -101,7 +101,7 @@ endfunc console_16550_core_init * In: r0 - UART register base address * r1 - UART clock in Hz * r2 - Baud rate (ignored if r1 is 0) - * r3 - pointer to empty console_16550_t struct + * r3 - pointer to empty console_t struct * Out: return 1 on success, 0 on error * Clobber list : r0, r1, r2 * ------------------------------------------------------- @@ -111,7 +111,7 @@ func console_16550_register mov r4, r3 cmp r4, #0 beq register_fail - str r0, [r4, #CONSOLE_T_16550_BASE] + str r0, [r4, #CONSOLE_T_BASE] /* A clock rate of zero means to skip the initialisation. */ cmp r1, #0 @@ -167,7 +167,7 @@ func console_16550_core_putc endfunc console_16550_core_putc /* -------------------------------------------------------- - * int console_16550_putc(int c, console_16550_t *console) + * int console_16550_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 : r0 - character to be printed @@ -181,7 +181,7 @@ func console_16550_putc cmp r1, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr r1, [r1, #CONSOLE_T_16550_BASE] + ldr r1, [r1, #CONSOLE_T_BASE] b console_16550_core_putc endfunc console_16550_putc @@ -213,7 +213,7 @@ no_char: endfunc console_16550_core_getc /* --------------------------------------------- - * int console_16550_getc(console_16550_t *console) + * int console_16550_getc(console_t *console) * Function to get a character from the console. * It returns the character grabbed on success * or -1 on if no character is available. @@ -227,7 +227,7 @@ func console_16550_getc cmp r0, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr r0, [r0, #CONSOLE_T_16550_BASE] + ldr r0, [r0, #CONSOLE_T_BASE] b console_16550_core_getc endfunc console_16550_getc @@ -257,7 +257,7 @@ func console_16550_core_flush endfunc console_16550_core_flush /* --------------------------------------------- - * int console_16550_flush(console_pl011_t *console) + * int console_16550_flush(console_t *console) * Function to force a write of all buffered * data that hasn't been output. * In : r0 - pointer to console_t structure @@ -270,6 +270,6 @@ func console_16550_flush cmp r0, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr r0, [r0, #CONSOLE_T_16550_BASE] + ldr r0, [r0, #CONSOLE_T_BASE] b console_16550_core_flush endfunc console_16550_flush diff --git a/drivers/ti/uart/aarch64/16550_console.S b/drivers/ti/uart/aarch64/16550_console.S index 80c1b8646..064022798 100644 --- a/drivers/ti/uart/aarch64/16550_console.S +++ b/drivers/ti/uart/aarch64/16550_console.S @@ -88,7 +88,7 @@ endfunc console_16550_core_init /* ----------------------------------------------- * int console_16550_register(uintptr_t baseaddr, * uint32_t clock, uint32_t baud, - * console_16550_t *console); + * console_t *console); * Function to initialize and register a new 16550 * console. Storage passed in for the console struct * *must* be persistent (i.e. not from the stack). @@ -98,7 +98,7 @@ endfunc console_16550_core_init * In: x0 - UART register base address * w1 - UART clock in Hz * w2 - Baud rate (ignored if w1 is 0) - * x3 - pointer to empty console_16550_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 * ----------------------------------------------- @@ -107,7 +107,7 @@ func console_16550_register mov x7, x30 mov x6, x3 cbz x6, register_fail - str x0, [x6, #CONSOLE_T_16550_BASE] + str x0, [x6, #CONSOLE_T_BASE] /* A clock rate of zero means to skip the initialisation. */ cbz w1, register_16550 @@ -161,7 +161,7 @@ func console_16550_core_putc endfunc console_16550_core_putc /* -------------------------------------------------------- - * int console_16550_putc(int c, console_16550_t *console) + * int console_16550_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 @@ -175,7 +175,7 @@ func console_16550_putc cmp x1, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr x1, [x1, #CONSOLE_T_16550_BASE] + ldr x1, [x1, #CONSOLE_T_BASE] b console_16550_core_putc endfunc console_16550_putc @@ -206,7 +206,7 @@ no_char: endfunc console_16550_core_getc /* --------------------------------------------- - * int console_16550_getc(console_16550_t *console) + * int console_16550_getc(console_t *console) * Function to get a character from the console. * It returns the character grabbed on success * or -1 on if no character is available. @@ -220,7 +220,7 @@ func console_16550_getc cmp x1, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr x0, [x0, #CONSOLE_T_16550_BASE] + ldr x0, [x0, #CONSOLE_T_BASE] b console_16550_core_getc endfunc console_16550_getc @@ -250,7 +250,7 @@ func console_16550_core_flush endfunc console_16550_core_flush /* --------------------------------------------- - * int console_16550_flush(console_pl011_t *console) + * int console_16550_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 @@ -263,6 +263,6 @@ func console_16550_flush cmp x0, #0 ASM_ASSERT(ne) #endif /* ENABLE_ASSERTIONS */ - ldr x0, [x0, #CONSOLE_T_16550_BASE] + ldr x0, [x0, #CONSOLE_T_BASE] b console_16550_core_flush endfunc console_16550_flush |