]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
Tegra: spe: do not flush console in console_putc
authorVarun Wadekar <vwadekar@nvidia.com>
Fri, 13 Sep 2019 23:31:09 +0000 (16:31 -0700)
committerManish Pandey <manish.pandey2@arm.com>
Mon, 24 Aug 2020 21:26:40 +0000 (21:26 +0000)
SPE no longer requires the flush bit to be set to start transmitting
characters over the physical uart. Therefore, the flush bit is no
longer required when calling console_core_putc. However, flushing the
console still requires the flush bit.

This patch removes the flush bit from the mailbox messages in
console_core_putc to improve ACK latency.

Original change by: Mustafa Bilgen <mbilgen@nvidia.com>

Change-Id: I5b7d1f3ea69ea2ce308566dbaae222b04e4c373d
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
plat/nvidia/tegra/drivers/spe/shared_console.S

index 6df73ec242e5fddf78f7367a5a625c73f0f71aa8..9196c1cd1565a3568479b03de0dc59cc8b33b6e8 100644 (file)
@@ -11,8 +11,7 @@
 #define CONSOLE_FLUSH_DATA_TO_PORT     (1 << 26)
 #define CONSOLE_RING_DOORBELL          (1 << 31)
 #define CONSOLE_IS_BUSY                        (1 << 31)
-#define CONSOLE_TIMEOUT                        0xC000          /* approx. 50 ms */
-#define CONSOLE_WRITE                  (CONSOLE_RING_DOORBELL | CONSOLE_FLUSH_DATA_TO_PORT)
+#define CONSOLE_TIMEOUT                        0xC000          /* 50 ms */
 
        /*
         * This file contains a driver implementation to make use of the
@@ -101,7 +100,7 @@ func console_spe_core_putc
        /* spe is ready */
        mov     w2, #0xD                /* '\r' */
        and     w2, w2, #0xFF
-       mov     w3, #(CONSOLE_WRITE | (1 << CONSOLE_NUM_BYTES_SHIFT))
+       mov     w3, #(CONSOLE_RING_DOORBELL | (1 << CONSOLE_NUM_BYTES_SHIFT))
        orr     w2, w2, w3
        str     w2, [x1]
 
@@ -111,7 +110,7 @@ not_eol:
        /* spe is ready */
        mov     w2, w0
        and     w2, w2, #0xFF
-       mov     w3, #(CONSOLE_WRITE | (1 << CONSOLE_NUM_BYTES_SHIFT))
+       mov     w3, #(CONSOLE_RING_DOORBELL | (1 << CONSOLE_NUM_BYTES_SHIFT))
        orr     w2, w2, w3
        str     w2, [x1]
 
@@ -164,7 +163,7 @@ func console_spe_core_flush
        cbz     x0, flush_error
 
        /* flush console */
-       mov     w1, #CONSOLE_WRITE
+       mov     w1, #(CONSOLE_RING_DOORBELL | CONSOLE_FLUSH_DATA_TO_PORT)
        str     w1, [x0]
        mov     w0, #0
        ret