summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Documentation/devicetree/bindings/sound/fsl,dsp.txt (renamed from Documentation/devicetree/bindings/sound/fsl,hifi4.txt)8
-rw-r--r--arch/arm64/boot/dts/freescale/fsl-imx8qxp.dtsi23
-rw-r--r--arch/arm64/configs/defconfig2
-rw-r--r--drivers/clk/imx/clk-imx8qxp.c6
-rw-r--r--include/dt-bindings/clock/imx8qxp-clock.h6
-rw-r--r--include/dt-bindings/soc/imx8_pd.h2
-rw-r--r--include/soc/imx8/imx8qxp/lpcg.h2
-rw-r--r--include/uapi/linux/Kbuild2
-rw-r--r--include/uapi/linux/mxc_dsp.h (renamed from include/uapi/linux/mxc_hifi4.h)43
-rw-r--r--sound/soc/fsl/Kconfig4
-rw-r--r--sound/soc/fsl/Makefile4
-rw-r--r--sound/soc/fsl/fsl_dsp.c (renamed from sound/soc/fsl/fsl_hifi4.c)404
-rw-r--r--sound/soc/fsl/fsl_dsp.h (renamed from sound/soc/fsl/fsl_hifi4.h)34
-rw-r--r--sound/soc/fsl/fsl_dsp_proxy.c (renamed from sound/soc/fsl/fsl_hifi4_proxy.c)92
-rw-r--r--sound/soc/fsl/fsl_dsp_proxy.h (renamed from sound/soc/fsl/fsl_hifi4_proxy.h)16
15 files changed, 325 insertions, 323 deletions
diff --git a/Documentation/devicetree/bindings/sound/fsl,hifi4.txt b/Documentation/devicetree/bindings/sound/fsl,dsp.txt
index a82b25a6de43..84bc228b4e32 100644
--- a/Documentation/devicetree/bindings/sound/fsl,hifi4.txt
+++ b/Documentation/devicetree/bindings/sound/fsl,dsp.txt
@@ -1,16 +1,16 @@
-NXP HIFI4 DSP (HIFI4)
+NXP DSP
The IP is from Cadence.
Required properties:
- - compatible : Contains "fsl,imx8qxp-hifi4".
+ - compatible : Contains "fsl,imx8qxp-dsp".
- reg : Offset and length of the register set for the device.
Example:
-hifi4: hifi4@596e8000 {
- compatible = "fsl,imx8qxp-hifi4";
+dsp: dsp@596e8000 {
+ compatible = "fsl,imx8qxp-dsp";
reg = <0x0 0x596e8000 0x0 0x88000>;
status = "okay";
};
diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8qxp.dtsi b/arch/arm64/boot/dts/freescale/fsl-imx8qxp.dtsi
index d246b30d61ce..c0b5840d2596 100644
--- a/arch/arm64/boot/dts/freescale/fsl-imx8qxp.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-imx8qxp.dtsi
@@ -69,7 +69,7 @@
#size-cells = <2>;
ranges;
- hifi4_reserved: hifi4@0x8e000000 {
+ dsp_reserved: dsp@0x8e000000 {
no-map;
reg = <0 0x8e000000 0 0x1ffffff>;
};
@@ -124,12 +124,13 @@
};
mu13: mu13@5d280000 {
- compatible = "fsl,imx8-mu-hifi";
+ compatible = "fsl,imx8-mu-dsp";
reg = <0x0 0x5d280000 0x0 0x10000>;
interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>;
- fsl,hifi_ap_mu_id = <13>;
+ fsl,dsp_ap_mu_id = <13>;
status = "okay";
};
+
mu_m4: mu_m4@37440000 {
compatible = "fsl,imx8-mu0-vpu-m4";
reg = <0x0 0x37440000 0x0 0x10000>;
@@ -547,12 +548,12 @@
};
};
- pd_hifi: PD_AUD_HIFI {
+ pd_dsp: PD_AUD_DSP {
reg = <SC_R_DSP>;
#power-domain-cells = <0>;
power-domains =<&pd_audio>;
};
- pd_hifi_ram: PD_AUD_OCRAM {
+ pd_dsp_ram: PD_AUD_OCRAM {
reg = <SC_R_DSP_RAM>;
#power-domain-cells = <0>;
power-domains =<&pd_audio>;
@@ -2597,15 +2598,15 @@
status = "disabled";
};
- hifi4: hifi4@586e8000 {
- compatible = "fsl,imx8qxp-hifi4";
+ dsp: dsp@586e8000 {
+ compatible = "fsl,imx8qxp-dsp";
reg = <0x0 0x596e8000 0x0 0x88000>;
- clocks = <&clk IMX8QXP_AUD_HIFI_IPG>,
+ clocks = <&clk IMX8QXP_AUD_DSP_IPG>,
<&clk IMX8QXP_AUD_OCRAM_IPG>,
- <&clk IMX8QXP_AUD_HIFI_CORE_CLK>;
+ <&clk IMX8QXP_AUD_DSP_CORE_CLK>;
clock-names = "ipg", "ocram", "core";
- fsl,hifi4-firmware = "imx/hifi/hifi4.bin";
- power-domains = <&pd_hifi>;
+ fsl,dsp-firmware = "imx/dsp/hifi4.bin";
+ power-domains = <&pd_dsp>;
};
esai0: esai@59010000 {
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 83b8e92b0395..c245f9297216 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -405,7 +405,7 @@ CONFIG_SND=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_SOC=y
CONFIG_SND_SOC_FSL_ACM=y
-CONFIG_SND_SOC_FSL_HIFI4=y
+CONFIG_SND_SOC_FSL_DSP=y
CONFIG_SND_IMX_SOC=y
CONFIG_SND_SOC_IMX_AK4458=y
CONFIG_SND_SOC_IMX_AK5558=y
diff --git a/drivers/clk/imx/clk-imx8qxp.c b/drivers/clk/imx/clk-imx8qxp.c
index f52600df9b48..0b3de52d529f 100644
--- a/drivers/clk/imx/clk-imx8qxp.c
+++ b/drivers/clk/imx/clk-imx8qxp.c
@@ -690,9 +690,9 @@ static int imx8qxp_clk_probe(struct platform_device *pdev)
clks[IMX8QXP_AUD_SPDIF_0_TX_CLK] = imx_clk_gate2_scu("spdif0_tx_clk", "acm_spdif0_mclk_sel", (void __iomem *)(AUD_SPDIF_0_LPCG), 0, FUNCTION_NAME(PD_AUD_SPDIF_0));
clks[IMX8QXP_AUD_ASRC_0_IPG] = imx_clk_gate2_scu("aud_asrc0_ipg", "ipg_aud_clk_root", (void __iomem *)(AUD_ASRC_0_LPCG), 16, FUNCTION_NAME(PD_AUD_ASRC_0));
clks[IMX8QXP_AUD_ASRC_1_IPG] = imx_clk_gate2_scu("aud_asrc1_ipg", "ipg_aud_clk_root", (void __iomem *)(AUD_ASRC_1_LPCG), 16, FUNCTION_NAME(PD_AUD_ASRC_1));
- clks[IMX8QXP_AUD_HIFI_ADB_ACLK] = imx_clk_gate2_scu("aud_hifi_adb_aclk", "ipg_aud_clk_root", (void __iomem *)(AUD_HIFI_LPCG), 16, FUNCTION_NAME(PD_AUD_HIFI));
- clks[IMX8QXP_AUD_HIFI_IPG] = imx_clk_gate2_scu("aud_hifi_ipg", "ipg_aud_clk_root", (void __iomem *)(AUD_HIFI_LPCG), 20, FUNCTION_NAME(PD_AUD_HIFI));
- clks[IMX8QXP_AUD_HIFI_CORE_CLK] = imx_clk_gate2_scu("aud_hifi_core_clk", "ipg_aud_clk_root", (void __iomem *)(AUD_HIFI_LPCG), 28, FUNCTION_NAME(PD_AUD_HIFI));
+ clks[IMX8QXP_AUD_DSP_ADB_ACLK] = imx_clk_gate2_scu("aud_dsp_adb_aclk", "ipg_aud_clk_root", (void __iomem *)(AUD_DSP_LPCG), 16, FUNCTION_NAME(PD_AUD_DSP));
+ clks[IMX8QXP_AUD_DSP_IPG] = imx_clk_gate2_scu("aud_dsp_ipg", "ipg_aud_clk_root", (void __iomem *)(AUD_DSP_LPCG), 20, FUNCTION_NAME(PD_AUD_DSP));
+ clks[IMX8QXP_AUD_DSP_CORE_CLK] = imx_clk_gate2_scu("aud_dsp_core_clk", "ipg_aud_clk_root", (void __iomem *)(AUD_DSP_LPCG), 28, FUNCTION_NAME(PD_AUD_DSP));
clks[IMX8QXP_AUD_OCRAM_IPG] = imx_clk_gate2_scu("aud_ocram_ipg", "ipg_aud_clk_root", (void __iomem *)(AUD_OCRAM_LPCG), 16, FUNCTION_NAME(PD_AUD_OCRAM));
for (i = 0; i < ARRAY_SIZE(clks); i++)
diff --git a/include/dt-bindings/clock/imx8qxp-clock.h b/include/dt-bindings/clock/imx8qxp-clock.h
index 9d95e7b87e49..dcc085a35087 100644
--- a/include/dt-bindings/clock/imx8qxp-clock.h
+++ b/include/dt-bindings/clock/imx8qxp-clock.h
@@ -476,9 +476,9 @@
#define IMX8QXP_AUD_SPDIF_0_IPG 432
#define IMX8QXP_AUD_ASRC_0_IPG 433
#define IMX8QXP_AUD_ASRC_1_IPG 434
-#define IMX8QXP_AUD_HIFI_ADB_ACLK 435
-#define IMX8QXP_AUD_HIFI_IPG 436
-#define IMX8QXP_AUD_HIFI_CORE_CLK 437
+#define IMX8QXP_AUD_DSP_ADB_ACLK 435
+#define IMX8QXP_AUD_DSP_IPG 436
+#define IMX8QXP_AUD_DSP_CORE_CLK 437
#define IMX8QXP_AUD_OCRAM_IPG 438
/* DC part2 */
diff --git a/include/dt-bindings/soc/imx8_pd.h b/include/dt-bindings/soc/imx8_pd.h
index 2152f3a8d652..f74a4d3646e6 100644
--- a/include/dt-bindings/soc/imx8_pd.h
+++ b/include/dt-bindings/soc/imx8_pd.h
@@ -145,7 +145,7 @@
#define PD_AUD_GPT_10 audio_gpt10
#define PD_AUD_AMIX audio_amix
#define PD_AUD_MQS_0 audio_mqs0
-#define PD_AUD_HIFI audio_hifi
+#define PD_AUD_DSP audio_dsp
#define PD_AUD_OCRAM audio_ocram
#define PD_AUD_MCLK_OUT_0 audio_mclkout0
#define PD_AUD_MCLK_OUT_1 audio_mclkout1
diff --git a/include/soc/imx8/imx8qxp/lpcg.h b/include/soc/imx8/imx8qxp/lpcg.h
index 77be9ce77bb6..e4cd60167d8a 100644
--- a/include/soc/imx8/imx8qxp/lpcg.h
+++ b/include/soc/imx8/imx8qxp/lpcg.h
@@ -149,7 +149,7 @@
#define AUD_GPT_8_LPCG 0x594E0000
#define AUD_GPT_9_LPCG 0x594F0000
#define AUD_GPT_10_LPCG 0x59500000
-#define AUD_HIFI_LPCG 0x59580000
+#define AUD_DSP_LPCG 0x59580000
#define AUD_OCRAM_LPCG 0x59590000
#define AUD_EDMA_0_LPCG 0x595f0000
#define AUD_ASRC_1_LPCG 0x59c00000
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
index 7ca29e74ec91..f54af34de313 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -287,7 +287,7 @@ header-y += mxc_sim_interface.h
header-y += mxc_v4l2.h
header-y += mtio.h
header-y += mxc_asrc.h
-header-y += mxc_hifi4.h
+header-y += mxc_dsp.h
header-y += nbd.h
header-y += ncp_fs.h
header-y += ncp.h
diff --git a/include/uapi/linux/mxc_hifi4.h b/include/uapi/linux/mxc_dsp.h
index 5078537f86fa..aa721f31d403 100644
--- a/include/uapi/linux/mxc_hifi4.h
+++ b/include/uapi/linux/mxc_dsp.h
@@ -4,26 +4,27 @@
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
- * 1. Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __MXC_HIFI4_UAPI_H__
-#define __MXC_HIFI4_UAPI_H__
+#ifndef __MXC_DSP_UAPI_H__
+#define __MXC_DSP_UAPI_H__
#define DSP_IOC_MAGIC 'H'
#define DSP_CLIENT_REGISTER _IOW(DSP_IOC_MAGIC, 0, unsigned int)
@@ -42,7 +43,7 @@
#define CODEC_SBC_ENC 8
#define CODEC_DEMO_DEC 9
-enum HIFI_ERROR_TYPE {
+enum DSP_ERROR_TYPE {
XA_SUCCESS = 0,
XA_ERROR_STREAM,
@@ -59,7 +60,7 @@ enum HIFI_ERROR_TYPE {
};
/* Parameter type to Set /Get */
-enum HIFI_ParaType {
+enum DSP_ParaType {
/* Set parmameters */
/* common */
XA_SAMPLERATE = 0,
@@ -108,8 +109,8 @@ enum HIFI_ParaType {
};
-#define HIFI_STREAM_DABPLUS_BASE 0x30
-enum HIFI_StreamType {
+#define XA_STREAM_DABPLUS_BASE 0x30
+enum DSP_StreamType {
/* AAC/AACPLUS file format */
XA_STREAM_UNKNOWN = 0,
XA_STREAM_ADTS,
@@ -121,7 +122,7 @@ enum HIFI_StreamType {
XA_STREAM_LOAS,
/* DABPLUS file format */
- XA_STREAM_DABPLUS_RAW_SIDEINFO = HIFI_STREAM_DABPLUS_BASE,
+ XA_STREAM_DABPLUS_RAW_SIDEINFO = XA_STREAM_DABPLUS_BASE,
XA_STREAM_DABPLUS,
/* BSAC file raw format */
@@ -130,7 +131,7 @@ enum HIFI_StreamType {
};
/* sbc_enc-specific channel modes */
-enum HIFI_SbcEncChmode {
+enum DSP_SbcEncChmode {
XA_CHMODE_MONO = 0,
XA_CHMODE_DUAL = 1,
XA_CHMODE_STEREO = 2,
@@ -142,4 +143,4 @@ struct shmem_info {
unsigned int size;
};
-#endif/* __MXC_HIFI4_UAPI_H__ */
+#endif/* __MXC_DSP_UAPI_H__ */
diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig
index 86de5cd4401c..99f11a3c2c55 100644
--- a/sound/soc/fsl/Kconfig
+++ b/sound/soc/fsl/Kconfig
@@ -82,8 +82,8 @@ config SND_SOC_FSL_RPMSG_I2S
This option is only useful for out-of-tree drivers since
in-tree drivers select it automatically.
-config SND_SOC_FSL_HIFI4
- tristate "hifi 4 module support"
+config SND_SOC_FSL_DSP
+ tristate "dsp module support"
help
Say Y if you want to add hifi 4 support for the Freescale CPUs.
which is a DSP core for audio processing.
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index ba4d7e061cc6..17f811ea1f73 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -15,7 +15,7 @@ snd-soc-fsl-acm-objs := fsl_acm.o
snd-soc-fsl-amix-objs := fsl_amix.o
snd-soc-fsl-asrc-objs := fsl_asrc.o fsl_asrc_dma.o
snd-soc-fsl-dma-workaround-objs := fsl_dma_workaround.o
-snd-soc-fsl-hifi4-objs := fsl_hifi4.o fsl_hifi4_proxy.o
+snd-soc-fsl-dsp-objs := fsl_dsp.o fsl_dsp_proxy.o
snd-soc-fsl-sai-objs := fsl_sai.o
snd-soc-fsl-ssi-y := fsl_ssi.o
snd-soc-fsl-ssi-$(CONFIG_DEBUG_FS) += fsl_ssi_dbg.o
@@ -29,7 +29,7 @@ snd-soc-fsl-asoc-card-objs := fsl-asoc-card.o
obj-$(CONFIG_SND_SOC_FSL_ACM) += snd-soc-fsl-acm.o
obj-$(CONFIG_SND_SOC_FSL_AMIX) += snd-soc-fsl-amix.o
obj-$(CONFIG_SND_SOC_FSL_ASRC) += snd-soc-fsl-asrc.o
-obj-$(CONFIG_SND_SOC_FSL_HIFI4) += snd-soc-fsl-hifi4.o
+obj-$(CONFIG_SND_SOC_FSL_DSP) += snd-soc-fsl-dsp.o
obj-$(CONFIG_SND_SOC_FSL_SAI) += snd-soc-fsl-sai.o
obj-$(CONFIG_SND_SOC_FSL_SSI) += snd-soc-fsl-ssi.o
obj-$(CONFIG_SND_SOC_FSL_SPDIF) += snd-soc-fsl-spdif.o
diff --git a/sound/soc/fsl/fsl_hifi4.c b/sound/soc/fsl/fsl_dsp.c
index 63a498108086..7df05c7ef135 100644
--- a/sound/soc/fsl/fsl_hifi4.c
+++ b/sound/soc/fsl/fsl_dsp.c
@@ -1,5 +1,5 @@
/*
- * Freescale HIFI 4 driver
+ * Freescale DSP driver
*
* Copyright (c) 2012-2013 by Tensilica Inc. ALL RIGHTS RESERVED.
* Copyright 2018 NXP
@@ -58,20 +58,20 @@
#ifdef CONFIG_COMPAT
#include <linux/compat.h>
#endif
-#include <uapi/linux/mxc_hifi4.h>
+#include <uapi/linux/mxc_dsp.h>
#include <soc/imx8/sc/svc/irq/api.h>
#include <soc/imx8/sc/ipc.h>
#include <soc/imx8/sc/sci.h>
-#include "fsl_hifi4.h"
+#include "fsl_dsp.h"
/* ...allocate new client */
-static inline struct xf_client *xf_client_alloc(struct fsl_hifi4 *hifi4_priv)
+static inline struct xf_client *xf_client_alloc(struct fsl_dsp *dsp_priv)
{
struct xf_client *client;
u32 id;
- id = hifi4_priv->xf_client_map[0].next;
+ id = dsp_priv->xf_client_map[0].next;
/* ...try to allocate a client handle */
if (id != 0) {
@@ -81,11 +81,11 @@ static inline struct xf_client *xf_client_alloc(struct fsl_hifi4 *hifi4_priv)
return ERR_PTR(-ENOMEM);
/* ...advance the head of free clients */
- hifi4_priv->xf_client_map[0].next =
- hifi4_priv->xf_client_map[id].next;
+ dsp_priv->xf_client_map[0].next =
+ dsp_priv->xf_client_map[id].next;
/* ...put associate client id with given object */
- hifi4_priv->xf_client_map[id].client = client;
+ dsp_priv->xf_client_map[id].client = client;
/* ...mark client is not yet bound to proxy */
client->proxy = NULL;
@@ -104,25 +104,25 @@ static inline struct xf_client *xf_client_alloc(struct fsl_hifi4 *hifi4_priv)
static inline void xf_client_free(struct xf_client *client)
{
int id = client->id;
- struct fsl_hifi4 *hifi4_priv = (struct fsl_hifi4 *)client->global;
+ struct fsl_dsp *dsp_priv = (struct fsl_dsp *)client->global;
/* ...put proxy client id into free clients list */
- hifi4_priv->xf_client_map[id].next = hifi4_priv->xf_client_map[0].next;
- hifi4_priv->xf_client_map[0].next = id;
+ dsp_priv->xf_client_map[id].next = dsp_priv->xf_client_map[0].next;
+ dsp_priv->xf_client_map[0].next = id;
/* ...destroy client data */
kfree(client);
}
/* ...lookup client basing on id */
-struct xf_client *xf_client_lookup(struct fsl_hifi4 *hifi4_priv, u32 id)
+struct xf_client *xf_client_lookup(struct fsl_dsp *dsp_priv, u32 id)
{
if ((id >= XF_CFG_MAX_IPC_CLIENTS) ||
- (hifi4_priv->xf_client_map[id].next < XF_CFG_MAX_IPC_CLIENTS)
+ (dsp_priv->xf_client_map[id].next < XF_CFG_MAX_IPC_CLIENTS)
)
return NULL;
else
- return hifi4_priv->xf_client_map[id].client;
+ return dsp_priv->xf_client_map[id].client;
}
/* ...helper function for retrieving the client handle */
@@ -144,11 +144,11 @@ static inline struct xf_client *xf_get_client(struct file *file)
static int fsl_dsp_client_register(struct xf_client *client)
{
- struct fsl_hifi4 *hifi4_priv;
+ struct fsl_dsp *dsp_priv;
struct device *dev;
- hifi4_priv = (struct fsl_hifi4 *)client->global;
- dev = hifi4_priv->dev;
+ dsp_priv = (struct fsl_dsp *)client->global;
+ dev = dsp_priv->dev;
/* ...make sure client is not registered yet */
if (client->proxy != NULL) {
@@ -157,7 +157,7 @@ static int fsl_dsp_client_register(struct xf_client *client)
}
/* ...complete association (no communication with remote proxy here) */
- client->proxy = &hifi4_priv->proxy;
+ client->proxy = &dsp_priv->proxy;
pr_debug("client-%x registered within proxy", client->id);
@@ -186,8 +186,8 @@ static int fsl_dsp_client_unregister(struct xf_client *client)
static int fsl_dsp_ipc_msg_to_dsp(struct xf_client *client,
void __user *user)
{
- struct fsl_hifi4 *hifi4_priv = (struct fsl_hifi4 *)client->global;
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = (struct fsl_dsp *)client->global;
+ struct device *dev = dsp_priv->dev;
struct xf_proxy_message msg;
void *buffer;
unsigned long ret = 0;
@@ -199,14 +199,14 @@ static int fsl_dsp_ipc_msg_to_dsp(struct xf_client *client,
}
/* ...make sure message pointer is sane */
- buffer = xf_proxy_a2b(&hifi4_priv->proxy, msg.address);
+ buffer = xf_proxy_a2b(&dsp_priv->proxy, msg.address);
if (buffer == (void *)-1)
return -EFAULT;
/* ...put current proxy client into message session id */
msg.session_id = XF_MSG_AP_FROM_USER(msg.session_id, client->id);
- xf_cmd_send(&hifi4_priv->proxy,
+ xf_cmd_send(&dsp_priv->proxy,
msg.session_id,
msg.opcode,
buffer,
@@ -218,13 +218,13 @@ static int fsl_dsp_ipc_msg_to_dsp(struct xf_client *client,
static int fsl_dsp_ipc_msg_from_dsp(struct xf_client *client,
void __user *user)
{
- struct fsl_hifi4 *hifi4_priv = (struct fsl_hifi4 *)client->global;
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = (struct fsl_dsp *)client->global;
+ struct device *dev = dsp_priv->dev;
struct xf_message *m;
struct xf_proxy_message msg;
unsigned long ret = 0;
- m = xf_cmd_recv(&hifi4_priv->proxy, &client->wait, &client->queue, 0);
+ m = xf_cmd_recv(&dsp_priv->proxy, &client->wait, &client->queue, 0);
if (IS_ERR(m)) {
dev_err(dev, "receiving failed: %d", (int)PTR_ERR(m));
return PTR_ERR(m);
@@ -238,12 +238,12 @@ static int fsl_dsp_ipc_msg_from_dsp(struct xf_client *client,
msg.session_id = XF_MSG_AP_TO_USER(m->id);
msg.opcode = m->opcode;
msg.length = m->length;
- msg.address = xf_proxy_b2a(&hifi4_priv->proxy, m->buffer);
+ msg.address = xf_proxy_b2a(&dsp_priv->proxy, m->buffer);
msg.ret = m->ret;
/* ...return the message back to a pool and release lock */
- xf_msg_free(&hifi4_priv->proxy, m);
- xf_unlock(&hifi4_priv->proxy.lock);
+ xf_msg_free(&dsp_priv->proxy, m);
+ xf_unlock(&dsp_priv->proxy.lock);
ret = copy_to_user(user, &msg, sizeof(struct xf_proxy_message));
if (ret) {
@@ -257,13 +257,13 @@ static int fsl_dsp_ipc_msg_from_dsp(struct xf_client *client,
static int fsl_dsp_get_shmem_info(struct xf_client *client,
void __user *user)
{
- struct fsl_hifi4 *hifi4_priv = (struct fsl_hifi4 *)client->global;
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = (struct fsl_dsp *)client->global;
+ struct device *dev = dsp_priv->dev;
struct shmem_info mem_info;
unsigned long ret = 0;
- mem_info.phys_addr = hifi4_priv->scratch_buf_phys;
- mem_info.size = hifi4_priv->scratch_buf_size;
+ mem_info.phys_addr = dsp_priv->scratch_buf_phys;
+ mem_info.size = dsp_priv->scratch_buf_size;
ret = copy_to_user(user, &mem_info, sizeof(struct shmem_info));
if (ret) {
@@ -274,16 +274,16 @@ static int fsl_dsp_get_shmem_info(struct xf_client *client,
return ret;
}
-static struct miscdevice hifi4_miscdev = {
+static struct miscdevice dsp_miscdev = {
.name = "mxc_hifi4",
.minor = MISC_DYNAMIC_MINOR,
};
-static long fsl_hifi4_ioctl(struct file *file, unsigned int cmd,
+static long fsl_dsp_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct xf_client *client;
- struct fsl_hifi4 *hifi4_priv;
+ struct fsl_dsp *dsp_priv;
struct xf_proxy *proxy;
struct device *dev;
void __user *user;
@@ -294,16 +294,16 @@ static long fsl_hifi4_ioctl(struct file *file, unsigned int cmd,
if (IS_ERR(client))
return PTR_ERR(client);
- hifi4_priv = (struct fsl_hifi4 *)client->global;
- proxy = &hifi4_priv->proxy;
- dev = hifi4_priv->dev;
+ dsp_priv = (struct fsl_dsp *)client->global;
+ proxy = &dsp_priv->proxy;
+ dev = dsp_priv->dev;
user = (void __user *)arg;
- mutex_lock(&hifi4_priv->hifi4_mutex);
+ mutex_lock(&dsp_priv->dsp_mutex);
if (!proxy->is_ready) {
- mutex_unlock(&hifi4_priv->hifi4_mutex);
- dev_err(dev, "hifi firmware is not ready\n");
+ mutex_unlock(&dsp_priv->dsp_mutex);
+ dev_err(dev, "dsp firmware is not ready\n");
return -EFAULT;
}
@@ -327,29 +327,29 @@ static long fsl_hifi4_ioctl(struct file *file, unsigned int cmd,
break;
}
- mutex_unlock(&hifi4_priv->hifi4_mutex);
+ mutex_unlock(&dsp_priv->dsp_mutex);
return ret;
}
-void resource_release(struct fsl_hifi4 *hifi4_priv)
+void resource_release(struct fsl_dsp *dsp_priv)
{
int i;
/* ...initialize client association map */
for (i = 0; i < XF_CFG_MAX_IPC_CLIENTS - 1; i++)
- hifi4_priv->xf_client_map[i].next = i + 1;
+ dsp_priv->xf_client_map[i].next = i + 1;
/* ...set list terminator */
- hifi4_priv->xf_client_map[i].next = 0;
+ dsp_priv->xf_client_map[i].next = 0;
/* ...set pointer to shared memory */
- xf_proxy_init(&hifi4_priv->proxy);
+ xf_proxy_init(&dsp_priv->proxy);
}
-static int fsl_hifi4_open(struct inode *inode, struct file *file)
+static int fsl_dsp_open(struct inode *inode, struct file *file)
{
- struct fsl_hifi4 *hifi4_priv = dev_get_drvdata(hifi4_miscdev.parent);
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = dev_get_drvdata(dsp_miscdev.parent);
+ struct device *dev = dsp_priv->dev;
struct xf_client *client;
int ret = 0;
@@ -358,7 +358,7 @@ static int fsl_hifi4_open(struct inode *inode, struct file *file)
return -EINVAL;
/* ...allocate new proxy client object */
- client = xf_client_alloc(hifi4_priv);
+ client = xf_client_alloc(dsp_priv);
if (IS_ERR(client))
return PTR_ERR(client);
@@ -374,23 +374,23 @@ static int fsl_hifi4_open(struct inode *inode, struct file *file)
/* ...reset mappings counter */
atomic_set(&client->vm_use, 0);
- client->global = (void *)hifi4_priv;
+ client->global = (void *)dsp_priv;
file->private_data = (void *)client;
pm_runtime_get_sync(dev);
- mutex_lock(&hifi4_priv->hifi4_mutex);
+ mutex_lock(&dsp_priv->dsp_mutex);
/* increase reference counter when opening device */
- atomic_long_inc(&hifi4_priv->refcnt);
- mutex_unlock(&hifi4_priv->hifi4_mutex);
+ atomic_long_inc(&dsp_priv->refcnt);
+ mutex_unlock(&dsp_priv->dsp_mutex);
return ret;
}
-static int fsl_hifi4_close(struct inode *inode, struct file *file)
+static int fsl_dsp_close(struct inode *inode, struct file *file)
{
- struct fsl_hifi4 *hifi4_priv;
+ struct fsl_dsp *dsp_priv;
struct device *dev;
struct xf_proxy *proxy;
struct xf_client *client;
@@ -409,26 +409,26 @@ static int fsl_hifi4_close(struct inode *inode, struct file *file)
xf_client_free(client);
}
- hifi4_priv = (struct fsl_hifi4 *)client->global;
- dev = hifi4_priv->dev;
+ dsp_priv = (struct fsl_dsp *)client->global;
+ dev = dsp_priv->dev;
pm_runtime_put_sync(dev);
- mutex_lock(&hifi4_priv->hifi4_mutex);
+ mutex_lock(&dsp_priv->dsp_mutex);
/* decrease reference counter when closing device */
- atomic_long_dec(&hifi4_priv->refcnt);
+ atomic_long_dec(&dsp_priv->refcnt);
/* If device is free, reinitialize the resource of
- * hifi4 driver and framework
+ * dsp driver and framework
*/
- if (atomic_long_read(&hifi4_priv->refcnt) <= 0)
- resource_release(hifi4_priv);
+ if (atomic_long_read(&dsp_priv->refcnt) <= 0)
+ resource_release(dsp_priv);
- mutex_unlock(&hifi4_priv->hifi4_mutex);
+ mutex_unlock(&dsp_priv->dsp_mutex);
return 0;
}
/* ...wait until data is available in the response queue */
-static unsigned int fsl_hifi4_poll(struct file *file, poll_table *wait)
+static unsigned int fsl_dsp_poll(struct file *file, poll_table *wait)
{
struct xf_proxy *proxy;
struct xf_client *client;
@@ -458,7 +458,7 @@ static unsigned int fsl_hifi4_poll(struct file *file, poll_table *wait)
******************************************************************************/
/* ...add reference to shared buffer */
-static void hifi4_mmap_open(struct vm_area_struct *vma)
+static void dsp_mmap_open(struct vm_area_struct *vma)
{
struct xf_client *client = vma->vm_private_data;
@@ -469,7 +469,7 @@ static void hifi4_mmap_open(struct vm_area_struct *vma)
}
/* ...close reference to shared buffer */
-static void hifi4_mmap_close(struct vm_area_struct *vma)
+static void dsp_mmap_close(struct vm_area_struct *vma)
{
struct xf_client *client = vma->vm_private_data;
@@ -480,20 +480,20 @@ static void hifi4_mmap_close(struct vm_area_struct *vma)
}
/* ...memory map operations */
-static const struct vm_operations_struct hifi4_mmap_ops = {
- .open = hifi4_mmap_open,
- .close = hifi4_mmap_close,
+static const struct vm_operations_struct dsp_mmap_ops = {
+ .open = dsp_mmap_open,
+ .close = dsp_mmap_close,
};
/* ...shared memory mapping */
-static int fsl_hifi4_mmap(struct file *file, struct vm_area_struct *vma)
+static int fsl_dsp_mmap(struct file *file, struct vm_area_struct *vma)
{
struct xf_proxy *proxy;
struct xf_client *client;
unsigned long size;
unsigned long pfn;
int r;
- struct fsl_hifi4 *hifi4_priv;
+ struct fsl_dsp *dsp_priv;
/* ...basic sanity checks */
client = xf_get_client(file);
@@ -515,7 +515,7 @@ static int fsl_hifi4_mmap(struct file *file, struct vm_area_struct *vma)
return -EPERM;
/* ...set memory map operations */
- vma->vm_ops = &hifi4_mmap_ops;
+ vma->vm_ops = &dsp_mmap_ops;
/* ...assign private data */
client->vm_start = vma->vm_start;
@@ -524,9 +524,9 @@ static int fsl_hifi4_mmap(struct file *file, struct vm_area_struct *vma)
vma->vm_private_data = client;
/* ...set page number of shared memory */
- hifi4_priv = (struct fsl_hifi4 *)client->global;
- pfn = hifi4_priv->scratch_buf_phys >> PAGE_SHIFT;
- size = hifi4_priv->scratch_buf_size;
+ dsp_priv = (struct fsl_dsp *)client->global;
+ pfn = dsp_priv->scratch_buf_phys >> PAGE_SHIFT;
+ size = dsp_priv->scratch_buf_size;
/* ...remap shared memory to user-space */
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
@@ -540,7 +540,7 @@ static int fsl_hifi4_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
}
-void *memset_hifi(void *dest, int c, size_t count)
+void *memset_dsp(void *dest, int c, size_t count)
{
uint *dl = (uint *)dest;
void *dl_1, *dl_2;
@@ -586,7 +586,7 @@ void *memset_hifi(void *dest, int c, size_t count)
return dest;
}
-void *memcpy_hifi(void *dest, const void *src, size_t count)
+void *memcpy_dsp(void *dest, const void *src, size_t count)
{
unsigned int *dl = (unsigned int *)dest, *sl = (unsigned int *)src;
size_t n = round_up(count, 4) / 4;
@@ -607,10 +607,10 @@ void *memcpy_hifi(void *dest, const void *src, size_t count)
return dest;
}
-static void hifi4_load_firmware(const struct firmware *fw, void *context)
+static void dsp_load_firmware(const struct firmware *fw, void *context)
{
- struct fsl_hifi4 *hifi4_priv = context;
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = context;
+ struct device *dev = dsp_priv->dev;
Elf32_Ehdr *ehdr; /* Elf header structure pointer */
Elf32_Shdr *shdr; /* Section header structure pointer */
Elf32_Addr sh_addr;
@@ -654,8 +654,8 @@ static void hifi4_load_firmware(const struct firmware *fw, void *context)
sh_addr = shdr->sh_addr;
if (shdr->sh_type == SHT_NOBITS) {
- memset_hifi((void *)(hifi4_priv->sdram_vir_addr +
- (sh_addr - hifi4_priv->sdram_phys_addr)),
+ memset_dsp((void *)(dsp_priv->sdram_vir_addr +
+ (sh_addr - dsp_priv->sdram_phys_addr)),
0,
shdr->sh_size);
} else {
@@ -665,13 +665,13 @@ static void hifi4_load_firmware(const struct firmware *fw, void *context)
(!strcmp(&strtab[shdr->sh_name], ".data")) ||
(!strcmp(&strtab[shdr->sh_name], ".bss"))
) {
- memcpy_hifi((void *)(hifi4_priv->sdram_vir_addr
- + (sh_addr - hifi4_priv->sdram_phys_addr)),
+ memcpy_dsp((void *)(dsp_priv->sdram_vir_addr
+ + (sh_addr - dsp_priv->sdram_phys_addr)),
(const void *)image,
shdr->sh_size);
} else {
- memcpy_hifi((void *)(hifi4_priv->regs +
- (sh_addr - hifi4_priv->paddr)),
+ memcpy_dsp((void *)(dsp_priv->regs +
+ (sh_addr - dsp_priv->paddr)),
(const void *)image,
shdr->sh_size);
}
@@ -679,73 +679,73 @@ static void hifi4_load_firmware(const struct firmware *fw, void *context)
}
/* start the core */
- sc_pm_cpu_start(hifi4_priv->hifi_ipcHandle,
- SC_R_DSP, true, hifi4_priv->iram);
+ sc_pm_cpu_start(dsp_priv->dsp_ipcHandle,
+ SC_R_DSP, true, dsp_priv->iram);
}
/* Initialization of the MU code. */
-int hifi4_mu_init(struct fsl_hifi4 *hifi4_priv)
+int dsp_mu_init(struct fsl_dsp *dsp_priv)
{
- struct device *dev = hifi4_priv->dev;
+ struct device *dev = dsp_priv->dev;
struct device_node *np;
- unsigned int hifi_mu_id;
+ unsigned int dsp_mu_id;
u32 irq;
int ret = 0;
/*
- * Get the address of MU to be used for communication with the hifi
+ * Get the address of MU to be used for communication with the dsp
*/
- np = of_find_compatible_node(NULL, NULL, "fsl,imx8-mu-hifi");
+ np = of_find_compatible_node(NULL, NULL, "fsl,imx8-mu-dsp");
if (!np) {
dev_err(dev, "Cannot find MU entry in device tree\n");
return -EINVAL;
}
- hifi4_priv->mu_base_virtaddr = of_iomap(np, 0);
- WARN_ON(!hifi4_priv->mu_base_virtaddr);
+ dsp_priv->mu_base_virtaddr = of_iomap(np, 0);
+ WARN_ON(!dsp_priv->mu_base_virtaddr);
ret = of_property_read_u32_index(np,
- "fsl,hifi_ap_mu_id", 0, &hifi_mu_id);
+ "fsl,dsp_ap_mu_id", 0, &dsp_mu_id);
if (ret) {
dev_err(dev, "Cannot get mu_id %d\n", ret);
return -EINVAL;
}
- hifi4_priv->hifi_mu_id = hifi_mu_id;
+ dsp_priv->dsp_mu_id = dsp_mu_id;
irq = of_irq_get(np, 0);
- ret = devm_request_irq(hifi4_priv->dev, irq, fsl_hifi4_mu_isr,
- IRQF_EARLY_RESUME, "hifi4_mu_isr", &hifi4_priv->proxy);
+ ret = devm_request_irq(dsp_priv->dev, irq, fsl_dsp_mu_isr,
+ IRQF_EARLY_RESUME, "dsp_mu_isr", &dsp_priv->proxy);
if (ret) {
dev_err(dev, "request_irq failed %d, err = %d\n", irq, ret);
return -EINVAL;
}
- if (!hifi4_priv->hifi_mu_init) {
- MU_Init(hifi4_priv->mu_base_virtaddr);
- MU_EnableRxFullInt(hifi4_priv->mu_base_virtaddr, 0);
- hifi4_priv->hifi_mu_init = 1;
+ if (!dsp_priv->dsp_mu_init) {
+ MU_Init(dsp_priv->mu_base_virtaddr);
+ MU_EnableRxFullInt(dsp_priv->mu_base_virtaddr, 0);
+ dsp_priv->dsp_mu_init = 1;
}
return ret;
}
-static const struct file_operations hifi4_fops = {
+static const struct file_operations dsp_fops = {
.owner = THIS_MODULE,
- .unlocked_ioctl = fsl_hifi4_ioctl,
+ .unlocked_ioctl = fsl_dsp_ioctl,
#ifdef CONFIG_COMPAT
- .compat_ioctl = fsl_hifi4_ioctl,
+ .compat_ioctl = fsl_dsp_ioctl,
#endif
- .open = fsl_hifi4_open,
- .poll = fsl_hifi4_poll,
- .mmap = fsl_hifi4_mmap,
- .release = fsl_hifi4_close,
+ .open = fsl_dsp_open,
+ .poll = fsl_dsp_poll,
+ .mmap = fsl_dsp_mmap,
+ .release = fsl_dsp_close,
};
-static int fsl_hifi4_probe(struct platform_device *pdev)
+static int fsl_dsp_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- struct fsl_hifi4 *hifi4_priv;
+ struct fsl_dsp *dsp_priv;
const char *fw_name;
struct resource *res;
void __iomem *regs;
@@ -756,11 +756,11 @@ static int fsl_hifi4_probe(struct platform_device *pdev)
int size, offset, i;
int ret;
- hifi4_priv = devm_kzalloc(&pdev->dev, sizeof(*hifi4_priv), GFP_KERNEL);
- if (!hifi4_priv)
+ dsp_priv = devm_kzalloc(&pdev->dev, sizeof(*dsp_priv), GFP_KERNEL);
+ if (!dsp_priv)
return -ENOMEM;
- hifi4_priv->dev = &pdev->dev;
+ dsp_priv->dev = &pdev->dev;
/* Get the addresses and IRQ */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -768,13 +768,13 @@ static int fsl_hifi4_probe(struct platform_device *pdev)
if (IS_ERR(regs))
return PTR_ERR(regs);
- hifi4_priv->paddr = res->start;
- hifi4_priv->regs = regs;
+ dsp_priv->paddr = res->start;
+ dsp_priv->regs = regs;
- hifi4_priv->dram0 = hifi4_priv->paddr + DRAM0_OFFSET;
- hifi4_priv->dram1 = hifi4_priv->paddr + DRAM1_OFFSET;
- hifi4_priv->iram = hifi4_priv->paddr + IRAM_OFFSET;
- hifi4_priv->sram = hifi4_priv->paddr + SYSRAM_OFFSET;
+ dsp_priv->dram0 = dsp_priv->paddr + DRAM0_OFFSET;
+ dsp_priv->dram1 = dsp_priv->paddr + DRAM1_OFFSET;
+ dsp_priv->iram = dsp_priv->paddr + IRAM_OFFSET;
+ dsp_priv->sram = dsp_priv->paddr + SYSRAM_OFFSET;
sciErr = sc_ipc_getMuID(&mu_id);
if (sciErr != SC_ERR_NONE) {
@@ -782,69 +782,69 @@ static int fsl_hifi4_probe(struct platform_device *pdev)
return sciErr;
}
- sciErr = sc_ipc_open(&hifi4_priv->hifi_ipcHandle, mu_id);
+ sciErr = sc_ipc_open(&dsp_priv->dsp_ipcHandle, mu_id);
if (sciErr != SC_ERR_NONE) {
dev_err(&pdev->dev, "Cannot open MU channel to SCU %d, %d\n",
mu_id, sciErr);
return sciErr;
};
- sciErr = sc_misc_set_control(hifi4_priv->hifi_ipcHandle, SC_R_DSP,
+ sciErr = sc_misc_set_control(dsp_priv->dsp_ipcHandle, SC_R_DSP,
SC_C_OFS_SEL, 1);
if (sciErr != SC_ERR_NONE) {
dev_err(&pdev->dev, "Error system address offset source select\n");
return -EIO;
}
- sciErr = sc_misc_set_control(hifi4_priv->hifi_ipcHandle, SC_R_DSP,
+ sciErr = sc_misc_set_control(dsp_priv->dsp_ipcHandle, SC_R_DSP,
SC_C_OFS_AUDIO, 0x80);
if (sciErr != SC_ERR_NONE) {
dev_err(&pdev->dev, "Error system address offset of AUDIO\n");
return -EIO;
}
- sciErr = sc_misc_set_control(hifi4_priv->hifi_ipcHandle, SC_R_DSP,
+ sciErr = sc_misc_set_control(dsp_priv->dsp_ipcHandle, SC_R_DSP,
SC_C_OFS_PERIPH, 0x5A);
if (sciErr != SC_ERR_NONE) {
dev_err(&pdev->dev, "Error system address offset of PERIPH\n");
return -EIO;
}
- sciErr = sc_misc_set_control(hifi4_priv->hifi_ipcHandle, SC_R_DSP,
+ sciErr = sc_misc_set_control(dsp_priv->dsp_ipcHandle, SC_R_DSP,
SC_C_OFS_IRQ, 0x51);
if (sciErr != SC_ERR_NONE) {
dev_err(&pdev->dev, "Error system address offset of IRQ\n");
return -EIO;
}
- ret = hifi4_mu_init(hifi4_priv);
+ ret = dsp_mu_init(dsp_priv);
if (ret)
return ret;
- ret = of_property_read_string(np, "fsl,hifi4-firmware", &fw_name);
- hifi4_priv->fw_name = fw_name;
+ ret = of_property_read_string(np, "fsl,dsp-firmware", &fw_name);
+ dsp_priv->fw_name = fw_name;
- platform_set_drvdata(pdev, hifi4_priv);
+ platform_set_drvdata(pdev, dsp_priv);
pm_runtime_enable(&pdev->dev);
- hifi4_miscdev.fops = &hifi4_fops,
- hifi4_miscdev.parent = &pdev->dev,
- ret = misc_register(&hifi4_miscdev);
+ dsp_miscdev.fops = &dsp_fops,
+ dsp_miscdev.parent = &pdev->dev,
+ ret = misc_register(&dsp_miscdev);
if (ret) {
dev_err(&pdev->dev, "failed to register misc device %d\n", ret);
return ret;
}
- hifi4_priv->sdram_phys_addr = SDRAM_BASE_ADDR;
- hifi4_priv->sdram_vir_addr = ioremap_wc(hifi4_priv->sdram_phys_addr,
+ dsp_priv->sdram_phys_addr = SDRAM_BASE_ADDR;
+ dsp_priv->sdram_vir_addr = ioremap_wc(dsp_priv->sdram_phys_addr,
SDRAM_BASE_SIZE);
- if (!hifi4_priv->sdram_vir_addr) {
- dev_err(&pdev->dev, "failed to remap sdram space for hifi4 firmware\n");
+ if (!dsp_priv->sdram_vir_addr) {
+ dev_err(&pdev->dev, "failed to remap sdram space for dsp firmware\n");
return -ENXIO;
}
- memset_io(hifi4_priv->sdram_vir_addr, 0, SDRAM_BASE_SIZE);
+ memset_io(dsp_priv->sdram_vir_addr, 0, SDRAM_BASE_SIZE);
- size = MSG_BUF_SIZE + HIFI_CONFIG_SIZE;
+ size = MSG_BUF_SIZE + DSP_CONFIG_SIZE;
buf_virt = dma_alloc_coherent(&pdev->dev, size, &buf_phys, GFP_KERNEL);
if (!buf_virt) {
@@ -853,69 +853,69 @@ static int fsl_hifi4_probe(struct platform_device *pdev)
}
/* msg ring buffer memory */
- hifi4_priv->msg_buf_virt = buf_virt;
- hifi4_priv->msg_buf_phys = buf_phys;
- hifi4_priv->msg_buf_size = MSG_BUF_SIZE;
+ dsp_priv->msg_buf_virt = buf_virt;
+ dsp_priv->msg_buf_phys = buf_phys;
+ dsp_priv->msg_buf_size = MSG_BUF_SIZE;
offset = MSG_BUF_SIZE;
/* keep dsp framework's global data when suspend/resume */
- hifi4_priv->hifi_config_virt = buf_virt + offset;
- hifi4_priv->hifi_config_phys = buf_phys + offset;
- hifi4_priv->hifi_config_size = HIFI_CONFIG_SIZE;
+ dsp_priv->dsp_config_virt = buf_virt + offset;
+ dsp_priv->dsp_config_phys = buf_phys + offset;
+ dsp_priv->dsp_config_size = DSP_CONFIG_SIZE;
/* scratch memory for dsp framework */
- hifi4_priv->scratch_buf_virt = hifi4_priv->sdram_vir_addr +
+ dsp_priv->scratch_buf_virt = dsp_priv->sdram_vir_addr +
SDRAM_CODEC_LIB_OFFSET;
- hifi4_priv->scratch_buf_phys = hifi4_priv->sdram_phys_addr +
+ dsp_priv->scratch_buf_phys = dsp_priv->sdram_phys_addr +
SDRAM_CODEC_LIB_OFFSET;
- hifi4_priv->scratch_buf_size = SDRAM_BASE_SIZE - SDRAM_CODEC_LIB_OFFSET;
+ dsp_priv->scratch_buf_size = SDRAM_BASE_SIZE - SDRAM_CODEC_LIB_OFFSET;
- /* initialize the reference counter for hifi4_priv
+ /* initialize the reference counter for dsp_priv
* structure
*/
- atomic_long_set(&hifi4_priv->refcnt, 0);
+ atomic_long_set(&dsp_priv->refcnt, 0);
/* ...initialize client association map */
for (i = 0; i < XF_CFG_MAX_IPC_CLIENTS - 1; i++)
- hifi4_priv->xf_client_map[i].next = i + 1;
+ dsp_priv->xf_client_map[i].next = i + 1;
/* ...set list terminator */
- hifi4_priv->xf_client_map[i].next = 0;
+ dsp_priv->xf_client_map[i].next = 0;
/* ...set pointer to shared memory */
- xf_proxy_init(&hifi4_priv->proxy);
+ xf_proxy_init(&dsp_priv->proxy);
/* ...initialize mutex */
- mutex_init(&hifi4_priv->hifi4_mutex);
+ mutex_init(&dsp_priv->dsp_mutex);
return 0;
}
-static int fsl_hifi4_remove(struct platform_device *pdev)
+static int fsl_dsp_remove(struct platform_device *pdev)
{
- struct fsl_hifi4 *hifi4_priv = platform_get_drvdata(pdev);
+ struct fsl_dsp *dsp_priv = platform_get_drvdata(pdev);
int size;
- misc_deregister(&hifi4_miscdev);
+ misc_deregister(&dsp_miscdev);
- size = MSG_BUF_SIZE + HIFI_CONFIG_SIZE;
- dma_free_coherent(&pdev->dev, size, hifi4_priv->msg_buf_virt,
- hifi4_priv->msg_buf_phys);
- if (hifi4_priv->sdram_vir_addr)
- iounmap(hifi4_priv->sdram_vir_addr);
+ size = MSG_BUF_SIZE + DSP_CONFIG_SIZE;
+ dma_free_coherent(&pdev->dev, size, dsp_priv->msg_buf_virt,
+ dsp_priv->msg_buf_phys);
+ if (dsp_priv->sdram_vir_addr)
+ iounmap(dsp_priv->sdram_vir_addr);
return 0;
}
#ifdef CONFIG_PM
-static int fsl_hifi4_runtime_resume(struct device *dev)
+static int fsl_dsp_runtime_resume(struct device *dev)
{
- struct fsl_hifi4 *hifi4_priv = dev_get_drvdata(dev);
- struct xf_proxy *proxy = &hifi4_priv->proxy;
+ struct fsl_dsp *dsp_priv = dev_get_drvdata(dev);
+ struct xf_proxy *proxy = &dsp_priv->proxy;
int ret;
- if (sc_pm_set_resource_power_mode(hifi4_priv->hifi_ipcHandle,
+ if (sc_pm_set_resource_power_mode(dsp_priv->dsp_ipcHandle,
SC_R_DSP_RAM, SC_PM_PW_MODE_ON) != SC_ERR_NONE) {
- dev_err(dev, "Error power on HIFI RAM\n");
+ dev_err(dev, "Error power on DSP RAM\n");
return -EIO;
}
@@ -923,9 +923,9 @@ static int fsl_hifi4_runtime_resume(struct device *dev)
init_completion(&proxy->cmd_complete);
ret = request_firmware_nowait(THIS_MODULE,
- FW_ACTION_HOTPLUG, hifi4_priv->fw_name,
+ FW_ACTION_HOTPLUG, dsp_priv->fw_name,
dev,
- GFP_KERNEL, hifi4_priv, hifi4_load_firmware);
+ GFP_KERNEL, dsp_priv, dsp_load_firmware);
if (ret) {
dev_err(dev, "failed to load firmware\n");
@@ -933,23 +933,23 @@ static int fsl_hifi4_runtime_resume(struct device *dev)
}
ret = icm_ack_wait(proxy, 0);
- if (ret) {
+ if (ret)
return ret;
- }
- dev_info(dev, "hifi driver registered\n");
+
+ dev_info(dev, "dsp driver registered\n");
}
return 0;
}
-static int fsl_hifi4_runtime_suspend(struct device *dev)
+static int fsl_dsp_runtime_suspend(struct device *dev)
{
- struct fsl_hifi4 *hifi4_priv = dev_get_drvdata(dev);
- struct xf_proxy *proxy = &hifi4_priv->proxy;
+ struct fsl_dsp *dsp_priv = dev_get_drvdata(dev);
+ struct xf_proxy *proxy = &dsp_priv->proxy;
- if (sc_pm_set_resource_power_mode(hifi4_priv->hifi_ipcHandle,
+ if (sc_pm_set_resource_power_mode(dsp_priv->dsp_ipcHandle,
SC_R_DSP_RAM, SC_PM_PW_MODE_OFF) != SC_ERR_NONE) {
- dev_err(dev, "Error power off HIFI RAM\n");
+ dev_err(dev, "Error power off DSP RAM\n");
return -EIO;
}
proxy->is_ready = 0;
@@ -959,16 +959,16 @@ static int fsl_hifi4_runtime_suspend(struct device *dev)
#ifdef CONFIG_PM_SLEEP
-static int fsl_hifi4_suspend(struct device *dev)
+static int fsl_dsp_suspend(struct device *dev)
{
- struct fsl_hifi4 *hifi4_priv = dev_get_drvdata(dev);
- struct xf_proxy *proxy = &hifi4_priv->proxy;
+ struct fsl_dsp *dsp_priv = dev_get_drvdata(dev);
+ struct xf_proxy *proxy = &dsp_priv->proxy;
int ret = 0;
if (proxy->is_ready) {
ret = xf_cmd_send_suspend(proxy);
if (ret) {
- dev_err(dev, "hifi4 suspend fail\n");
+ dev_err(dev, "dsp suspend fail\n");
return ret;
}
}
@@ -978,10 +978,10 @@ static int fsl_hifi4_suspend(struct device *dev)
return ret;
}
-static int fsl_hifi4_resume(struct device *dev)
+static int fsl_dsp_resume(struct device *dev)
{
- struct fsl_hifi4 *hifi4_priv = dev_get_drvdata(dev);
- struct xf_proxy *proxy = &hifi4_priv->proxy;
+ struct fsl_dsp *dsp_priv = dev_get_drvdata(dev);
+ struct xf_proxy *proxy = &dsp_priv->proxy;
int ret = 0;
ret = pm_runtime_force_resume(dev);
@@ -991,7 +991,7 @@ static int fsl_hifi4_resume(struct device *dev)
if (proxy->is_ready) {
ret = xf_cmd_send_resume(proxy);
if (ret) {
- dev_err(dev, "hifi4 resume fail\n");
+ dev_err(dev, "dsp resume fail\n");
return ret;
}
}
@@ -1000,29 +1000,29 @@ static int fsl_hifi4_resume(struct device *dev)
}
#endif /* CONFIG_PM_SLEEP */
-static const struct dev_pm_ops fsl_hifi4_pm = {
- SET_RUNTIME_PM_OPS(fsl_hifi4_runtime_suspend,
- fsl_hifi4_runtime_resume, NULL)
- SET_SYSTEM_SLEEP_PM_OPS(fsl_hifi4_suspend, fsl_hifi4_resume)
+static const struct dev_pm_ops fsl_dsp_pm = {
+ SET_RUNTIME_PM_OPS(fsl_dsp_runtime_suspend,
+ fsl_dsp_runtime_resume, NULL)
+ SET_SYSTEM_SLEEP_PM_OPS(fsl_dsp_suspend, fsl_dsp_resume)
};
-static const struct of_device_id fsl_hifi4_ids[] = {
- { .compatible = "fsl,imx8qxp-hifi4", },
+static const struct of_device_id fsl_dsp_ids[] = {
+ { .compatible = "fsl,imx8qxp-dsp", },
{}
};
-MODULE_DEVICE_TABLE(of, fsl_hifi4_ids);
+MODULE_DEVICE_TABLE(of, fsl_dsp_ids);
-static struct platform_driver fsl_hifi4_driver = {
- .probe = fsl_hifi4_probe,
- .remove = fsl_hifi4_remove,
+static struct platform_driver fsl_dsp_driver = {
+ .probe = fsl_dsp_probe,
+ .remove = fsl_dsp_remove,
.driver = {
- .name = "fsl-hifi4",
- .of_match_table = fsl_hifi4_ids,
- .pm = &fsl_hifi4_pm,
+ .name = "fsl-dsp",
+ .of_match_table = fsl_dsp_ids,
+ .pm = &fsl_dsp_pm,
},
};
-module_platform_driver(fsl_hifi4_driver);
+module_platform_driver(fsl_dsp_driver);
-MODULE_DESCRIPTION("Freescale HIFI 4 driver");
-MODULE_ALIAS("platform:fsl-hifi4");
+MODULE_DESCRIPTION("Freescale DSP driver");
+MODULE_ALIAS("platform:fsl-dsp");
MODULE_LICENSE("Dual BSD/GPL");
diff --git a/sound/soc/fsl/fsl_hifi4.h b/sound/soc/fsl/fsl_dsp.h
index 4700d66f3fcf..bc05f090a46d 100644
--- a/sound/soc/fsl/fsl_hifi4.h
+++ b/sound/soc/fsl/fsl_dsp.h
@@ -1,5 +1,5 @@
/*
- * Freescale HIFI 4 driver
+ * Freescale DSP driver
*
* Copyright 2018 NXP
*
@@ -8,8 +8,8 @@
* kind, whether express or implied.
*/
-#include <uapi/linux/mxc_hifi4.h>
-#include "fsl_hifi4_proxy.h"
+#include <uapi/linux/mxc_dsp.h>
+#include "fsl_dsp_proxy.h"
typedef void (*memcpy_func) (void *dest, const void *src, size_t n);
@@ -51,15 +51,15 @@ union xf_client_link {
struct xf_client *client;
};
-struct fsl_hifi4 {
+struct fsl_dsp {
struct device *dev;
const char *fw_name;
void __iomem *regs;
void __iomem *mu_base_virtaddr;
- sc_ipc_t hifi_ipcHandle;
+ sc_ipc_t dsp_ipcHandle;
sc_ipc_t mu_ipcHandle;
- unsigned int hifi_mu_id;
- int hifi_mu_init;
+ unsigned int dsp_mu_id;
+ int dsp_mu_init;
atomic_long_t refcnt;
unsigned long paddr;
unsigned long dram0;
@@ -74,15 +74,15 @@ struct fsl_hifi4 {
void *scratch_buf_virt;
dma_addr_t scratch_buf_phys;
int scratch_buf_size;
- void *hifi_config_virt;
- dma_addr_t hifi_config_phys;
- int hifi_config_size;
+ void *dsp_config_virt;
+ dma_addr_t dsp_config_phys;
+ int dsp_config_size;
/* ...proxy data structures */
struct xf_proxy proxy;
/* ...mutex lock */
- struct mutex hifi4_mutex;
+ struct mutex dsp_mutex;
/* ...global clients pool (item[0] serves as list terminator) */
union xf_client_link xf_client_map[XF_CFG_MAX_IPC_CLIENTS];
@@ -106,7 +106,7 @@ struct fsl_hifi4 {
#define MSG_BUF_SIZE 8192
#define INPUT_BUF_SIZE 4096
#define OUTPUT_BUF_SIZE 16384
-#define HIFI_CONFIG_SIZE 4096
+#define DSP_CONFIG_SIZE 4096
/*external buffer
* ----------------------------------------------------------------------
@@ -114,13 +114,13 @@ struct fsl_hifi4 {
* -----------------------------------------------------------------------
* | scratch buffer for malloc | 0xffffff | For MEM_scratch_malloc()
* ------------------------------------------------------------------------
- * | global structure | 4096 | For store hifi config structure
+ * | global structure | 4096 | For store dsp config structure
* ------------------------------------------------------------------------
*/
#define MEMORY_REMAP_OFFSET 0x39000000
-/* reserved memory for hifi4 firmware and core libs to
+/* reserved memory for dsp firmware and core libs to
* save their instruction/data section in SDRAM, the physical
* address range is 0x8e000000 ~ 0x8fffffff (32M bytes).
*/
@@ -134,6 +134,6 @@ struct fsl_hifi4 {
#define SC_C_OFS_PERIPH 41
#define SC_C_OFS_IRQ 42
-void *memcpy_hifi(void *dest, const void *src, size_t count);
-void *memset_hifi(void *dest, int c, size_t count);
-struct xf_client *xf_client_lookup(struct fsl_hifi4 *hifi4_priv, u32 id);
+void *memcpy_dsp(void *dest, const void *src, size_t count);
+void *memset_dsp(void *dest, int c, size_t count);
+struct xf_client *xf_client_lookup(struct fsl_dsp *dsp_priv, u32 id);
diff --git a/sound/soc/fsl/fsl_hifi4_proxy.c b/sound/soc/fsl/fsl_dsp_proxy.c
index 27aece79580a..77dc7c2cbdb4 100644
--- a/sound/soc/fsl/fsl_hifi4_proxy.c
+++ b/sound/soc/fsl/fsl_dsp_proxy.c
@@ -9,7 +9,7 @@
*
******************************************************************************/
/*******************************************************************************
- * fsl_hifi4_proxy.c
+ * fsl_dsp_proxy.c
*
* DSP proxy driver
*
@@ -18,8 +18,8 @@
******************************************************************************/
#include <soc/imx8/sc/ipc.h>
-#include "fsl_hifi4_proxy.h"
-#include "fsl_hifi4.h"
+#include "fsl_dsp_proxy.h"
+#include "fsl_dsp.h"
/* ...initialize message queue */
@@ -154,41 +154,41 @@ struct xf_message *xf_msg_received(struct xf_proxy *proxy,
*/
u32 icm_intr_send(struct xf_proxy *proxy, u32 msg)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
- MU_SendMessage(hifi4_priv->mu_base_virtaddr, 0, msg);
+ MU_SendMessage(dsp_priv->mu_base_virtaddr, 0, msg);
return 0;
}
int icm_intr_extended_send(struct xf_proxy *proxy,
u32 msg,
- struct hifi4_ext_msg *ext_msg)
+ struct dsp_ext_msg *ext_msg)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
+ struct device *dev = dsp_priv->dev;
union icm_header_t msghdr;
msghdr.allbits = msg;
if (msghdr.size != 8)
dev_err(dev, "too much ext msg\n");
- MU_SendMessage(hifi4_priv->mu_base_virtaddr, 1, ext_msg->phys);
- MU_SendMessage(hifi4_priv->mu_base_virtaddr, 2, ext_msg->size);
- MU_SendMessage(hifi4_priv->mu_base_virtaddr, 0, msg);
+ MU_SendMessage(dsp_priv->mu_base_virtaddr, 1, ext_msg->phys);
+ MU_SendMessage(dsp_priv->mu_base_virtaddr, 2, ext_msg->size);
+ MU_SendMessage(dsp_priv->mu_base_virtaddr, 0, msg);
return 0;
}
int send_dpu_ext_msg_addr(struct xf_proxy *proxy)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
union icm_header_t msghdr;
- struct hifi4_ext_msg ext_msg;
- struct hifi4_mem_msg *dpu_ext_msg =
- (struct hifi4_mem_msg *)((unsigned char *)hifi4_priv->msg_buf_virt
+ struct dsp_ext_msg ext_msg;
+ struct dsp_mem_msg *dpu_ext_msg =
+ (struct dsp_mem_msg *)((unsigned char *)dsp_priv->msg_buf_virt
+ (MSG_BUF_SIZE / 2));
int ret_val = 0;
@@ -197,15 +197,15 @@ int send_dpu_ext_msg_addr(struct xf_proxy *proxy)
msghdr.intr = 1;
msghdr.msg = ICM_CORE_INIT;
msghdr.size = 8;
- ext_msg.phys = hifi4_priv->msg_buf_phys + (MSG_BUF_SIZE / 2);
- ext_msg.size = sizeof(struct hifi4_mem_msg);
+ ext_msg.phys = dsp_priv->msg_buf_phys + (MSG_BUF_SIZE / 2);
+ ext_msg.size = sizeof(struct dsp_mem_msg);
- dpu_ext_msg->ext_msg_phys = hifi4_priv->msg_buf_phys;
+ dpu_ext_msg->ext_msg_phys = dsp_priv->msg_buf_phys;
dpu_ext_msg->ext_msg_size = MSG_BUF_SIZE;
- dpu_ext_msg->scratch_phys = hifi4_priv->scratch_buf_phys;
- dpu_ext_msg->scratch_size = hifi4_priv->scratch_buf_size;
- dpu_ext_msg->hifi_config_phys = hifi4_priv->hifi_config_phys;
- dpu_ext_msg->hifi_config_size = hifi4_priv->hifi_config_size;
+ dpu_ext_msg->scratch_phys = dsp_priv->scratch_buf_phys;
+ dpu_ext_msg->scratch_size = dsp_priv->scratch_buf_size;
+ dpu_ext_msg->dsp_config_phys = dsp_priv->dsp_config_phys;
+ dpu_ext_msg->dsp_config_size = dsp_priv->dsp_config_size;
icm_intr_extended_send(proxy, msghdr.allbits, &ext_msg);
@@ -214,9 +214,9 @@ int send_dpu_ext_msg_addr(struct xf_proxy *proxy)
long icm_ack_wait(struct xf_proxy *proxy, u32 msg)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
+ struct device *dev = dsp_priv->dev;
union icm_header_t msghdr;
int err;
@@ -234,16 +234,16 @@ long icm_ack_wait(struct xf_proxy *proxy, u32 msg)
return 0;
}
-irqreturn_t fsl_hifi4_mu_isr(int irq, void *dev_id)
+irqreturn_t fsl_dsp_mu_isr(int irq, void *dev_id)
{
struct xf_proxy *proxy = dev_id;
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
- struct device *dev = hifi4_priv->dev;
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
+ struct device *dev = dsp_priv->dev;
union icm_header_t msghdr;
u32 reg;
- MU_ReceiveMsg(hifi4_priv->mu_base_virtaddr, 0, &reg);
+ MU_ReceiveMsg(dsp_priv->mu_base_virtaddr, 0, &reg);
msghdr = (union icm_header_t)reg;
if (msghdr.intr == 1) {
@@ -287,14 +287,14 @@ irqreturn_t fsl_hifi4_mu_isr(int irq, void *dev_id)
/* ...shared memory translation - kernel virtual address to shared address */
u32 xf_proxy_b2a(struct xf_proxy *proxy, void *b)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
if (b == NULL)
return XF_PROXY_NULL;
- else if ((u32)(b - hifi4_priv->scratch_buf_virt) <
+ else if ((u32)(b - dsp_priv->scratch_buf_virt) <
SDRAM_SCRATCH_BUF_SIZE)
- return (u32)(b - hifi4_priv->scratch_buf_virt);
+ return (u32)(b - dsp_priv->scratch_buf_virt);
else
return XF_PROXY_BADADDR;
}
@@ -302,11 +302,11 @@ u32 xf_proxy_b2a(struct xf_proxy *proxy, void *b)
/* ...shared memory translation - shared address to kernel virtual address */
void *xf_proxy_a2b(struct xf_proxy *proxy, u32 address)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
if (address < SDRAM_SCRATCH_BUF_SIZE)
- return hifi4_priv->scratch_buf_virt + address;
+ return dsp_priv->scratch_buf_virt + address;
else if (address == XF_PROXY_NULL)
return NULL;
else
@@ -316,8 +316,8 @@ void *xf_proxy_a2b(struct xf_proxy *proxy, u32 address)
/* ...process association between response received and intended client */
static void xf_cmap(struct xf_proxy *proxy, struct xf_message *m)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
u32 id = XF_AP_IPC_CLIENT(m->id);
struct xf_client *client;
@@ -330,7 +330,7 @@ static void xf_cmap(struct xf_proxy *proxy, struct xf_message *m)
}
/* ...make sure the client ID is sane */
- client = xf_client_lookup(hifi4_priv, id);
+ client = xf_client_lookup(dsp_priv, id);
if (!client) {
pr_err("rsp[id:%08x]: client lookup failed", m->id);
xf_msg_free(proxy, m);
@@ -471,8 +471,8 @@ void xf_proxy_process(struct work_struct *w)
/* ...initialize shared memory interface */
int xf_proxy_init(struct xf_proxy *proxy)
{
- struct fsl_hifi4 *hifi4_priv = container_of(proxy,
- struct fsl_hifi4, proxy);
+ struct fsl_dsp *dsp_priv = container_of(proxy,
+ struct fsl_dsp, proxy);
struct xf_message *m;
int i;
@@ -501,7 +501,7 @@ int xf_proxy_init(struct xf_proxy *proxy)
INIT_WORK(&proxy->work, xf_proxy_process);
/* ...set pointer to shared memory */
- proxy->ipc.shmem = (struct xf_shmem_data *)hifi4_priv->msg_buf_virt;
+ proxy->ipc.shmem = (struct xf_shmem_data *)dsp_priv->msg_buf_virt;
/* ...initialize shared memory interface */
XF_PROXY_WRITE(proxy, cmd_read_idx, 0);
diff --git a/sound/soc/fsl/fsl_hifi4_proxy.h b/sound/soc/fsl/fsl_dsp_proxy.h
index 03d2b55c4749..4c3ec9b17e37 100644
--- a/sound/soc/fsl/fsl_hifi4_proxy.h
+++ b/sound/soc/fsl/fsl_dsp_proxy.h
@@ -9,13 +9,13 @@
*
************************************************************/
/************************************************************
- * fsl_hifi4_proxy.h
+ * fsl_dsp_proxy.h
*
* Proxy commmand/response messages
************************************************************/
-#ifndef __FSL_HIFI4_PROXY_H
-#define __FSL_HIFI4_PROXY_H
+#ifndef __FSL_DSP_PROXY_H
+#define __FSL_DSP_PROXY_H
#include <linux/wait.h>
#include <linux/device.h>
@@ -329,18 +329,18 @@ union icm_header_t {
u32 allbits;
};
-struct hifi4_ext_msg {
+struct dsp_ext_msg {
u32 phys;
u32 size;
};
-struct hifi4_mem_msg {
+struct dsp_mem_msg {
u32 ext_msg_phys;
u32 ext_msg_size;
u32 scratch_phys;
u32 scratch_size;
- u32 hifi_config_phys;
- u32 hifi_config_size;
+ u32 dsp_config_phys;
+ u32 dsp_config_size;
};
static inline void xf_lock_init(spinlock_t *lock)
@@ -375,7 +375,7 @@ struct xf_message *xf_cmd_recv(struct xf_proxy *proxy,
int wait);
/* ...mu interrupt handle */
-irqreturn_t fsl_hifi4_mu_isr(int irq, void *dev_id);
+irqreturn_t fsl_dsp_mu_isr(int irq, void *dev_id);
/* ...initialize client pending message queue */
void xf_msg_queue_init(struct xf_msg_queue *queue);