diff options
| author | Deepak Katragadda <dkatraga@codeaurora.org> | 2016-06-16 14:11:10 -0700 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-06-23 14:03:03 -0700 |
| commit | 293a2b36f2456425a5c40b629f66f42c0a46b78e (patch) | |
| tree | f8cd80c02d61bc095b0ee9a02ab08ccde9ec6b0e | |
| parent | 51b1e61b99674d720445954418596e1f8e8778d9 (diff) | |
clk: msm: Set the GMEM GX clamp before disabling the GPU_GX GDSC
The GMEM GX clamp should be set to the active state before
turning off the gdsc_gpu_gx.
CRs-Fixed: 1027772
Change-Id: I5bb97734a2402e763836250c3ce6f7fc308c20a6
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
| -rw-r--r-- | drivers/clk/msm/clock-gpu-cobalt.c | 7 | ||||
| -rw-r--r-- | drivers/clk/msm/gdsc.c | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/clk/msm/clock-gpu-cobalt.c b/drivers/clk/msm/clock-gpu-cobalt.c index 2f51a77f0531..63870aaa487b 100644 --- a/drivers/clk/msm/clock-gpu-cobalt.c +++ b/drivers/clk/msm/clock-gpu-cobalt.c @@ -519,6 +519,13 @@ static void enable_gfx_crc(void) regval = readl_relaxed(virt_base_gfx + GPU_GX_GDSCR_OFFSET); regval |= SW_COLLAPSE_MASK; writel_relaxed(regval, virt_base_gfx + GPU_GX_GDSCR_OFFSET); + /* Write to disable GX GDSC should go through before continuing */ + wmb(); + regval = readl_relaxed(virt_base_gfx + GPUCC_GX_DOMAIN_MISC); + regval |= BIT(0); + writel_relaxed(regval, virt_base_gfx + GPUCC_GX_DOMAIN_MISC); + /* Make sure GMEM_CLAMP_IO is asserted before continuing. */ + wmb(); regulator_disable(vdd_gpucc.regulator[0]); regval = readl_relaxed(virt_base_gfx + GPU_CX_GDSCR_OFFSET); regval |= SW_COLLAPSE_MASK; diff --git a/drivers/clk/msm/gdsc.c b/drivers/clk/msm/gdsc.c index e6f31209d835..5ea2a9ccd1bb 100644 --- a/drivers/clk/msm/gdsc.c +++ b/drivers/clk/msm/gdsc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2016, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -338,6 +338,8 @@ static int gdsc_disable(struct regulator_dev *rdev) regval = readl_relaxed(sc->domain_addr); regval |= GMEM_CLAMP_IO_MASK; writel_relaxed(regval, sc->domain_addr); + /* Make sure CLAMP_IO is asserted before continuing. */ + wmb(); } } else { for (i = sc->clock_count-1; i >= 0; i--) |
