[PATCH 16/17] clk: samsung: exynos5260: Add CLK_IGNORE_UNUSED flag to fix suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the CLK_IGNORE_UNUSED flag to a number of clocks, to fix problems
seen with suspend/resume:
- AUD UART: if the UART isn't configured (in s3c24xx_serial_set_termios)
  then the baudclk isn't set up, and so s3c24xx_serial_resume doesn't
  enable the clock prior to accessing the registers, causing an external
  abort.
- FIMD1: no idea, but suspend doesn't work if this is off
- TZPCn: on a secure part suspend doesn't work if the TrustZone clocks
  are disabled.

Signed-off-by: Stuart Menefy <stuart.menefy@xxxxxxxxxxxxxxxx>
---
 drivers/clk/samsung/clk-exynos5260.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
index 9a0024866a36..9635c462f030 100644
--- a/drivers/clk/samsung/clk-exynos5260.c
+++ b/drivers/clk/samsung/clk-exynos5260.c
@@ -119,7 +119,8 @@ static const struct samsung_gate_clock aud_gate_clks[] __initconst = {
 	GATE(AUD_SCLK_PCM, "sclk_aud_pcm", "dout_sclk_aud_pcm",
 			EN_SCLK_AUD, 1, CLK_SET_RATE_PARENT, 0),
 	GATE(AUD_SCLK_AUD_UART, "sclk_aud_uart", "dout_sclk_aud_uart",
-			EN_SCLK_AUD, 2, CLK_SET_RATE_PARENT, 0),
+			EN_SCLK_AUD, 2,
+			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
 
 	GATE(AUD_CLK_SRAMC, "clk_sramc", "dout_aclk_aud_131", EN_IP_AUD,
 			0, 0, 0),
@@ -298,7 +299,7 @@ static const struct samsung_gate_clock disp_gate_clks[] __initconst = {
 	GATE(DISP_CLK_DSIM1, "clk_dsim1", "mout_aclk_disp_222_user",
 			EN_IP_DISP, 6, 0, 0),
 	GATE(DISP_CLK_FIMD1, "clk_fimd1", "mout_aclk_disp_222_user",
-			EN_IP_DISP, 7, 0, 0),
+			EN_IP_DISP, 7, CLK_IGNORE_UNUSED, 0),
 	GATE(DISP_CLK_HDMI, "clk_hdmi", "mout_aclk_disp_222_user",
 			EN_IP_DISP, 8, 0, 0),
 	GATE(DISP_CLK_HDMIPHY, "clk_hdmiphy", "mout_aclk_disp_222_user",
@@ -1314,27 +1315,27 @@ static const struct samsung_gate_clock peri_gate_clks[] __initconst = {
 		EN_IP_PERI_SECURE_TOP_RTC, 5, 0, 0),
 
 	GATE(PERI_CLK_TZPC0, "clk_tzpc0", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 10, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 10, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC1, "clk_tzpc1", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 11, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 11, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC2, "clk_tzpc2", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 12, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 12, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC3, "clk_tzpc3", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 13, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 13, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC4, "clk_tzpc4", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 14, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 14, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC5, "clk_tzpc5", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 15, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 15, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC6, "clk_tzpc6", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 16, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 16, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC7, "clk_tzpc7", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 17, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 17, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC8, "clk_tzpc8", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 18, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 18, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC9, "clk_tzpc9", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 19, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 19, CLK_IGNORE_UNUSED, 0),
 	GATE(PERI_CLK_TZPC10, "clk_tzpc10", "dout_aclk_peri_66",
-		EN_IP_PERI_SECURE_TZPC, 20, 0, 0),
+		EN_IP_PERI_SECURE_TZPC, 20, CLK_IGNORE_UNUSED, 0),
 };
 
 static const struct samsung_cmu_info peri_cmu __initconst = {
-- 
2.13.6




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux