aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexei Colin <acolin@isi.edu>2018-11-09 17:36:55 -0500
committerAlexei Colin <acolin@isi.edu>2018-11-12 09:35:49 -0500
commit23b6fa4ee11dcbcb0bc4b0c462c536766e2a639a (patch)
treef6716be897b2a2979e4082efff8e43d158b33207
parent9d068f66b15e644df4961b74b965323c20f21f14 (diff)
downloadtrusted-firmware-a-23b6fa4ee11dcbcb0bc4b0c462c536766e2a639a.tar.gz
cadence: uart: comply to console_register prototype
Signed-off-by: Alexei Colin <acolin@isi.edu>
-rw-r--r--drivers/cadence/uart/aarch64/cdns_console.S10
-rw-r--r--include/drivers/cadence/cdns_uart.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/cadence/uart/aarch64/cdns_console.S b/drivers/cadence/uart/aarch64/cdns_console.S
index 8f46a62721..418810e15c 100644
--- a/drivers/cadence/uart/aarch64/cdns_console.S
+++ b/drivers/cadence/uart/aarch64/cdns_console.S
@@ -56,21 +56,23 @@ endfunc console_cdns_core_init
.globl console_cdns_register
/* -----------------------------------------------
- * int console_cdns_register(uint64_t baseaddr,
+ * int console_cdns_register(uintptr_t baseaddr,
* uint32_t clock, uint32_t baud,
* console_cdns_t *console);
* Function to initialize and register a new CDNS
* console. Storage passed in for the console struct
* *must* be persistent (i.e. not from the stack).
* In: x0 - UART register base address
- * x1 - pointer to empty console_cdns_t struct
+ * w1 - UART clock in Hz
+ * w2 - Baud rate
+ * x3 - pointer to empty console_16550_t struct
* Out: return 1 on success, 0 on error
* Clobber list : x0, x1, x2, x6, x7, x14
* -----------------------------------------------
*/
func console_cdns_register
mov x7, x30
- mov x6, x1
+ mov x6, x3
cbz x6, register_fail
str x0, [x6, #CONSOLE_T_CDNS_BASE]
@@ -78,7 +80,7 @@ func console_cdns_register
cbz x0, register_fail
mov x0, x6
- mov x30, v7
+ mov x30, x7
finish_console_register cdns putc=1, getc=1, flush=1
register_fail:
diff --git a/include/drivers/cadence/cdns_uart.h b/include/drivers/cadence/cdns_uart.h
index f92d9fbed0..490be108e5 100644
--- a/include/drivers/cadence/cdns_uart.h
+++ b/include/drivers/cadence/cdns_uart.h
@@ -42,7 +42,7 @@ typedef struct {
* for the lifetime of the console, such as a global or static local variable.
* Its contents will be reinitialized from scratch.
*/
-int console_cdns_register(uint64_t baseaddr, uint32_t clock, uint32_t baud,
+int console_cdns_register(uintptr_t baseaddr, uint32_t clock, uint32_t baud,
console_cdns_t *console);
#endif /*__ASSEMBLY__*/