summaryrefslogtreecommitdiff
path: root/plat/sun50iw1p1/aarch64
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-02-06 17:08:00 +0000
committerAndre Przywara <andre.przywara@arm.com>2016-02-16 01:35:09 +0000
commit77e8eee85765d55768017f653adf8132d75e5143 (patch)
tree8f4e5a4245be2769d29bd42002ed311aee9c3f5b /plat/sun50iw1p1/aarch64
parentfec2e9b4610a0475dc5073157d018f165ecfff71 (diff)
sun50i: platform.S: clean up serial console
Add some constants to the console code to make it more readable.
Diffstat (limited to 'plat/sun50iw1p1/aarch64')
-rw-r--r--plat/sun50iw1p1/aarch64/plat_helpers.S21
1 files changed, 11 insertions, 10 deletions
diff --git a/plat/sun50iw1p1/aarch64/plat_helpers.S b/plat/sun50iw1p1/aarch64/plat_helpers.S
index 690de8d..7a1e851 100644
--- a/plat/sun50iw1p1/aarch64/plat_helpers.S
+++ b/plat/sun50iw1p1/aarch64/plat_helpers.S
@@ -59,20 +59,21 @@ func platform_smp_init
msr cntvoff_el2, x0
ret
+#define UART_TX 0 /* Out: Transmit buffer */
+#define UART_LSR 5 /* In: Line Status Register */
+#define UART_LSR_TEMT_BIT 6 /* Transmitter empty */
+
+/* Use UART0 both for the normal console and for the crash console as well. */
+plat_crash_console_putc:
func console_core_putc
- ldr x1, =0x01c28000
+ ldr x1, =SUNXI_UART0_BASE
1:
- ldr w2, [x1,#20]
- tbz w2, #6, 1b
- str w0, [x1,#0]
+ ldr w2, [x1, #(UART_LSR * 4)]
+ tbz w2, #UART_LSR_TEMT_BIT, 1b
+ str w0, [x1, #0]
ret
+/* nothing to do here, just return 1 to indicate success */
func plat_crash_console_init
mov w0, #1
ret
-
-func plat_crash_console_putc
- b console_core_putc
-
-
-