Commit ae9ae12e authored by Tony Lindgren's avatar Tony Lindgren

bus: ti-sysc: Handle clockactivity for enable and disable

Modules with clockactivity need it configured during enable.
Tested-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent eec26555
...@@ -859,6 +859,7 @@ static void sysc_show_registers(struct sysc *ddata) ...@@ -859,6 +859,7 @@ static void sysc_show_registers(struct sysc *ddata)
} }
#define SYSC_IDLE_MASK (SYSC_NR_IDLEMODES - 1) #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() */ /* Caller needs to manage sysc_clkdm_deny_idle() and sysc_clkdm_allow_idle() */
static int sysc_enable_module(struct device *dev) static int sysc_enable_module(struct device *dev)
...@@ -874,6 +875,12 @@ static int sysc_enable_module(struct device *dev) ...@@ -874,6 +875,12 @@ static int sysc_enable_module(struct device *dev)
regbits = ddata->cap->regbits; regbits = ddata->cap->regbits;
reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]); 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 */ /* Set SIDLE mode */
idlemodes = ddata->cfg.sidlemodes; idlemodes = ddata->cfg.sidlemodes;
if (!idlemodes || regbits->sidle_shift < 0) if (!idlemodes || regbits->sidle_shift < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment