Skip to content

Commit 7aa1cc1

Browse files
charleskeepaxbroonie
authored andcommitted
firmware: cs_dsp: Clear core reset for cache
If the Halo registers are kept in the register cache the HALO_CORE_RESET bit will be retained as 1 after reset is triggered in cs_dsp_halo_start_core. This will cause subsequent writes to reset the core which is not desired. Apart from this bit the rest of the register bits are cacheable, so for safety sake clear the bit to ensure the cache is consistent. Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5f2f539 commit 7aa1cc1

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

drivers/firmware/cirrus/cs_dsp.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,10 +2744,16 @@ EXPORT_SYMBOL_GPL(cs_dsp_stop);
27442744

27452745
static int cs_dsp_halo_start_core(struct cs_dsp *dsp)
27462746
{
2747-
return regmap_update_bits(dsp->regmap,
2748-
dsp->base + HALO_CCM_CORE_CONTROL,
2749-
HALO_CORE_RESET | HALO_CORE_EN,
2750-
HALO_CORE_RESET | HALO_CORE_EN);
2747+
int ret;
2748+
2749+
ret = regmap_update_bits(dsp->regmap, dsp->base + HALO_CCM_CORE_CONTROL,
2750+
HALO_CORE_RESET | HALO_CORE_EN,
2751+
HALO_CORE_RESET | HALO_CORE_EN);
2752+
if (ret)
2753+
return ret;
2754+
2755+
return regmap_update_bits(dsp->regmap, dsp->base + HALO_CCM_CORE_CONTROL,
2756+
HALO_CORE_RESET, 0);
27512757
}
27522758

27532759
static void cs_dsp_halo_stop_core(struct cs_dsp *dsp)

0 commit comments

Comments
 (0)