msm: clock-8974: Set GCC_BOOT_CLOCK_* registers to not force-on clocks
The GCC_BOOT_CLOCK_* registers allow the boot code to
forcefully turn on certain USB and Krait clocks. Clear
a bit in these registers to be able to turn those clocks
off.
Change-Id: I58671ac9bd0af72fd13f8ee0171979bb2a954348
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-8974.c b/arch/arm/mach-msm/clock-8974.c
index 6dd30b2..eb8ff7e 100644
--- a/arch/arm/mach-msm/clock-8974.c
+++ b/arch/arm/mach-msm/clock-8974.c
@@ -492,6 +492,8 @@
#define MSS_BUS_Q6_CBCR 0x10A4
#define MSS_CFG_AHB_CBCR 0x0280
+#define GCC_USB_BOOT_CLOCK_CTL 0x1A00
+#define GCC_KPSS_BOOT_CLOCK_CTL 0x19C0
#define APCS_CLOCK_BRANCH_ENA_VOTE 0x1484
#define APCS_CLOCK_SLEEP_ENA_VOTE 0x1488
@@ -5286,6 +5288,10 @@
*/
writel_relaxed(0x0, GCC_REG_BASE(APCS_CLOCK_SLEEP_ENA_VOTE));
+ /* Clear a bit that forces-on certain USB HS and Krait clocks */
+ writel_relaxed(0x0, GCC_REG_BASE(GCC_USB_BOOT_CLOCK_CTL));
+ writel_relaxed(0x0, GCC_REG_BASE(GCC_KPSS_BOOT_CLOCK_CTL));
+
/*
* TODO: The following sequence enables the LPASS audio core GDSC.
* Remove when this becomes unnecessary.