mirror of https://github.com/thesofproject/sof.git
commit
7d661d3979
|
@ -246,6 +246,9 @@
|
||||||
/* DMIC power ON bit */
|
/* DMIC power ON bit */
|
||||||
#define DMICLCTL_SPA ((uint32_t) BIT(0))
|
#define DMICLCTL_SPA ((uint32_t) BIT(0))
|
||||||
|
|
||||||
|
/* DMIC disable clock gating */
|
||||||
|
#define DMIC_DCGD ((uint32_t) BIT(30))
|
||||||
|
|
||||||
#ifndef ASSEMBLY
|
#ifndef ASSEMBLY
|
||||||
|
|
||||||
static inline uint16_t shim_read16(uint16_t reg)
|
static inline uint16_t shim_read16(uint16_t reg)
|
||||||
|
|
|
@ -243,6 +243,9 @@
|
||||||
/* DMIC power ON bit */
|
/* DMIC power ON bit */
|
||||||
#define DMICLCTL_SPA ((uint32_t) BIT(0))
|
#define DMICLCTL_SPA ((uint32_t) BIT(0))
|
||||||
|
|
||||||
|
/* DMIC disable clock gating */
|
||||||
|
#define DMIC_DCGD ((uint32_t) BIT(30))
|
||||||
|
|
||||||
#ifndef ASSEMBLY
|
#ifndef ASSEMBLY
|
||||||
|
|
||||||
static inline uint16_t shim_read16(uint16_t reg)
|
static inline uint16_t shim_read16(uint16_t reg)
|
||||||
|
|
|
@ -109,6 +109,13 @@ static inline void cavs_pm_runtime_dis_dmic_clk_gating(uint32_t index)
|
||||||
"dis-dmic-clk-gating index %d CLKCTL %08x",
|
"dis-dmic-clk-gating index %d CLKCTL %08x",
|
||||||
index, shim_read(SHIM_CLKCTL));
|
index, shim_read(SHIM_CLKCTL));
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE) \
|
||||||
|
|| defined(CONFIG_SUECREEK)
|
||||||
|
/* Disable DMIC clock gating */
|
||||||
|
io_reg_write(DMICLCTL,
|
||||||
|
(io_reg_read(DMICLCTL) | DMIC_DCGD));
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void cavs_pm_runtime_en_dmic_clk_gating(uint32_t index)
|
static inline void cavs_pm_runtime_en_dmic_clk_gating(uint32_t index)
|
||||||
|
@ -122,6 +129,12 @@ static inline void cavs_pm_runtime_en_dmic_clk_gating(uint32_t index)
|
||||||
"en-dmic-clk-gating index %d CLKCTL %08x",
|
"en-dmic-clk-gating index %d CLKCTL %08x",
|
||||||
index, shim_read(SHIM_CLKCTL));
|
index, shim_read(SHIM_CLKCTL));
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_CANNONLAKE) || defined(CONFIG_ICELAKE) \
|
||||||
|
|| defined(CONFIG_SUECREEK)
|
||||||
|
/* Enable DMIC clock gating */
|
||||||
|
io_reg_write(DMICLCTL,
|
||||||
|
(io_reg_read(DMICLCTL) & ~DMIC_DCGD));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
static inline void cavs_pm_runtime_en_dmic_power(uint32_t index)
|
static inline void cavs_pm_runtime_en_dmic_power(uint32_t index)
|
||||||
{
|
{
|
||||||
|
|
|
@ -243,6 +243,9 @@
|
||||||
/* DMIC power ON bit */
|
/* DMIC power ON bit */
|
||||||
#define DMICLCTL_SPA ((uint32_t) BIT(0))
|
#define DMICLCTL_SPA ((uint32_t) BIT(0))
|
||||||
|
|
||||||
|
/* DMIC disable clock gating */
|
||||||
|
#define DMIC_DCGD ((uint32_t) BIT(30))
|
||||||
|
|
||||||
#ifndef ASSEMBLY
|
#ifndef ASSEMBLY
|
||||||
|
|
||||||
static inline uint16_t shim_read16(uint16_t reg)
|
static inline uint16_t shim_read16(uint16_t reg)
|
||||||
|
|
Loading…
Reference in New Issue