diff options
author | Weiguang Kong <weiguang.kong@nxp.com> | 2018-05-11 12:34:10 +0800 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 15:51:52 +0800 |
commit | dc9756fa77434d5a3c85ce44a82565c2fe6b89ab (patch) | |
tree | cc6b3b2fdc1b1bd4c35d0dcab828c7557f90d5c5 /sound/soc/fsl/fsl_dsp_proxy.c | |
parent | 6b034c90fbccceebf4a009b4334d4450c8a161cc (diff) |
MLK-18279: ASoC: fsl_dsp: get the information of reserved memory from dts
The reserved memory for dsp is defined in dts file, however, the dsp
driver has also defined the address and size of this reserved memory,
which is repeated and inflexible.
So by cancelling the definition in dsp driver and use system API to
get the information of reserved memory from dts dynamically to fix
this problem.
Signed-off-by: Weiguang Kong <weiguang.kong@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_dsp_proxy.c')
-rw-r--r-- | sound/soc/fsl/fsl_dsp_proxy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/fsl/fsl_dsp_proxy.c b/sound/soc/fsl/fsl_dsp_proxy.c index f9a226d1f577..0eb0605018c8 100644 --- a/sound/soc/fsl/fsl_dsp_proxy.c +++ b/sound/soc/fsl/fsl_dsp_proxy.c @@ -281,7 +281,7 @@ irqreturn_t fsl_dsp_mu_isr(int irq, void *dev_id) /* ...NULL-address specification */ #define XF_PROXY_NULL (~0U) -#define XF_PROXY_BADADDR SDRAM_SCRATCH_BUF_SIZE +#define XF_PROXY_BADADDR (dsp_priv->scratch_buf_size) /* ...shared memory translation - kernel virtual address to shared address */ u32 xf_proxy_b2a(struct xf_proxy *proxy, void *b) @@ -292,7 +292,7 @@ u32 xf_proxy_b2a(struct xf_proxy *proxy, void *b) if (b == NULL) return XF_PROXY_NULL; else if ((u32)(b - dsp_priv->scratch_buf_virt) < - SDRAM_SCRATCH_BUF_SIZE) + dsp_priv->scratch_buf_size) return (u32)(b - dsp_priv->scratch_buf_virt); else return XF_PROXY_BADADDR; @@ -304,7 +304,7 @@ void *xf_proxy_a2b(struct xf_proxy *proxy, u32 address) struct fsl_dsp *dsp_priv = container_of(proxy, struct fsl_dsp, proxy); - if (address < SDRAM_SCRATCH_BUF_SIZE) + if (address < dsp_priv->scratch_buf_size) return dsp_priv->scratch_buf_virt + address; else if (address == XF_PROXY_NULL) return NULL; |