Commit 800be590 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown

ASoC: Intel: Move Baytrail extended fw address saving to sst_byt_boot()

We have to save the physical address of extended firmware block in the
beginning of mailbox every time when we boot the DSP firmware since that
mailbox address is re-used after DSP firmware is running. Otherwise DSP
firmware will get bogus extended firmware block address during next DSP
boot.

Currently this is not problem but becomes when DSP runtime rebooting is
implemented. Prepare for that by moving extended firmware address saving
from sst_byt_init() to sst_byt_boot().
Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent a6686ed5
...@@ -214,6 +214,13 @@ static void sst_byt_boot(struct sst_dsp *sst) ...@@ -214,6 +214,13 @@ static void sst_byt_boot(struct sst_dsp *sst)
{ {
int tries = 10; int tries = 10;
/*
* save the physical address of extended firmware block in the first
* 4 bytes of the mailbox
*/
memcpy_toio(sst->addr.lpe + SST_BYT_MAILBOX_OFFSET,
&sst->pdata->fw_base, sizeof(u32));
/* release stall and wait to unstall */ /* release stall and wait to unstall */
sst_dsp_shim_update_bits64(sst, SST_CSR, SST_BYT_CSR_STALL, 0x0); sst_dsp_shim_update_bits64(sst, SST_CSR, SST_BYT_CSR_STALL, 0x0);
while (tries--) { while (tries--) {
...@@ -317,13 +324,6 @@ static int sst_byt_init(struct sst_dsp *sst, struct sst_pdata *pdata) ...@@ -317,13 +324,6 @@ static int sst_byt_init(struct sst_dsp *sst, struct sst_pdata *pdata)
return ret; return ret;
} }
/*
* save the physical address of extended firmware block in the first
* 4 bytes of the mailbox
*/
memcpy_toio(sst->addr.lpe + SST_BYT_MAILBOX_OFFSET,
&pdata->fw_base, sizeof(u32));
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32)); ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
if (ret) if (ret)
return ret; return ret;
......
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