diff options
author | Mike Turquette <mturquette@linaro.org> | 2014-01-06 00:36:43 -0500 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-01-06 00:36:43 -0500 |
commit | 497d2214e5ba58ef55025b9951e7f9cccab760e4 (patch) | |
tree | 3988e3c8ff28aadc8d5d118a7d718a0bc10e5fe2 | |
parent | d6e0a2dd12f4067a5bcefb8bbd8ddbeff800afbc (diff) | |
parent | 3fd68c99f3026f4fe3a1b7b6fb75e5638b2032fd (diff) |
Merge tag 'samsung-clk-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tfiga/samsung-clk into clk-fixes
Samsung Clock fixes for 3.13-rc7
* Several patches fixing up incorrectly defined register addresses and
bitfield offsets that could lead to undefined operation when accessing
respective registers or bitfields.
1) clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks
2a) clk: samsung: exynos5250: Fix ACP gate register offset
2b) clk: samsung: exynos5250: Add MDMA0 clocks
2c) ARM: dts: exynos5250: Fix MDMA0 clock number
3) clk: samsung: exynos4: Correct SRC_MFC register
All three issues have been present since Exynos5250 and Exynos4 clock
drivers were added by commits 6e3ad26816b72 ("clk: exynos5250:
register clocks using common clock framework") and e062b571777f5
("clk: exynos4: register clocks using common clock framework")
respectively.
* Patch to fix automatic disabling of Exynos5250 sysreg clock that could
cause undefined operation of several peripherals, such as USB, I2C,
MIPI or display block.
4) clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg
clock
Present since Exynos5250 clock drivers was added by commits
6e3ad26816b72 ("clk: exynos5250: register clocks using common clock
framework").
* Patch fixing compilation warning in clk-exynos-audss driver when
CONFIG_PM_SLEEP is disabled.
5) clk: exynos: File scope reg_save array should depend on PM_SLEEP
Present since the driver was added by commit 1241ef94ccc3 ("clk:
samsung: register audio subsystem clocks using common clock
framework").
-rw-r--r-- | Documentation/devicetree/bindings/clock/exynos5250-clock.txt | 2 | ||||
-rw-r--r-- | arch/arm/boot/dts/exynos5250.dtsi | 2 | ||||
-rw-r--r-- | drivers/clk/samsung/clk-exynos-audss.c | 10 | ||||
-rw-r--r-- | drivers/clk/samsung/clk-exynos4.c | 2 | ||||
-rw-r--r-- | drivers/clk/samsung/clk-exynos5250.c | 14 |
5 files changed, 18 insertions, 12 deletions
diff --git a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt index 46f5c791ea0d..0f2f920e8734 100644 --- a/Documentation/devicetree/bindings/clock/exynos5250-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5250-clock.txt | |||
@@ -159,6 +159,8 @@ clock which they consume. | |||
159 | mixer 343 | 159 | mixer 343 |
160 | hdmi 344 | 160 | hdmi 344 |
161 | g2d 345 | 161 | g2d 345 |
162 | mdma0 346 | ||
163 | smmu_mdma0 347 | ||
162 | 164 | ||
163 | 165 | ||
164 | [Clock Muxes] | 166 | [Clock Muxes] |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 9db5047812f3..177becde7a26 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -559,7 +559,7 @@ | |||
559 | compatible = "arm,pl330", "arm,primecell"; | 559 | compatible = "arm,pl330", "arm,primecell"; |
560 | reg = <0x10800000 0x1000>; | 560 | reg = <0x10800000 0x1000>; |
561 | interrupts = <0 33 0>; | 561 | interrupts = <0 33 0>; |
562 | clocks = <&clock 271>; | 562 | clocks = <&clock 346>; |
563 | clock-names = "apb_pclk"; | 563 | clock-names = "apb_pclk"; |
564 | #dma-cells = <1>; | 564 | #dma-cells = <1>; |
565 | #dma-channels = <8>; | 565 | #dma-channels = <8>; |
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c index 39b40aaede2b..68e515d093d8 100644 --- a/drivers/clk/samsung/clk-exynos-audss.c +++ b/drivers/clk/samsung/clk-exynos-audss.c | |||
@@ -26,17 +26,17 @@ static struct clk_onecell_data clk_data; | |||
26 | #define ASS_CLK_DIV 0x4 | 26 | #define ASS_CLK_DIV 0x4 |
27 | #define ASS_CLK_GATE 0x8 | 27 | #define ASS_CLK_GATE 0x8 |
28 | 28 | ||
29 | /* list of all parent clock list */ | ||
30 | static const char *mout_audss_p[] = { "fin_pll", "fout_epll" }; | ||
31 | static const char *mout_i2s_p[] = { "mout_audss", "cdclk0", "sclk_audio0" }; | ||
32 | |||
33 | #ifdef CONFIG_PM_SLEEP | ||
29 | static unsigned long reg_save[][2] = { | 34 | static unsigned long reg_save[][2] = { |
30 | {ASS_CLK_SRC, 0}, | 35 | {ASS_CLK_SRC, 0}, |
31 | {ASS_CLK_DIV, 0}, | 36 | {ASS_CLK_DIV, 0}, |
32 | {ASS_CLK_GATE, 0}, | 37 | {ASS_CLK_GATE, 0}, |
33 | }; | 38 | }; |
34 | 39 | ||
35 | /* list of all parent clock list */ | ||
36 | static const char *mout_audss_p[] = { "fin_pll", "fout_epll" }; | ||
37 | static const char *mout_i2s_p[] = { "mout_audss", "cdclk0", "sclk_audio0" }; | ||
38 | |||
39 | #ifdef CONFIG_PM_SLEEP | ||
40 | static int exynos_audss_clk_suspend(void) | 40 | static int exynos_audss_clk_suspend(void) |
41 | { | 41 | { |
42 | int i; | 42 | int i; |
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c index ad5ff50c5f28..1a7c1b929c69 100644 --- a/drivers/clk/samsung/clk-exynos4.c +++ b/drivers/clk/samsung/clk-exynos4.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #define SRC_TOP1 0xc214 | 39 | #define SRC_TOP1 0xc214 |
40 | #define SRC_CAM 0xc220 | 40 | #define SRC_CAM 0xc220 |
41 | #define SRC_TV 0xc224 | 41 | #define SRC_TV 0xc224 |
42 | #define SRC_MFC 0xcc28 | 42 | #define SRC_MFC 0xc228 |
43 | #define SRC_G3D 0xc22c | 43 | #define SRC_G3D 0xc22c |
44 | #define E4210_SRC_IMAGE 0xc230 | 44 | #define E4210_SRC_IMAGE 0xc230 |
45 | #define SRC_LCD0 0xc234 | 45 | #define SRC_LCD0 0xc234 |
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index adf32343c9f9..e52359cf9b6f 100644 --- a/drivers/clk/samsung/clk-exynos5250.c +++ b/drivers/clk/samsung/clk-exynos5250.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #define MPLL_LOCK 0x4000 | 25 | #define MPLL_LOCK 0x4000 |
26 | #define MPLL_CON0 0x4100 | 26 | #define MPLL_CON0 0x4100 |
27 | #define SRC_CORE1 0x4204 | 27 | #define SRC_CORE1 0x4204 |
28 | #define GATE_IP_ACP 0x8800 | ||
28 | #define CPLL_LOCK 0x10020 | 29 | #define CPLL_LOCK 0x10020 |
29 | #define EPLL_LOCK 0x10030 | 30 | #define EPLL_LOCK 0x10030 |
30 | #define VPLL_LOCK 0x10040 | 31 | #define VPLL_LOCK 0x10040 |
@@ -75,7 +76,6 @@ | |||
75 | #define SRC_CDREX 0x20200 | 76 | #define SRC_CDREX 0x20200 |
76 | #define PLL_DIV2_SEL 0x20a24 | 77 | #define PLL_DIV2_SEL 0x20a24 |
77 | #define GATE_IP_DISP1 0x10928 | 78 | #define GATE_IP_DISP1 0x10928 |
78 | #define GATE_IP_ACP 0x10000 | ||
79 | 79 | ||
80 | /* list of PLLs to be registered */ | 80 | /* list of PLLs to be registered */ |
81 | enum exynos5250_plls { | 81 | enum exynos5250_plls { |
@@ -120,7 +120,8 @@ enum exynos5250_clks { | |||
120 | spi2, i2s1, i2s2, pcm1, pcm2, pwm, spdif, ac97, hsi2c0, hsi2c1, hsi2c2, | 120 | spi2, i2s1, i2s2, pcm1, pcm2, pwm, spdif, ac97, hsi2c0, hsi2c1, hsi2c2, |
121 | hsi2c3, chipid, sysreg, pmu, cmu_top, cmu_core, cmu_mem, tzpc0, tzpc1, | 121 | hsi2c3, chipid, sysreg, pmu, cmu_top, cmu_core, cmu_mem, tzpc0, tzpc1, |
122 | tzpc2, tzpc3, tzpc4, tzpc5, tzpc6, tzpc7, tzpc8, tzpc9, hdmi_cec, mct, | 122 | tzpc2, tzpc3, tzpc4, tzpc5, tzpc6, tzpc7, tzpc8, tzpc9, hdmi_cec, mct, |
123 | wdt, rtc, tmu, fimd1, mie1, dsim0, dp, mixer, hdmi, g2d, | 123 | wdt, rtc, tmu, fimd1, mie1, dsim0, dp, mixer, hdmi, g2d, mdma0, |
124 | smmu_mdma0, | ||
124 | 125 | ||
125 | /* mux clocks */ | 126 | /* mux clocks */ |
126 | mout_hdmi = 1024, | 127 | mout_hdmi = 1024, |
@@ -354,8 +355,8 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | |||
354 | GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0), | 355 | GATE(smmu_gscl2, "smmu_gscl2", "aclk266", GATE_IP_GSCL, 9, 0, 0), |
355 | GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0), | 356 | GATE(smmu_gscl3, "smmu_gscl3", "aclk266", GATE_IP_GSCL, 10, 0, 0), |
356 | GATE(mfc, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0), | 357 | GATE(mfc, "mfc", "aclk333", GATE_IP_MFC, 0, 0, 0), |
357 | GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 1, 0, 0), | 358 | GATE(smmu_mfcl, "smmu_mfcl", "aclk333", GATE_IP_MFC, 2, 0, 0), |
358 | GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 2, 0, 0), | 359 | GATE(smmu_mfcr, "smmu_mfcr", "aclk333", GATE_IP_MFC, 1, 0, 0), |
359 | GATE(rotator, "rotator", "aclk266", GATE_IP_GEN, 1, 0, 0), | 360 | GATE(rotator, "rotator", "aclk266", GATE_IP_GEN, 1, 0, 0), |
360 | GATE(jpeg, "jpeg", "aclk166", GATE_IP_GEN, 2, 0, 0), | 361 | GATE(jpeg, "jpeg", "aclk166", GATE_IP_GEN, 2, 0, 0), |
361 | GATE(mdma1, "mdma1", "aclk266", GATE_IP_GEN, 4, 0, 0), | 362 | GATE(mdma1, "mdma1", "aclk266", GATE_IP_GEN, 4, 0, 0), |
@@ -406,7 +407,8 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | |||
406 | GATE(hsi2c2, "hsi2c2", "aclk66", GATE_IP_PERIC, 30, 0, 0), | 407 | GATE(hsi2c2, "hsi2c2", "aclk66", GATE_IP_PERIC, 30, 0, 0), |
407 | GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0), | 408 | GATE(hsi2c3, "hsi2c3", "aclk66", GATE_IP_PERIC, 31, 0, 0), |
408 | GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0), | 409 | GATE(chipid, "chipid", "aclk66", GATE_IP_PERIS, 0, 0, 0), |
409 | GATE(sysreg, "sysreg", "aclk66", GATE_IP_PERIS, 1, 0, 0), | 410 | GATE(sysreg, "sysreg", "aclk66", |
411 | GATE_IP_PERIS, 1, CLK_IGNORE_UNUSED, 0), | ||
410 | GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, CLK_IGNORE_UNUSED, 0), | 412 | GATE(pmu, "pmu", "aclk66", GATE_IP_PERIS, 2, CLK_IGNORE_UNUSED, 0), |
411 | GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0), | 413 | GATE(tzpc0, "tzpc0", "aclk66", GATE_IP_PERIS, 6, 0, 0), |
412 | GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0), | 414 | GATE(tzpc1, "tzpc1", "aclk66", GATE_IP_PERIS, 7, 0, 0), |
@@ -492,6 +494,8 @@ static struct samsung_gate_clock exynos5250_gate_clks[] __initdata = { | |||
492 | GATE(mixer, "mixer", "mout_aclk200_disp1", GATE_IP_DISP1, 5, 0, 0), | 494 | GATE(mixer, "mixer", "mout_aclk200_disp1", GATE_IP_DISP1, 5, 0, 0), |
493 | GATE(hdmi, "hdmi", "mout_aclk200_disp1", GATE_IP_DISP1, 6, 0, 0), | 495 | GATE(hdmi, "hdmi", "mout_aclk200_disp1", GATE_IP_DISP1, 6, 0, 0), |
494 | GATE(g2d, "g2d", "aclk200", GATE_IP_ACP, 3, 0, 0), | 496 | GATE(g2d, "g2d", "aclk200", GATE_IP_ACP, 3, 0, 0), |
497 | GATE(mdma0, "mdma0", "aclk266", GATE_IP_ACP, 1, 0, 0), | ||
498 | GATE(smmu_mdma0, "smmu_mdma0", "aclk266", GATE_IP_ACP, 5, 0, 0), | ||
495 | }; | 499 | }; |
496 | 500 | ||
497 | static struct samsung_pll_rate_table vpll_24mhz_tbl[] __initdata = { | 501 | static struct samsung_pll_rate_table vpll_24mhz_tbl[] __initdata = { |