summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/fsl/fsl_dsp.c')
-rw-r--r--sound/soc/fsl/fsl_dsp.c8
1 files changed, 8 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);