diff options
-rw-r--r-- | sound/soc/fsl/fsl_dsp.c | 8 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_dsp.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_dsp.c b/sound/soc/fsl/fsl_dsp.c index 593fb80ba48b..7a1a067615c7 100644 --- a/sound/soc/fsl/fsl_dsp.c +++ b/sound/soc/fsl/fsl_dsp.c @@ -670,6 +670,12 @@ static void dsp_load_firmware(const struct firmware *fw, void *context) (const void *)image, shdr->sh_size); } else { + /* sh_addr is from DSP view, we need to + * fixup addr because we load the firmware from + * the ARM core side + */ + sh_addr -= dsp_priv->fixup_offset; + memcpy_dsp((void *)(dsp_priv->regs + (sh_addr - dsp_priv->paddr)), (const void *)image, @@ -811,6 +817,8 @@ static int fsl_dsp_probe(struct platform_device *pdev) ret = of_property_read_string(np, "fsl,dsp-firmware", &fw_name); dsp_priv->fw_name = fw_name; + ret = of_property_read_u32(np, "fixup-offset", &dsp_priv->fixup_offset); + platform_set_drvdata(pdev, dsp_priv); pm_runtime_enable(&pdev->dev); diff --git a/sound/soc/fsl/fsl_dsp.h b/sound/soc/fsl/fsl_dsp.h index e87b531fcba5..f39a11dbbf6b 100644 --- a/sound/soc/fsl/fsl_dsp.h +++ b/sound/soc/fsl/fsl_dsp.h @@ -75,6 +75,8 @@ struct fsl_dsp { dma_addr_t dsp_config_phys; int dsp_config_size; + unsigned int fixup_offset; + /* ...proxy data structures */ struct xf_proxy proxy; |