public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram
@ 2015-04-27 11:36 Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 01/10] clk: samsung: Use CONFIG_ARCH_EXYNOS instead of CONFIG_ARCH_EXYNOS5433 Chanwoo Choi
                   ` (9 more replies)
  0 siblings, 10 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree

This patchset fix the bug and support the DVFS/Suspend-to-RAM. And This patchset
remove the CONFIG_ARCH_EXYNOS5433 insteadf use the CONFIG_ARCH_EXYNOS because
Arnd Bergmann gave me a comment[1] that don't add specific CONFIG_ARCH_EXYNOS5433
for ARM-64bit SoC. And this patchset fix following bugs:
[1] https://lkml.org/lkml/2015/2/26/102

Detailed descirption of each patch:
1. Fix the bug
- Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG in CMU_MSCL. (patch2)
- Fix wrong register for ENABLE_PCLK_MIF_SECURE_MONOTONIC_CNT (patch3)
- Fix wrong parent clock of 'sclk_apollo' clock. (patch4)
- Fix wrong PMS value for 700MHz. (patch5)

2. Support the DVFS for big.LITTLE cores and GPU
- Add CLK_SET_RATE_PARENT flags to propagate parent clock
  when changing the clock for DVFS(big.LITTLE Cores and GPU) (patch6/8)

3. Support the suspend-to-ram
- Add missing DIV_CPIF register to save/restore register on suspend-to-ram (patch7)
- Add CLK_IGNORE_UNUSED flag to SMC (Secure Monitor Call) cloks to support
  the suspend-to-ram (patch9)
- Add CLK_IGNORE_UNUSED flag some clocks to support the suspend-to-ram (patch10)

Changelog:
Change fromv v2:
(https://lkml.org/lkml/2015/4/2/824)
- Add new patches (patch7 ~ patch10)

Change from v1:
(https://lkml.org/lkml/2015/3/17/855)
- Add new patches (patch3 ~ patch6)

Chanwoo Choi (4):
  clk: samsung: Use CONFIG_ARCH_EXYNOS instead of CONFIG_ARCH_EXYNOS5433
  clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock
  clk: samsung: exynos5433: Fix wrong PMS value of exynos5433_pll_rates
  clk: samsung: exynos5433: Add CLK_SET_RATE_PARENT to support DVFS for big.LITTLE core

Hyungwon Hwang (1):
  clk: samsung: exynos5433: Add DIV_CPIF to store it when the board is being suspended

Jonghwa Lee (4):
  clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG
  clk: samsung: exynos5433: Fix CLK_PCLK_MONOTONIC_CNT's register correctly.
  clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call
  clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram

Joonyoung Shim (1):
  clk: samsung: exynos5433: Add clock flag to support the DVFS of GPU

 drivers/clk/samsung/Makefile         |   2 +-
 drivers/clk/samsung/clk-exynos5433.c | 126 +++++++++++++++++++----------------
 2 files changed, 68 insertions(+), 60 deletions(-)

-- 
1.8.5.5

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [PATCH v3 01/10] clk: samsung: Use CONFIG_ARCH_EXYNOS instead of CONFIG_ARCH_EXYNOS5433
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 02/10] clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG Chanwoo Choi
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Arnd Bergmann

This patch removes the CONFIG_ARCH_EXYNOS5433 and then use only the
CONFIG_ARCH_EXYNOS for ARM-64bit Exynos5433 SoC.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index 17e9af7..a17683b 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_SOC_EXYNOS5250)	+= clk-exynos5250.o
 obj-$(CONFIG_SOC_EXYNOS5260)	+= clk-exynos5260.o
 obj-$(CONFIG_SOC_EXYNOS5410)	+= clk-exynos5410.o
 obj-$(CONFIG_SOC_EXYNOS5420)	+= clk-exynos5420.o
-obj-$(CONFIG_ARCH_EXYNOS5433)	+= clk-exynos5433.o
+obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos5433.o
 obj-$(CONFIG_SOC_EXYNOS5440)	+= clk-exynos5440.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-audss.o
 obj-$(CONFIG_ARCH_EXYNOS)	+= clk-exynos-clkout.o
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 02/10] clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 01/10] clk: samsung: Use CONFIG_ARCH_EXYNOS instead of CONFIG_ARCH_EXYNOS5433 Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 12:37   ` Krzysztof Kozłowski
  2015-04-27 11:36 ` [PATCH v3 03/10] clk: samsung: exynos5433: Fix CLK_PCLK_MONOTONIC_CNT's register correctly Chanwoo Choi
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Jonghwa Lee

From: Jonghwa Lee <jonghwa3.lee@samsung.com>

This patch fixes the wrong offoset of PCLK_MSCL_SECURE_SMMU_JPEG in CMU_MSCL
domain.

Fixes: b274bbfd8b4a94cb5bd6f (clk: samsung: exynos5433: Add clocks for CMU_MSCL domain
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 387e3e3..543f9c7 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -3927,7 +3927,7 @@ CLK_OF_DECLARE(exynos5433_cmu_atlas, "samsung,exynos5433-cmu-atlas",
 #define ENABLE_PCLK_MSCL				0x0900
 #define ENABLE_PCLK_MSCL_SECURE_SMMU_M2MSCALER0		0x0904
 #define ENABLE_PCLK_MSCL_SECURE_SMMU_M2MSCALER1		0x0908
-#define ENABLE_PCLK_MSCL_SECURE_SMMU_JPEG		0x000c
+#define ENABLE_PCLK_MSCL_SECURE_SMMU_JPEG		0x090c
 #define ENABLE_SCLK_MSCL				0x0a00
 #define ENABLE_IP_MSCL0					0x0b00
 #define ENABLE_IP_MSCL1					0x0b04
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 03/10] clk: samsung: exynos5433: Fix CLK_PCLK_MONOTONIC_CNT's register correctly.
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 01/10] clk: samsung: Use CONFIG_ARCH_EXYNOS instead of CONFIG_ARCH_EXYNOS5433 Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 02/10] clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
       [not found]   ` <1430134597-14668-4-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
  2015-04-27 11:36 ` [PATCH v3 04/10] clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock Chanwoo Choi
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Jonghwa Lee

From: Jonghwa Lee <jonghwa3.lee@samsung.com>

CLK_PCLK_MONOTONIC_CNT's register is now assigned with wrong one.
Its correct register is ENABLE_PCLK_MIF_SECURE_MONOTONIC_CNT.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 543f9c7..b1a546e 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -1490,7 +1490,7 @@ static struct samsung_gate_clock mif_gate_clks[] __initdata = {
 
 	/* ENABLE_PCLK_MIF_SECURE_MONOTONIC_CNT */
 	GATE(CLK_PCLK_MONOTONIC_CNT, "pclk_monotonic_cnt", "div_aclk_mif_133",
-			ENABLE_PCLK_MIF_SECURE_RTC, 0, 0, 0),
+			ENABLE_PCLK_MIF_SECURE_MONOTONIC_CNT, 0, 0, 0),
 
 	/* ENABLE_PCLK_MIF_SECURE_RTC */
 	GATE(CLK_PCLK_RTC, "pclk_rtc", "div_aclk_mif_133",
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 04/10] clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (2 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 03/10] clk: samsung: exynos5433: Fix CLK_PCLK_MONOTONIC_CNT's register correctly Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 12:43   ` Krzysztof Kozłowski
  2015-04-27 11:36 ` [PATCH v3 05/10] clk: samsung: exynos5433: Fix wrong PMS value of exynos5433_pll_rates Chanwoo Choi
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree

This patch fixes the wrong parent clock of sclk_apollo clock
from 'div_apollo_pll' to 'div_apollo2'.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index b1a546e..ec29426 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -3665,7 +3665,7 @@ static struct samsung_gate_clock apollo_gate_clks[] __initdata = {
 			ENABLE_SCLK_APOLLO, 3, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_HPM_APOLLO, "sclk_hpm_apollo", "div_sclk_hpm_apollo",
 			ENABLE_SCLK_APOLLO, 1, CLK_IGNORE_UNUSED, 0),
-	GATE(CLK_SCLK_APOLLO, "sclk_apollo", "div_apollo_pll",
+	GATE(CLK_SCLK_APOLLO, "sclk_apollo", "div_apollo2",
 			ENABLE_SCLK_APOLLO, 0, CLK_IGNORE_UNUSED, 0),
 };
 
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 05/10] clk: samsung: exynos5433: Fix wrong PMS value of exynos5433_pll_rates
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (3 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 04/10] clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 06/10] clk: samsung: exynos5433: Add CLK_SET_RATE_PARENT to support DVFS for big.LITTLE core Chanwoo Choi
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree

This patch fixes the wrong PMS value of exynos5433_pll_rates table
for {ATLAS|APOLLO|MEM0|MEM1|BUS|MFC|MPHY|G3D|DISP|ISP|_PLL.
- 720 MHz (mdiv=360, pdiv=6, sdiv=1) -> 700 MHz (mdiv=175, pdiv=3, sdiv=1)
- 350 MHz (mdiv=360, pdiv=6, sdiv=2) -> (mdiv=350, pdiv=6, sdiv=2)
- 133 MHz (mdiv=552, pdiv=6, sdiv=4) -> (mdiv=532, pdiv=6, sdiv=4)

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index ec29426..9e04ae2 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -748,7 +748,7 @@ static struct samsung_pll_rate_table exynos5443_pll_rates[] = {
 	PLL_35XX_RATE(825000000U,  275, 4,  1),
 	PLL_35XX_RATE(800000000U,  400, 6,  1),
 	PLL_35XX_RATE(733000000U,  733, 12, 1),
-	PLL_35XX_RATE(700000000U,  360, 6,  1),
+	PLL_35XX_RATE(700000000U,  175, 3,  1),
 	PLL_35XX_RATE(667000000U,  222, 4,  1),
 	PLL_35XX_RATE(633000000U,  211, 4,  1),
 	PLL_35XX_RATE(600000000U,  500, 5,  2),
@@ -760,14 +760,14 @@ static struct samsung_pll_rate_table exynos5443_pll_rates[] = {
 	PLL_35XX_RATE(444000000U,  370, 5,  2),
 	PLL_35XX_RATE(420000000U,  350, 5,  2),
 	PLL_35XX_RATE(400000000U,  400, 6,  2),
-	PLL_35XX_RATE(350000000U,  360, 6,  2),
+	PLL_35XX_RATE(350000000U,  350, 6,  2),
 	PLL_35XX_RATE(333000000U,  222, 4,  2),
 	PLL_35XX_RATE(300000000U,  500, 5,  3),
 	PLL_35XX_RATE(266000000U,  532, 6,  3),
 	PLL_35XX_RATE(200000000U,  400, 6,  3),
 	PLL_35XX_RATE(166000000U,  332, 6,  3),
 	PLL_35XX_RATE(160000000U,  320, 6,  3),
-	PLL_35XX_RATE(133000000U,  552, 6,  4),
+	PLL_35XX_RATE(133000000U,  532, 6,  4),
 	PLL_35XX_RATE(100000000U,  400, 6,  4),
 	{ /* sentinel */ }
 };
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 06/10] clk: samsung: exynos5433: Add CLK_SET_RATE_PARENT to support DVFS for big.LITTLE core
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (4 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 05/10] clk: samsung: exynos5433: Fix wrong PMS value of exynos5433_pll_rates Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 07/10] clk: samsung: exynos5433: Add DIV_CPIF to store it when the board is being suspended Chanwoo Choi
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree

This patch adds CLK_SET_RATE_PARENT flag to support DVFS of Cortex-{A53|A57}
core (big.LITTLE core) because 'sclk_{apollo|atlas}' leaf clock is used to
change the CPU frequency of Cortex-{A53|A57} core in arm_big_little.c driver.
- 'apollo' word means the LITTLE core (Cortex-A53 core) in Exynos5433 TRM.
- 'atlas' word means the big core (Cortex-A57 core) in Exynos5433 TRM.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 9e04ae2..e4a6771 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -3582,7 +3582,7 @@ static struct samsung_pll_clock apollo_pll_clks[] __initdata = {
 static struct samsung_mux_clock apollo_mux_clks[] __initdata = {
 	/* MUX_SEL_APOLLO0 */
 	MUX_F(CLK_MOUT_APOLLO_PLL, "mout_apollo_pll", mout_apollo_pll_p,
-			MUX_SEL_APOLLO0, 0, 1, 0, CLK_MUX_READ_ONLY),
+			MUX_SEL_APOLLO0, 0, 1, CLK_SET_RATE_PARENT, 0),
 
 	/* MUX_SEL_APOLLO1 */
 	MUX(CLK_MOUT_BUS_PLL_APOLLO_USER, "mout_bus_pll_apollo_user",
@@ -3590,7 +3590,7 @@ static struct samsung_mux_clock apollo_mux_clks[] __initdata = {
 
 	/* MUX_SEL_APOLLO2 */
 	MUX_F(CLK_MOUT_APOLLO, "mout_apollo", mout_apollo_p, MUX_SEL_APOLLO2,
-			0, 1, 0, CLK_MUX_READ_ONLY),
+			0, 1, CLK_SET_RATE_PARENT, 0),
 };
 
 static struct samsung_div_clock apollo_div_clks[] __initdata = {
@@ -3611,11 +3611,9 @@ static struct samsung_div_clock apollo_div_clks[] __initdata = {
 			DIV_APOLLO0, 8, 3, CLK_GET_RATE_NOCACHE,
 			CLK_DIVIDER_READ_ONLY),
 	DIV_F(CLK_DIV_APOLLO2, "div_apollo2", "div_apollo1",
-			DIV_APOLLO0, 4, 3, CLK_GET_RATE_NOCACHE,
-			CLK_DIVIDER_READ_ONLY),
+			DIV_APOLLO0, 4, 3, CLK_SET_RATE_PARENT, 0),
 	DIV_F(CLK_DIV_APOLLO1, "div_apollo1", "mout_apollo",
-			DIV_APOLLO0, 0, 3, CLK_GET_RATE_NOCACHE,
-			CLK_DIVIDER_READ_ONLY),
+			DIV_APOLLO0, 0, 3, CLK_SET_RATE_PARENT, 0),
 
 	/* DIV_APOLLO1 */
 	DIV_F(CLK_DIV_SCLK_HPM_APOLLO, "div_sclk_hpm_apollo", "mout_apollo",
@@ -3666,7 +3664,8 @@ static struct samsung_gate_clock apollo_gate_clks[] __initdata = {
 	GATE(CLK_SCLK_HPM_APOLLO, "sclk_hpm_apollo", "div_sclk_hpm_apollo",
 			ENABLE_SCLK_APOLLO, 1, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_APOLLO, "sclk_apollo", "div_apollo2",
-			ENABLE_SCLK_APOLLO, 0, CLK_IGNORE_UNUSED, 0),
+			ENABLE_SCLK_APOLLO, 0,
+			CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0),
 };
 
 static struct samsung_cmu_info apollo_cmu_info __initdata = {
@@ -3775,7 +3774,7 @@ static struct samsung_pll_clock atlas_pll_clks[] __initdata = {
 static struct samsung_mux_clock atlas_mux_clks[] __initdata = {
 	/* MUX_SEL_ATLAS0 */
 	MUX_F(CLK_MOUT_ATLAS_PLL, "mout_atlas_pll", mout_atlas_pll_p,
-			MUX_SEL_ATLAS0, 0, 1, 0, CLK_MUX_READ_ONLY),
+			MUX_SEL_ATLAS0, 0, 1, CLK_SET_RATE_PARENT, 0),
 
 	/* MUX_SEL_ATLAS1 */
 	MUX(CLK_MOUT_BUS_PLL_ATLAS_USER, "mout_bus_pll_atlas_user",
@@ -3783,7 +3782,7 @@ static struct samsung_mux_clock atlas_mux_clks[] __initdata = {
 
 	/* MUX_SEL_ATLAS2 */
 	MUX_F(CLK_MOUT_ATLAS, "mout_atlas", mout_atlas_p, MUX_SEL_ATLAS2,
-			0, 1, 0, CLK_MUX_READ_ONLY),
+			0, 1, CLK_SET_RATE_PARENT, 0),
 };
 
 static struct samsung_div_clock atlas_div_clks[] __initdata = {
@@ -3804,11 +3803,9 @@ static struct samsung_div_clock atlas_div_clks[] __initdata = {
 			DIV_ATLAS0, 8, 3, CLK_GET_RATE_NOCACHE,
 			CLK_DIVIDER_READ_ONLY),
 	DIV_F(CLK_DIV_ATLAS2, "div_atlas2", "div_atlas1",
-			DIV_ATLAS0, 4, 3, CLK_GET_RATE_NOCACHE,
-			CLK_DIVIDER_READ_ONLY),
+			DIV_ATLAS0, 4, 3, CLK_SET_RATE_PARENT, 0),
 	DIV_F(CLK_DIV_ATLAS1, "div_atlas1", "mout_atlas",
-			DIV_ATLAS0, 0, 3, CLK_GET_RATE_NOCACHE,
-			CLK_DIVIDER_READ_ONLY),
+			DIV_ATLAS0, 0, 3, CLK_SET_RATE_PARENT, 0),
 
 	/* DIV_ATLAS1 */
 	DIV_F(CLK_DIV_SCLK_HPM_ATLAS, "div_sclk_hpm_atlas", "mout_atlas",
@@ -3885,7 +3882,8 @@ static struct samsung_gate_clock atlas_gate_clks[] __initdata = {
 	GATE(CLK_ATCLK, "atclk", "div_atclk_atlas",
 			ENABLE_SCLK_ATLAS, 1, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_ATLAS, "sclk_atlas", "div_atlas2",
-			ENABLE_SCLK_ATLAS, 0, CLK_IGNORE_UNUSED, 0),
+			ENABLE_SCLK_ATLAS, 0,
+			CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0),
 };
 
 static struct samsung_cmu_info atlas_cmu_info __initdata = {
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 07/10] clk: samsung: exynos5433: Add DIV_CPIF to store it when the board is being suspended
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (5 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 06/10] clk: samsung: exynos5433: Add CLK_SET_RATE_PARENT to support DVFS for big.LITTLE core Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 08/10] clk: samsung: exynos5433: Add clock flag to support the DVFS of GPU Chanwoo Choi
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Hyungwon Hwang

From: Hyungwon Hwang <human.hwang@samsung.com>

This register must be stored when the device is suspended, and must be restored
when it is back. This patch adds the register to the list of storing registers.

Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index e4a6771..5d8b4a8 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -835,6 +835,7 @@ static unsigned long cpif_clk_regs[] __initdata = {
 	MPHY_PLL_CON1,
 	MPHY_PLL_FREQ_DET,
 	MUX_SEL_CPIF0,
+	DIV_CPIF,
 	ENABLE_SCLK_CPIF,
 };
 
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 08/10] clk: samsung: exynos5433: Add clock flag to support the DVFS of GPU
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (6 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 07/10] clk: samsung: exynos5433: Add DIV_CPIF to store it when the board is being suspended Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 09/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call Chanwoo Choi
  2015-04-27 11:36 ` [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram Chanwoo Choi
  9 siblings, 0 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Joonyoung Shim

From: Joonyoung Shim <jy0922.shim@samsung.com>

This patch adds the CLK_SET_RATE_PARENT flag for 'aclk_g3d' clock and parent
clocks becuase 'aclk_g3d' is used to change GPU frequency for DVFS (Dynamic
Voltage Frequency Scaling) feature and adds CLK_IGNORE_UNUSED flags to
'aclk_asyncapbs_g3d'/'aclk_asyncapbm_g3d' clocks to access the SFR
(Special Funciton Regiser) of MALI device.

Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[cw00.choi: Add patch description and add CLK_SET_RATE_PARENT to 'aclk_g3d' clk]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 5d8b4a8..256fec0 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -3287,10 +3287,10 @@ static struct samsung_pll_clock g3d_pll_clks[] __initdata = {
 
 static struct samsung_mux_clock g3d_mux_clks[] __initdata = {
 	/* MUX_SEL_G3D */
-	MUX(CLK_MOUT_ACLK_G3D_400, "mout_aclk_g3d_400", mout_aclk_g3d_400_p,
-			MUX_SEL_G3D, 8, 1),
-	MUX(CLK_MOUT_G3D_PLL, "mout_g3d_pll", mout_g3d_pll_p,
-			MUX_SEL_G3D, 0, 1),
+	MUX_F(CLK_MOUT_ACLK_G3D_400, "mout_aclk_g3d_400", mout_aclk_g3d_400_p,
+			MUX_SEL_G3D, 8, 1, CLK_SET_RATE_PARENT, 0),
+	MUX_F(CLK_MOUT_G3D_PLL, "mout_g3d_pll", mout_g3d_pll_p,
+			MUX_SEL_G3D, 0, 1, CLK_SET_RATE_PARENT, 0),
 };
 
 static struct samsung_div_clock g3d_div_clks[] __initdata = {
@@ -3299,8 +3299,8 @@ static struct samsung_div_clock g3d_div_clks[] __initdata = {
 			8, 2),
 	DIV(CLK_DIV_PCLK_G3D, "div_pclk_g3d", "div_aclk_g3d", DIV_G3D,
 			4, 3),
-	DIV(CLK_DIV_ACLK_G3D, "div_aclk_g3d", "mout_aclk_g3d_400", DIV_G3D,
-			0, 3),
+	DIV_F(CLK_DIV_ACLK_G3D, "div_aclk_g3d", "mout_aclk_g3d_400", DIV_G3D,
+			0, 3, CLK_SET_RATE_PARENT, 0),
 };
 
 static struct samsung_gate_clock g3d_gate_clks[] __initdata = {
@@ -3310,9 +3310,9 @@ static struct samsung_gate_clock g3d_gate_clks[] __initdata = {
 	GATE(CLK_ACLK_BTS_G3D0, "aclk_bts_g3d0", "div_aclk_g3d",
 			ENABLE_ACLK_G3D, 6, 0, 0),
 	GATE(CLK_ACLK_ASYNCAPBS_G3D, "aclk_asyncapbs_g3d", "div_pclk_g3d",
-			ENABLE_ACLK_G3D, 5, 0, 0),
+			ENABLE_ACLK_G3D, 5, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_ASYNCAPBM_G3D, "aclk_asyncapbm_g3d", "div_aclk_g3d",
-			ENABLE_ACLK_G3D, 4, 0, 0),
+			ENABLE_ACLK_G3D, 4, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_AHB2APB_G3DP, "aclk_ahb2apb_g3dp", "div_pclk_g3d",
 			ENABLE_ACLK_G3D, 3, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_G3DNP_150, "aclk_g3dnp_150", "div_pclk_g3d",
@@ -3320,7 +3320,7 @@ static struct samsung_gate_clock g3d_gate_clks[] __initdata = {
 	GATE(CLK_ACLK_G3DND_600, "aclk_g3dnd_600", "div_aclk_g3d",
 			ENABLE_ACLK_G3D, 1, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_G3D, "aclk_g3d", "div_aclk_g3d",
-			ENABLE_ACLK_G3D, 0, 0, 0),
+			ENABLE_ACLK_G3D, 0, CLK_SET_RATE_PARENT, 0),
 
 	/* ENABLE_PCLK_G3D */
 	GATE(CLK_PCLK_BTS_G3D1, "pclk_bts_g3d1", "div_pclk_g3d",
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 09/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (7 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 08/10] clk: samsung: exynos5433: Add clock flag to support the DVFS of GPU Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 13:11   ` Krzysztof Kozłowski
  2015-04-27 11:36 ` [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram Chanwoo Choi
  9 siblings, 1 reply; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Jonghwa Lee

From: Jonghwa Lee <jonghwa3.lee@samsung.com>

This patch adds 'CLK_IGNORE_UNUSED' flag to clocks which is required for
operation of secure monitor call (smc). System will hang when it executes 'smc'
with one of those clock is gated. All related clocks must be enabled.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 256fec0..39c9564 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -1390,7 +1390,7 @@ static struct samsung_gate_clock mif_gate_clks[] __initdata = {
 
 	/* ENABLE_ACLK_MIF2 */
 	GATE(CLK_ACLK_MIFND_266, "aclk_mifnd_266", "div_aclk_mif_266",
-			ENABLE_ACLK_MIF2, 20, 0, 0),
+			ENABLE_ACLK_MIF2, 20, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_PPMU_DREX1S3, "aclk_ppmu_drex1s3", "div_aclk_drex1",
 			ENABLE_ACLK_MIF2, 17, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_PPMU_DREX1S1, "aclk_ppmu_drex1s1", "div_aclk_drex1",
@@ -1833,39 +1833,39 @@ static struct samsung_gate_clock peris_gate_clks[] __initdata = {
 
 	/* ENABLE_PCLK_PERIS_SECURE_TZPC */
 	GATE(CLK_PCLK_TZPC12, "pclk_tzpc12", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 12, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 12, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC11, "pclk_tzpc11", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 11, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 11, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC10, "pclk_tzpc10", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 10, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 10, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC9, "pclk_tzpc9", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 9, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 9, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC8, "pclk_tzpc8", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 8, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 8, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC7, "pclk_tzpc7", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 7, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 7, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC6, "pclk_tzpc6", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 6, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 6, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC5, "pclk_tzpc5", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 5, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 5, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC4, "pclk_tzpc4", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 4, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 4, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC3, "pclk_tzpc3", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 3, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 3, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC2, "pclk_tzpc2", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 2, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 2, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC1, "pclk_tzpc1", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 1, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 1, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_TZPC0, "pclk_tzpc0", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_TZPC, 0, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_TZPC, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_PCLK_PERIS_SECURE_SECKEY_APBIF */
 	GATE(CLK_PCLK_SECKEY_APBIF, "pclk_seckey_apbif", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_SECKEY_APBIF, 0, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_SECKEY_APBIF, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_PCLK_PERIS_SECURE_CHIPID_APBIF */
 	GATE(CLK_PCLK_CHIPID_APBIF, "pclk_chipid_apbif", "aclk_peris_66",
-			ENABLE_PCLK_PERIS_SECURE_CHIPID_APBIF, 0, 0, 0),
+			ENABLE_PCLK_PERIS_SECURE_CHIPID_APBIF, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_PCLK_PERIS_SECURE_TOPRTC */
 	GATE(CLK_PCLK_TOPRTC, "pclk_toprtc", "aclk_peris_66",
@@ -1896,11 +1896,11 @@ static struct samsung_gate_clock peris_gate_clks[] __initdata = {
 
 	/* ENABLE_SCLK_PERIS_SECURE_SECKEY */
 	GATE(CLK_SCLK_SECKEY, "sclk_seckey", "oscclk_efuse_common",
-			ENABLE_SCLK_PERIS_SECURE_SECKEY, 0, 0, 0),
+			ENABLE_SCLK_PERIS_SECURE_SECKEY, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_SCLK_PERIS_SECURE_CHIPID */
 	GATE(CLK_SCLK_CHIPID, "sclk_chipid", "oscclk_efuse_common",
-			ENABLE_SCLK_PERIS_SECURE_CHIPID, 0, 0, 0),
+			ENABLE_SCLK_PERIS_SECURE_CHIPID, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_SCLK_PERIS_SECURE_TOPRTC */
 	GATE(CLK_SCLK_TOPRTC, "sclk_toprtc", "oscclk_efuse_common",
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram
  2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
                   ` (8 preceding siblings ...)
  2015-04-27 11:36 ` [PATCH v3 09/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call Chanwoo Choi
@ 2015-04-27 11:36 ` Chanwoo Choi
  2015-04-27 13:49   ` Krzysztof Kozłowski
  2015-04-28  9:15   ` Sylwester Nawrocki
  9 siblings, 2 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-27 11:36 UTC (permalink / raw)
  To: s.nawrocki, tomasz.figa, mturquette
  Cc: kgene, inki.dae, chanho61.park, cw00.choi, linux-samsung-soc,
	linux-kernel, devicetree, Jonghwa Lee

From: Jonghwa Lee <jonghwa3.lee@samsung.com>

Some clocks are required being unmasked for suspend-to-ram. Otherwise,
PMU (Power Management Unit) will stick and power line never down.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/clk/samsung/clk-exynos5433.c | 33 +++++++++++++++++++++------------
 1 file changed, 21 insertions(+), 12 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 39c9564..84f02ec 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -697,11 +697,14 @@ static struct samsung_gate_clock top_gate_clks[] __initdata = {
 	GATE(CLK_SCLK_PCM1_PERIC, "sclk_pcm1_peric", "div_sclk_pcm1",
 			ENABLE_SCLK_TOP_PERIC, 7, CLK_SET_RATE_PARENT, 0),
 	GATE(CLK_SCLK_UART2_PERIC, "sclk_uart2_peric", "div_sclk_uart2",
-			ENABLE_SCLK_TOP_PERIC, 5, CLK_SET_RATE_PARENT, 0),
+			ENABLE_SCLK_TOP_PERIC, 5, CLK_SET_RATE_PARENT |
+			CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_UART1_PERIC, "sclk_uart1_peric", "div_sclk_uart1",
-			ENABLE_SCLK_TOP_PERIC, 4, CLK_SET_RATE_PARENT, 0),
+			ENABLE_SCLK_TOP_PERIC, 4, CLK_SET_RATE_PARENT |
+			CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_UART0_PERIC, "sclk_uart0_peric", "div_sclk_uart0",
-			ENABLE_SCLK_TOP_PERIC, 3, CLK_SET_RATE_PARENT, 0),
+			ENABLE_SCLK_TOP_PERIC, 3, CLK_SET_RATE_PARENT |
+			CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_SPI2_PERIC, "sclk_spi2_peric", "div_sclk_spi2_b",
 			ENABLE_SCLK_TOP_PERIC, 2, CLK_SET_RATE_PARENT, 0),
 	GATE(CLK_SCLK_SPI1_PERIC, "sclk_spi1_peric", "div_sclk_spi1_b",
@@ -862,7 +865,7 @@ static struct samsung_div_clock cpif_div_clks[] __initdata = {
 static struct samsung_gate_clock cpif_gate_clks[] __initdata = {
 	/* ENABLE_SCLK_CPIF */
 	GATE(CLK_SCLK_MPHY_PLL, "sclk_mphy_pll", "mout_mphy_pll",
-			ENABLE_SCLK_CPIF, 9, 0, 0),
+			ENABLE_SCLK_CPIF, 9, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_UFS_MPHY, "sclk_ufs_mphy", "div_sclk_mphy",
 			ENABLE_SCLK_CPIF, 4, 0, 0),
 };
@@ -1444,6 +1447,7 @@ static struct samsung_gate_clock mif_gate_clks[] __initdata = {
 	GATE(CLK_PCLK_ASYNCAXI_NOC_P_CCI, "pclk_asyncaxi_noc_p_cci",
 			"div_aclk_mif_133", ENABLE_PCLK_MIF, 21,
 			CLK_IGNORE_UNUSED, 0),
+
 	GATE(CLK_PCLK_ASYNCAXI_CP1, "pclk_asyncaxi_cp1", "div_aclk_mif_133",
 			ENABLE_PCLK_MIF, 19, 0, 0),
 	GATE(CLK_PCLK_ASYNCAXI_CP0, "pclk_asyncaxi_cp0", "div_aclk_mif_133",
@@ -1483,11 +1487,11 @@ static struct samsung_gate_clock mif_gate_clks[] __initdata = {
 
 	/* ENABLE_PCLK_MIF_SECURE_DREX0_TZ */
 	GATE(CLK_PCLK_DREX0_TZ, "pclk_drex0_tz", "div_aclk_mif_133",
-			ENABLE_PCLK_MIF_SECURE_DREX0_TZ, 0, 0, 0),
+		ENABLE_PCLK_MIF_SECURE_DREX0_TZ, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_PCLK_MIF_SECURE_DREX1_TZ */
 	GATE(CLK_PCLK_DREX1_TZ, "pclk_drex1_tz", "div_aclk_mif_133",
-			ENABLE_PCLK_MIF_SECURE_DREX1_TZ, 0, 0, 0),
+		ENABLE_PCLK_MIF_SECURE_DREX1_TZ, 0, CLK_IGNORE_UNUSED, 0),
 
 	/* ENABLE_PCLK_MIF_SECURE_MONOTONIC_CNT */
 	GATE(CLK_PCLK_MONOTONIC_CNT, "pclk_monotonic_cnt", "div_aclk_mif_133",
@@ -1718,11 +1722,14 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = {
 	GATE(CLK_SCLK_SPI0, "sclk_spi0", "sclk_spi0_peric", ENABLE_SCLK_PERIC,
 			3, CLK_SET_RATE_PARENT, 0),
 	GATE(CLK_SCLK_UART2, "sclk_uart2", "sclk_uart2_peric",
-			ENABLE_SCLK_PERIC, 2, CLK_SET_RATE_PARENT, 0),
+			ENABLE_SCLK_PERIC, 2,
+			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_UART1, "sclk_uart1", "sclk_uart1_peric",
-			ENABLE_SCLK_PERIC, 1, CLK_SET_RATE_PARENT, 0),
+			ENABLE_SCLK_PERIC, 1,
+			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_SCLK_UART0, "sclk_uart0", "sclk_uart0_peric",
-			ENABLE_SCLK_PERIC, 0, CLK_SET_RATE_PARENT, 0),
+			ENABLE_SCLK_PERIC, 0,
+			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
 };
 
 static struct samsung_cmu_info peric_cmu_info __initdata = {
@@ -3025,7 +3032,7 @@ static struct samsung_gate_clock aud_gate_clks[] __initdata = {
 
 	/* ENABLE_SCLK_AUD0 */
 	GATE(CLK_ATCLK_AUD, "atclk_aud", "div_atclk_aud", ENABLE_SCLK_AUD0,
-			2, 0, 0),
+			2, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_PCLK_DBG_AUD, "pclk_dbg_aud", "div_pclk_dbg_aud",
 			ENABLE_SCLK_AUD0, 1, 0, 0),
 	GATE(CLK_SCLK_AUD_CA5, "sclk_aud_ca5", "div_aud_ca5", ENABLE_SCLK_AUD0,
@@ -3425,9 +3432,11 @@ static struct samsung_gate_clock gscl_gate_clks[] __initdata = {
 	GATE(CLK_ACLK_GSCLNP_111, "aclk_gsclnp_111", "mout_aclk_gscl_111_user",
 			ENABLE_ACLK_GSCL, 6, CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_GSCLRTND_333, "aclk_gsclrtnd_333",
-			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 5, 0, 0),
+			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 5,
+			CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_GSCLBEND_333, "aclk_gsclbend_333",
-			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 4, 0, 0),
+			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 4,
+			CLK_IGNORE_UNUSED, 0),
 	GATE(CLK_ACLK_GSD, "aclk_gsd", "mout_aclk_gscl_333_user",
 			ENABLE_ACLK_GSCL, 3, 0, 0),
 	GATE(CLK_ACLK_GSCL2, "aclk_gscl2", "mout_aclk_gscl_333_user",
-- 
1.8.5.5

^ permalink raw reply related	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 02/10] clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG
  2015-04-27 11:36 ` [PATCH v3 02/10] clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG Chanwoo Choi
@ 2015-04-27 12:37   ` Krzysztof Kozłowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozłowski @ 2015-04-27 12:37 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: s.nawrocki, tomasz.figa, mturquette, kgene, inki.dae,
	chanho61.park, linux-samsung-soc, linux-kernel, devicetree,
	Jonghwa Lee

2015-04-27 20:36 GMT+09:00 Chanwoo Choi <cw00.choi@samsung.com>:
> From: Jonghwa Lee <jonghwa3.lee@samsung.com>
>
> This patch fixes the wrong offoset of PCLK_MSCL_SECURE_SMMU_JPEG in CMU_MSCL
> domain.
>
> Fixes: b274bbfd8b4a94cb5bd6f (clk: samsung: exynos5433: Add clocks for CMU_MSCL domain
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Hi,

Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 03/10] clk: samsung: exynos5433: Fix CLK_PCLK_MONOTONIC_CNT's register correctly.
       [not found]   ` <1430134597-14668-4-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
@ 2015-04-27 12:40     ` Krzysztof Kozłowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozłowski @ 2015-04-27 12:40 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: s.nawrocki-Sze3O3UU22JBDgjK7y7TUQ,
	tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w,
	mturquette-QSEj5FYQhm4dnm+yROfE0A, kgene-DgEjT+Ai2ygdnm+yROfE0A,
	inki.dae-Sze3O3UU22JBDgjK7y7TUQ,
	chanho61.park-Sze3O3UU22JBDgjK7y7TUQ,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Jonghwa Lee

2015-04-27 20:36 GMT+09:00 Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>:
> From: Jonghwa Lee <jonghwa3.lee-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
>
> CLK_PCLK_MONOTONIC_CNT's register is now assigned with wrong one.
> Its correct register is ENABLE_PCLK_MIF_SECURE_MONOTONIC_CNT.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Chanwoo Choi <cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>

Hi,

Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 04/10] clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock
  2015-04-27 11:36 ` [PATCH v3 04/10] clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock Chanwoo Choi
@ 2015-04-27 12:43   ` Krzysztof Kozłowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozłowski @ 2015-04-27 12:43 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: s.nawrocki, tomasz.figa, mturquette, kgene, inki.dae,
	chanho61.park, linux-samsung-soc, linux-kernel, devicetree

2015-04-27 20:36 GMT+09:00 Chanwoo Choi <cw00.choi@samsung.com>:
> This patch fixes the wrong parent clock of sclk_apollo clock
> from 'div_apollo_pll' to 'div_apollo2'.
>
> Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Hi,

Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 09/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call
  2015-04-27 11:36 ` [PATCH v3 09/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call Chanwoo Choi
@ 2015-04-27 13:11   ` Krzysztof Kozłowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozłowski @ 2015-04-27 13:11 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: s.nawrocki, tomasz.figa, mturquette, kgene, inki.dae,
	chanho61.park, linux-samsung-soc, linux-kernel, devicetree,
	Jonghwa Lee

2015-04-27 20:36 GMT+09:00 Chanwoo Choi <cw00.choi@samsung.com>:
> From: Jonghwa Lee <jonghwa3.lee@samsung.com>
>
> This patch adds 'CLK_IGNORE_UNUSED' flag to clocks which is required for
> operation of secure monitor call (smc). System will hang when it executes 'smc'
> with one of those clock is gated. All related clocks must be enabled.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

Hi,

Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram
  2015-04-27 11:36 ` [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram Chanwoo Choi
@ 2015-04-27 13:49   ` Krzysztof Kozłowski
  2015-04-28  9:15   ` Sylwester Nawrocki
  1 sibling, 0 replies; 18+ messages in thread
From: Krzysztof Kozłowski @ 2015-04-27 13:49 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: s.nawrocki, tomasz.figa, mturquette, kgene, inki.dae,
	chanho61.park, linux-samsung-soc, linux-kernel, devicetree,
	Jonghwa Lee

2015-04-27 20:36 GMT+09:00 Chanwoo Choi <cw00.choi@samsung.com>:
> From: Jonghwa Lee <jonghwa3.lee@samsung.com>
>
> Some clocks are required being unmasked for suspend-to-ram. Otherwise,
> PMU (Power Management Unit) will stick and power line never down.

You mean "will stuck and never power down"?

One minor nit below, but overall looks good:
Reviewed-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>

Best regards,
Krzysztof


>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/clk/samsung/clk-exynos5433.c | 33 +++++++++++++++++++++------------
>  1 file changed, 21 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
> index 39c9564..84f02ec 100644
> --- a/drivers/clk/samsung/clk-exynos5433.c
> +++ b/drivers/clk/samsung/clk-exynos5433.c
> @@ -697,11 +697,14 @@ static struct samsung_gate_clock top_gate_clks[] __initdata = {
>         GATE(CLK_SCLK_PCM1_PERIC, "sclk_pcm1_peric", "div_sclk_pcm1",
>                         ENABLE_SCLK_TOP_PERIC, 7, CLK_SET_RATE_PARENT, 0),
>         GATE(CLK_SCLK_UART2_PERIC, "sclk_uart2_peric", "div_sclk_uart2",
> -                       ENABLE_SCLK_TOP_PERIC, 5, CLK_SET_RATE_PARENT, 0),
> +                       ENABLE_SCLK_TOP_PERIC, 5, CLK_SET_RATE_PARENT |
> +                       CLK_IGNORE_UNUSED, 0),
>         GATE(CLK_SCLK_UART1_PERIC, "sclk_uart1_peric", "div_sclk_uart1",
> -                       ENABLE_SCLK_TOP_PERIC, 4, CLK_SET_RATE_PARENT, 0),
> +                       ENABLE_SCLK_TOP_PERIC, 4, CLK_SET_RATE_PARENT |
> +                       CLK_IGNORE_UNUSED, 0),
>         GATE(CLK_SCLK_UART0_PERIC, "sclk_uart0_peric", "div_sclk_uart0",
> -                       ENABLE_SCLK_TOP_PERIC, 3, CLK_SET_RATE_PARENT, 0),
> +                       ENABLE_SCLK_TOP_PERIC, 3, CLK_SET_RATE_PARENT |
> +                       CLK_IGNORE_UNUSED, 0),
>         GATE(CLK_SCLK_SPI2_PERIC, "sclk_spi2_peric", "div_sclk_spi2_b",
>                         ENABLE_SCLK_TOP_PERIC, 2, CLK_SET_RATE_PARENT, 0),
>         GATE(CLK_SCLK_SPI1_PERIC, "sclk_spi1_peric", "div_sclk_spi1_b",
> @@ -862,7 +865,7 @@ static struct samsung_div_clock cpif_div_clks[] __initdata = {
>  static struct samsung_gate_clock cpif_gate_clks[] __initdata = {
>         /* ENABLE_SCLK_CPIF */
>         GATE(CLK_SCLK_MPHY_PLL, "sclk_mphy_pll", "mout_mphy_pll",
> -                       ENABLE_SCLK_CPIF, 9, 0, 0),
> +                       ENABLE_SCLK_CPIF, 9, CLK_IGNORE_UNUSED, 0),
>         GATE(CLK_SCLK_UFS_MPHY, "sclk_ufs_mphy", "div_sclk_mphy",
>                         ENABLE_SCLK_CPIF, 4, 0, 0),
>  };
> @@ -1444,6 +1447,7 @@ static struct samsung_gate_clock mif_gate_clks[] __initdata = {
>         GATE(CLK_PCLK_ASYNCAXI_NOC_P_CCI, "pclk_asyncaxi_noc_p_cci",
>                         "div_aclk_mif_133", ENABLE_PCLK_MIF, 21,
>                         CLK_IGNORE_UNUSED, 0),
> +

This new line seems unrelated.

>         GATE(CLK_PCLK_ASYNCAXI_CP1, "pclk_asyncaxi_cp1", "div_aclk_mif_133",
>                         ENABLE_PCLK_MIF, 19, 0, 0),
>         GATE(CLK_PCLK_ASYNCAXI_CP0, "pclk_asyncaxi_cp0", "div_aclk_mif_133",

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram
  2015-04-27 11:36 ` [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram Chanwoo Choi
  2015-04-27 13:49   ` Krzysztof Kozłowski
@ 2015-04-28  9:15   ` Sylwester Nawrocki
  2015-04-28  9:28     ` Chanwoo Choi
  1 sibling, 1 reply; 18+ messages in thread
From: Sylwester Nawrocki @ 2015-04-28  9:15 UTC (permalink / raw)
  To: Chanwoo Choi
  Cc: tomasz.figa, mturquette, kgene, inki.dae, chanho61.park,
	linux-samsung-soc, linux-kernel, devicetree, Jonghwa Lee

Hi Chanwoo,

On 27/04/15 13:36, Chanwoo Choi wrote:
> From: Jonghwa Lee <jonghwa3.lee@samsung.com>
> 
> Some clocks are required being unmasked for suspend-to-ram. Otherwise,
> PMU (Power Management Unit) will stick and power line never down.
> 
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---

> @@ -1718,11 +1722,14 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = {
>  	GATE(CLK_SCLK_SPI0, "sclk_spi0", "sclk_spi0_peric", ENABLE_SCLK_PERIC,
>  			3, CLK_SET_RATE_PARENT, 0),
>  	GATE(CLK_SCLK_UART2, "sclk_uart2", "sclk_uart2_peric",
> -			ENABLE_SCLK_PERIC, 2, CLK_SET_RATE_PARENT, 0),
> +			ENABLE_SCLK_PERIC, 2,
> +			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
>  	GATE(CLK_SCLK_UART1, "sclk_uart1", "sclk_uart1_peric",
> -			ENABLE_SCLK_PERIC, 1, CLK_SET_RATE_PARENT, 0),
> +			ENABLE_SCLK_PERIC, 1,
> +			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
>  	GATE(CLK_SCLK_UART0, "sclk_uart0", "sclk_uart0_peric",
> -			ENABLE_SCLK_PERIC, 0, CLK_SET_RATE_PARENT, 0),
> +			ENABLE_SCLK_PERIC, 0,
> +			CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
>  };
>  
>  static struct samsung_cmu_info peric_cmu_info __initdata = {
> @@ -3025,7 +3032,7 @@ static struct samsung_gate_clock aud_gate_clks[] __initdata = {
>  
>  	/* ENABLE_SCLK_AUD0 */
>  	GATE(CLK_ATCLK_AUD, "atclk_aud", "div_atclk_aud", ENABLE_SCLK_AUD0,
> -			2, 0, 0),
> +			2, CLK_IGNORE_UNUSED, 0),
>  	GATE(CLK_PCLK_DBG_AUD, "pclk_dbg_aud", "div_pclk_dbg_aud",
>  			ENABLE_SCLK_AUD0, 1, 0, 0),
>  	GATE(CLK_SCLK_AUD_CA5, "sclk_aud_ca5", "div_aud_ca5", ENABLE_SCLK_AUD0,
> @@ -3425,9 +3432,11 @@ static struct samsung_gate_clock gscl_gate_clks[] __initdata = {
>  	GATE(CLK_ACLK_GSCLNP_111, "aclk_gsclnp_111", "mout_aclk_gscl_111_user",
>  			ENABLE_ACLK_GSCL, 6, CLK_IGNORE_UNUSED, 0),
>  	GATE(CLK_ACLK_GSCLRTND_333, "aclk_gsclrtnd_333",
> -			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 5, 0, 0),
> +			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 5,
> +			CLK_IGNORE_UNUSED, 0),
>  	GATE(CLK_ACLK_GSCLBEND_333, "aclk_gsclbend_333",
> -			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 4, 0, 0),
> +			"mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 4,
> +			CLK_IGNORE_UNUSED, 0),

Some of the clocks you are adding CLK_IGNORE_UNUSED flag for here are
or will be handled be the related IP drivers, thus can be gated regardless
of the changes done in this patch. I would suggest to register suspend/
resume syscore ops like exynos5420_clk_syscore_ops and enable some of
clocks you're touching in this patch explicitly in the suspend() callback
and restore the registers state from before suspend() call in resume().

I've picked up patches 01/10...09/10.
In future please also copy linux-clk@vger.kernel.org on clk related patches.

-- 
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram
  2015-04-28  9:15   ` Sylwester Nawrocki
@ 2015-04-28  9:28     ` Chanwoo Choi
  0 siblings, 0 replies; 18+ messages in thread
From: Chanwoo Choi @ 2015-04-28  9:28 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Tomasz Figa, Mike Turquette, Kukjin Kim, inki.dae@samsung.com,
	chanho61.park@samsung.com, linux-samsung-soc, linux-kernel,
	devicetree, Jonghwa Lee

Hi Sylwester,

On Tue, Apr 28, 2015 at 6:15 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> Hi Chanwoo,
>
> On 27/04/15 13:36, Chanwoo Choi wrote:
>> From: Jonghwa Lee <jonghwa3.lee@samsung.com>
>>
>> Some clocks are required being unmasked for suspend-to-ram. Otherwise,
>> PMU (Power Management Unit) will stick and power line never down.
>>
>> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
>> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
>> ---
>
>> @@ -1718,11 +1722,14 @@ static struct samsung_gate_clock peric_gate_clks[] __initdata = {
>>       GATE(CLK_SCLK_SPI0, "sclk_spi0", "sclk_spi0_peric", ENABLE_SCLK_PERIC,
>>                       3, CLK_SET_RATE_PARENT, 0),
>>       GATE(CLK_SCLK_UART2, "sclk_uart2", "sclk_uart2_peric",
>> -                     ENABLE_SCLK_PERIC, 2, CLK_SET_RATE_PARENT, 0),
>> +                     ENABLE_SCLK_PERIC, 2,
>> +                     CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
>>       GATE(CLK_SCLK_UART1, "sclk_uart1", "sclk_uart1_peric",
>> -                     ENABLE_SCLK_PERIC, 1, CLK_SET_RATE_PARENT, 0),
>> +                     ENABLE_SCLK_PERIC, 1,
>> +                     CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
>>       GATE(CLK_SCLK_UART0, "sclk_uart0", "sclk_uart0_peric",
>> -                     ENABLE_SCLK_PERIC, 0, CLK_SET_RATE_PARENT, 0),
>> +                     ENABLE_SCLK_PERIC, 0,
>> +                     CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, 0),
>>  };
>>
>>  static struct samsung_cmu_info peric_cmu_info __initdata = {
>> @@ -3025,7 +3032,7 @@ static struct samsung_gate_clock aud_gate_clks[] __initdata = {
>>
>>       /* ENABLE_SCLK_AUD0 */
>>       GATE(CLK_ATCLK_AUD, "atclk_aud", "div_atclk_aud", ENABLE_SCLK_AUD0,
>> -                     2, 0, 0),
>> +                     2, CLK_IGNORE_UNUSED, 0),
>>       GATE(CLK_PCLK_DBG_AUD, "pclk_dbg_aud", "div_pclk_dbg_aud",
>>                       ENABLE_SCLK_AUD0, 1, 0, 0),
>>       GATE(CLK_SCLK_AUD_CA5, "sclk_aud_ca5", "div_aud_ca5", ENABLE_SCLK_AUD0,
>> @@ -3425,9 +3432,11 @@ static struct samsung_gate_clock gscl_gate_clks[] __initdata = {
>>       GATE(CLK_ACLK_GSCLNP_111, "aclk_gsclnp_111", "mout_aclk_gscl_111_user",
>>                       ENABLE_ACLK_GSCL, 6, CLK_IGNORE_UNUSED, 0),
>>       GATE(CLK_ACLK_GSCLRTND_333, "aclk_gsclrtnd_333",
>> -                     "mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 5, 0, 0),
>> +                     "mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 5,
>> +                     CLK_IGNORE_UNUSED, 0),
>>       GATE(CLK_ACLK_GSCLBEND_333, "aclk_gsclbend_333",
>> -                     "mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 4, 0, 0),
>> +                     "mout_aclk_gscl_333_user", ENABLE_ACLK_GSCL, 4,
>> +                     CLK_IGNORE_UNUSED, 0),
>
> Some of the clocks you are adding CLK_IGNORE_UNUSED flag for here are
> or will be handled be the related IP drivers, thus can be gated regardless
> of the changes done in this patch. I would suggest to register suspend/
> resume syscore ops like exynos5420_clk_syscore_ops and enable some of
> clocks you're touching in this patch explicitly in the suspend() callback
> and restore the registers state from before suspend() call in resume().

OK, I'll rework and send it.

>
> I've picked up patches 01/10...09/10.

Thanks.

> In future please also copy linux-clk@vger.kernel.org on clk related patches.

OK. I'll send clock patches to linux-clk@vger.kernel.org.

Best Regards,
Chanwoo Choi

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-04-28  9:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 11:36 [PATCH v3 00/10] clk: samsung: exynos5433: Fix bug and support dvfs/suspend-to-ram Chanwoo Choi
2015-04-27 11:36 ` [PATCH v3 01/10] clk: samsung: Use CONFIG_ARCH_EXYNOS instead of CONFIG_ARCH_EXYNOS5433 Chanwoo Choi
2015-04-27 11:36 ` [PATCH v3 02/10] clk: samsung: exynos5433: Fix wrong offset of PCLK_MSCL_SECURE_SMMU_JPEG Chanwoo Choi
2015-04-27 12:37   ` Krzysztof Kozłowski
2015-04-27 11:36 ` [PATCH v3 03/10] clk: samsung: exynos5433: Fix CLK_PCLK_MONOTONIC_CNT's register correctly Chanwoo Choi
     [not found]   ` <1430134597-14668-4-git-send-email-cw00.choi-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-04-27 12:40     ` Krzysztof Kozłowski
2015-04-27 11:36 ` [PATCH v3 04/10] clk: samsung: exynos5433: Fix wrong parent clock of sclk_apollo clock Chanwoo Choi
2015-04-27 12:43   ` Krzysztof Kozłowski
2015-04-27 11:36 ` [PATCH v3 05/10] clk: samsung: exynos5433: Fix wrong PMS value of exynos5433_pll_rates Chanwoo Choi
2015-04-27 11:36 ` [PATCH v3 06/10] clk: samsung: exynos5433: Add CLK_SET_RATE_PARENT to support DVFS for big.LITTLE core Chanwoo Choi
2015-04-27 11:36 ` [PATCH v3 07/10] clk: samsung: exynos5433: Add DIV_CPIF to store it when the board is being suspended Chanwoo Choi
2015-04-27 11:36 ` [PATCH v3 08/10] clk: samsung: exynos5433: Add clock flag to support the DVFS of GPU Chanwoo Choi
2015-04-27 11:36 ` [PATCH v3 09/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to clocks for sercure monitor call Chanwoo Choi
2015-04-27 13:11   ` Krzysztof Kozłowski
2015-04-27 11:36 ` [PATCH v3 10/10] clk: samsung: exynos5433: Add CLK_IGNORE_UNUSED flag to prevent the hang for suspend-to-ram Chanwoo Choi
2015-04-27 13:49   ` Krzysztof Kozłowski
2015-04-28  9:15   ` Sylwester Nawrocki
2015-04-28  9:28     ` Chanwoo Choi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox