summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-05-27 13:51:54 +0200
committerTony Lindgren <tony@atomide.com>2019-05-28 14:19:15 +0200
commitae9ae12e9daa1e2139c3ff729d60f3c16d6e9b61 (patch)
treebe37e2afe465b1a005c367276d5318c56e51c24e /drivers/bus
parentbus: ti-sysc: Enable interconnect target module autoidle bit on enable (diff)
downloadlinux-ae9ae12e9daa1e2139c3ff729d60f3c16d6e9b61.tar.xz
linux-ae9ae12e9daa1e2139c3ff729d60f3c16d6e9b61.zip
bus: ti-sysc: Handle clockactivity for enable and disable
Modules with clockactivity need it configured during enable. Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/ti-sysc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 46a8eb469cb2..31035492f1be 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -859,6 +859,7 @@ static void sysc_show_registers(struct sysc *ddata)
}
#define SYSC_IDLE_MASK (SYSC_NR_IDLEMODES - 1)
+#define SYSC_CLOCACT_ICK 2
/* Caller needs to manage sysc_clkdm_deny_idle() and sysc_clkdm_allow_idle() */
static int sysc_enable_module(struct device *dev)
@@ -874,6 +875,12 @@ static int sysc_enable_module(struct device *dev)
regbits = ddata->cap->regbits;
reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
+ /* Set CLOCKACTIVITY, we only use it for ick */
+ if (regbits->clkact_shift >= 0 &&
+ (ddata->cfg.quirks & SYSC_QUIRK_USE_CLOCKACT ||
+ ddata->cfg.sysc_val & BIT(regbits->clkact_shift)))
+ reg |= SYSC_CLOCACT_ICK << regbits->clkact_shift;
+
/* Set SIDLE mode */
idlemodes = ddata->cfg.sidlemodes;
if (!idlemodes || regbits->sidle_shift < 0)