msm: clock-8960: Add support for hardware clock gating on 8960ab
Sufficient testing has proven that hardware clock gating works on
8960ab. Enable the proper bits so that hardware clock gating is
used on 8960ab for the below clocks:
mmss_fpb_clk
imem_ahb_clk
dsi2_s_ahb_clk
dsi_s_ahb_clk
hdmi_m_ahb_clk
hdmi_s_ahb_clk
vcodec_ahb_clk
gfx3d_ahb_clk
ijpeg_axi_clk
vcodec_axi_clk
imem_axi_clk
mdp_axi_clk
fab_msp_axi_clk
rot_axi_clk
vpe_axi_clk
axi_s1_clk
axi_s2_clk
axi_s0_fclk
axi_s1_fclk
axi_s2_fclk
Note that the hardware clock gating on gfx3d_axi_clk is not enabled
on this target as testing has shown that having it enabled leads to
UI hang after boot.
Change-Id: I6bd9307a71b3af625b4dee8242a689a055163098
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
(cherry picked from commit 40ce88935ce62cc13026c02dbaa4212f4a4ad282)
diff --git a/arch/arm/mach-msm/clock-8960.c b/arch/arm/mach-msm/clock-8960.c
index 09e4dd0..5e59992 100644
--- a/arch/arm/mach-msm/clock-8960.c
+++ b/arch/arm/mach-msm/clock-8960.c
@@ -6377,12 +6377,12 @@
*/
/*
* Initialize MM AHB registers: Enable the FPB clock and disable HW
- * gating on 8627, 8960 and 8930ab for all clocks. Also set VFE_AHB's
+ * gating on 8627 and 8930ab for all clocks. Also set VFE_AHB's
* FORCE_CORE_ON bit to prevent its memory from being collapsed when
* the clock is halted. The sleep and wake-up delays are set to safe
* values.
*/
- if (cpu_is_msm8627() || cpu_is_msm8960ab() || cpu_is_msm8930ab()) {
+ if (cpu_is_msm8627() || cpu_is_msm8930ab()) {
rmwreg(0x00000003, AHB_EN_REG, 0x6C000103);
writel_relaxed(0x000007F9, AHB_EN2_REG);
} else {
@@ -6400,7 +6400,7 @@
/* Initialize MM AXI registers: Enable HW gating for all clocks that
* support it. Also set FORCE_CORE_ON bits, and any sleep and wake-up
* delays to safe values. */
- if (cpu_is_msm8960ab() || (cpu_is_msm8960() &&
+ if ((cpu_is_msm8960() &&
SOCINFO_VERSION_MAJOR(socinfo_get_version()) < 3) ||
cpu_is_msm8627() || cpu_is_msm8930ab()) {
rmwreg(0x000007F9, MAXI_EN_REG, 0x0803FFFF);
@@ -6423,8 +6423,6 @@
if (cpu_is_msm8627() || cpu_is_msm8930ab())
rmwreg(0x000003C7, SAXI_EN_REG, 0x00003FFF);
- else if (cpu_is_msm8960ab())
- rmwreg(0x000001C6, SAXI_EN_REG, 0x00001DF6);
else
rmwreg(0x00003C38, SAXI_EN_REG, 0x00003FFF);