git: 31f2b822e627 - main - aw_ccu: h6: Document why the UART gates are not enabled
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Nov 2026 09:51:49 UTC
The branch main has been updated by manu:
URL: https://cgit.FreeBSD.org/src/commit/?id=31f2b822e627d683d48951dfe75c9d9091a6be16
commit 31f2b822e627d683d48951dfe75c9d9091a6be16
Author: Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2026-11-11 06:44:31 +0000
Commit: Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2026-11-12 09:47:33 +0000
aw_ccu: h6: Document why the UART gates are not enabled
Enabling the gates makes uart_snps get the clock rate from the CCU, it
then detects a 256 bytes FIFO and the input of the console is delayed:
a character is only seen when the next one is typed. Explain it in the
comment instead of the old "weird behavior".
Tested on: H6
---
sys/dev/clk/allwinner/ccu_h6.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sys/dev/clk/allwinner/ccu_h6.c b/sys/dev/clk/allwinner/ccu_h6.c
index 65f233531185..05eb8389fbca 100644
--- a/sys/dev/clk/allwinner/ccu_h6.c
+++ b/sys/dev/clk/allwinner/ccu_h6.c
@@ -281,7 +281,12 @@ static struct aw_ccung_gate h6_ccu_gates[] = {
CCU_GATE(CLK_BUS_MMC1, "bus-mmc1", "ahb3", 0x84c, 1)
CCU_GATE(CLK_BUS_MMC2, "bus-mmc2", "ahb3", 0x84c, 2)
- /* UART_BGR_REG Enabling the gate enable weir behavior ... */
+ /*
+ * UART_BGR_REG
+ * The gates are not enabled, the firmware leaves the UART0 one on.
+ * With them uart_snps gets the clock rate and detects a 256 bytes
+ * FIFO, and the input of the console is delayed.
+ */
/* CCU_GATE(CLK_BUS_UART0, "bus-uart0", "apb2", 0x90c, 0) */
/* CCU_GATE(CLK_BUS_UART1, "bus-uart1", "apb2", 0x90c, 1) */
/* CCU_GATE(CLK_BUS_UART2, "bus-uart2", "apb2", 0x90c, 2) */