Skip to content

Commit 383d89d

Browse files
committed
apl-ssp: do not override common MDIVCTRL register
When we use different clock sources for different SSPs, we need to make sure the mdivc register is not overwritten by IPC configuration. Move to read-modify-write mode (assuming a zero-value on reset) Tested on GeminiLake with SSP2 derived from 19.2MHz XTAL and SSP1 derived from 24.576 MHz PLL. Note that the topology needs to ensure compatibility between the different settings, in the future we'll need a true clock driver which will check for incompatibilities. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent a2cfd8c commit 383d89d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/drivers/apl-ssp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ static inline int ssp_set_config(struct dai *dai,
252252

253253
sscr0 |= SSCR0_MOD | SSCR0_ACS;
254254

255-
mdivc = 0x1;
255+
mdivc = mn_reg_read(0x0);
256+
mdivc |= 0x1;
257+
256258
#ifdef CONFIG_CANNONLAKE
257259
if (!config->ssp.mclk_rate || config->ssp.mclk_rate > F_24000_kHz) {
258260
trace_ssp_error("eci");

0 commit comments

Comments
 (0)