Skip to contentSkip to conversation

clk: sprd: don't gate uart console clock

PATCH In review Chunyan Zhang 2 participants 7 messages Mar 31, 2020 – Apr 11, 2020

Subsystems (2)
lore
Share & tools
lore

Chunyan Zhang

author reviewer
#0 lore raw

PATCH 1/1 clk: sprd: don't gate uart console clock

Don't gate uart1_eb which provides console clock, gating that clock would make serial stop working if serial driver didn't enable that explicitly.

---
 drivers/clk/sprd/sc9863a-clk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/sprd/sc9863a-clk.c +2 -1
index 24f064262814..6c6ac158ef61 100644
@@ -1671,8 +1671,9 @@ static SPRD_SC_GATE_CLK_FW_NAME(i2c4_eb,	"i2c4-eb",	"ext-26m", 0x0,
 				0x1000, BIT(12), 0, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart0_eb,	"uart0-eb",	"ext-26m", 0x0,
 				0x1000, BIT(13), 0, 0);
+/* uart1_eb is for console, don't gate even if unused */
 static SPRD_SC_GATE_CLK_FW_NAME(uart1_eb,	"uart1-eb",	"ext-26m", 0x0,
-				0x1000, BIT(14), 0, 0);
+				0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart2_eb,	"uart2-eb",	"ext-26m", 0x0,
 				0x1000, BIT(15), 0, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart3_eb,	"uart3-eb",	"ext-26m", 0x0,
Signature · 1 line
2.20.1
author reviewer
#1 lore raw

Hi Stephen,

This is also a fix, could you please take it into clk-next as well?

Thanks,
Chunyan

Quoted 27 lines · Chunyan Zhang

Don't gate uart1_eb which provides console clock, gating that clock would make serial stop working if serial driver didn't enable that explicitly.

---
 drivers/clk/sprd/sc9863a-clk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/sprd/sc9863a-clk.c +2 -2
index 24f064262814..6c6ac158ef61 100644
@@ -1671,8 +1671,9 @@ static SPRD_SC_GATE_CLK_FW_NAME(i2c4_eb,  "i2c4-eb",      "ext-26m", 0x0,
                                0x1000, BIT(12), 0, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart0_eb,      "uart0-eb",     "ext-26m", 0x0,
                                0x1000, BIT(13), 0, 0);
+/* uart1_eb is for console, don't gate even if unused */
 static SPRD_SC_GATE_CLK_FW_NAME(uart1_eb,      "uart1-eb",     "ext-26m", 0x0,
-                               0x1000, BIT(14), 0, 0);
+                               0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart2_eb,      "uart2-eb",     "ext-26m", 0x0,
                                0x1000, BIT(15), 0, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart3_eb,      "uart3-eb",     "ext-26m", 0x0,
--

2.20.1

author reviewer
#3 lore raw
Quoted 9 lines · Stephen Boyd

Quoting Chunyan Zhang (2020-03-31 03:45:32)

Quoted 5 lines

Don't gate uart1_eb which provides console clock, gating that clock would make serial stop working if serial driver didn't enable that explicitly.

---

Do you have a Fixes: tag?

I didn't leave a Fixed tag since that commit [1] will be merged into v5.7-rc1

[1] https://www.spinics.net/lists/linux-clk/msg46430.html

maintainer
#4 lore raw

Quoting Chunyan Zhang (2020-04-06 19:02:38)

Quoted 6 lines · Stephen Boyd
Quoted 5 lines

Quoting Chunyan Zhang (2020-03-31 03:45:32)

Quoted 3 lines

Don't gate uart1_eb which provides console clock, gating that clock would make serial stop working if serial driver didn't enable that explicitly.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

---

Do you have a Fixes: tag?

I didn't leave a Fixed tag since that commit [1] will be merged into v5.7-rc1

[1] https://www.spinics.net/lists/linux-clk/msg46430.html

Please still provide a Fixes tag. It helps track what commit is fixed regardless.

author reviewer
#5 lore raw

PATCH 1/1 clk: sprd: don't gate uart console clock

In reply to Chunyan Zhang

From: Chunyan Zhang <[email protected]>

Don't gate uart1_eb which provides console clock, gating that clock would make serial stop working if serial driver didn't enable that explicitly.

Fixes 0e4b8a2349f3 ("clk: sprd: add clocks support for SC9863A")
---
 drivers/clk/sprd/sc9863a-clk.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clk/sprd/sc9863a-clk.c +2 -1
index 24f064262814..6c6ac158ef61 100644
@@ -1671,8 +1671,9 @@ static SPRD_SC_GATE_CLK_FW_NAME(i2c4_eb,	"i2c4-eb",	"ext-26m", 0x0,
 				0x1000, BIT(12), 0, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart0_eb,	"uart0-eb",	"ext-26m", 0x0,
 				0x1000, BIT(13), 0, 0);
+/* uart1_eb is for console, don't gate even if unused */
 static SPRD_SC_GATE_CLK_FW_NAME(uart1_eb,	"uart1-eb",	"ext-26m", 0x0,
-				0x1000, BIT(14), 0, 0);
+				0x1000, BIT(14), CLK_IGNORE_UNUSED, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart2_eb,	"uart2-eb",	"ext-26m", 0x0,
 				0x1000, BIT(15), 0, 0);
 static SPRD_SC_GATE_CLK_FW_NAME(uart3_eb,	"uart3-eb",	"ext-26m", 0x0,
Signature · 1 line
2.20.1
maintainer Applied
#6 lore raw

Quoting Chunyan Zhang (2020-04-07 19:02:34)

Quoted 8 lines

From: Chunyan Zhang <[email protected]>

Don't gate uart1_eb which provides console clock, gating that clock would make serial stop working if serial driver didn't enable that explicitly.

Fixes 0e4b8a2349f3 ("clk: sprd: add clocks support for SC9863A")

---

Applied to clk-fixes