summaryrefslogtreecommitdiff
path: root/drivers/rpmsg
diff options
context:
space:
mode:
authorRichard Zhu <hongxing.zhu@nxp.com>2017-09-21 16:46:26 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:28:42 +0800
commite0d9251c1a36ed4eb14dfca90f50930dd3b3cfc4 (patch)
treea65d902d4cacc0a6fb86ffcce1fa54c85c9aa11d /drivers/rpmsg
parent242c96a8b1361c0748e2c314bf7961ac85996814 (diff)
MLK-16530-3 rpmsg: imx: init mu and limit the pingpong cycles
- Init mu power and clk. - Change the cycles of the pingpong demot refer to the limitation of M4 side. When the received data larger than 100, the pingpong of M4 side would be finished. BuildInfo: SCFW 9e9f6ec6, IMX-MKIMAGE 0, ATF 0 Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r--drivers/rpmsg/imx_rpmsg.c29
-rw-r--r--drivers/rpmsg/imx_rpmsg_pingpong.c2
2 files changed, 10 insertions, 21 deletions
diff --git a/drivers/rpmsg/imx_rpmsg.c b/drivers/rpmsg/imx_rpmsg.c
index 951d7029a333..3a63cf974e87 100644
--- a/drivers/rpmsg/imx_rpmsg.c
+++ b/drivers/rpmsg/imx_rpmsg.c
@@ -467,7 +467,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
return ret;
}
- if (variant == IMX7D) {
+ if (variant == IMX7D || variant == IMX8QXP) {
clk = of_clk_get(np_mu, 0);
if (IS_ERR(clk)) {
pr_err("mu clock source missing or invalid\n");
@@ -481,27 +481,16 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
}
INIT_DELAYED_WORK(&rpmsg_work, rpmsg_work_handler);
- if (variant == IMX8QXP) {
- /*
- * MU0_A0 of M4 side is used as RPMSG MU.
- * And it would be initialized by M4 before
- * A cores are booted up.
- */
- MU_Init(mu_base);
+ /*
+ * bit26 is used by rpmsg channels.
+ * bit0 of MX7ULP_MU_CR used to let m4 to know MU is ready now
+ */
+ MU_Init(mu_base);
+ if (variant == IMX7ULP) {
MU_EnableRxFullInt(mu_base, 1);
- pr_info("MU has been initalized by M4!\n");
+ MU_SetFn(mu_base, 1);
} else {
- /*
- * bit26 is used by rpmsg channels.
- * bit0 of MX7ULP_MU_CR used to let m4 to know MU is ready now
- */
- MU_Init(mu_base);
- if (variant == IMX7ULP) {
- MU_EnableRxFullInt(mu_base, 1);
- MU_SetFn(mu_base, 1);
- } else {
- MU_EnableRxFullInt(mu_base, 1);
- }
+ MU_EnableRxFullInt(mu_base, 1);
}
BLOCKING_INIT_NOTIFIER_HEAD(&(mu_rpmsg_box.notifier));
diff --git a/drivers/rpmsg/imx_rpmsg_pingpong.c b/drivers/rpmsg/imx_rpmsg_pingpong.c
index 341cd7eb8f53..aeaee17c8e7f 100644
--- a/drivers/rpmsg/imx_rpmsg_pingpong.c
+++ b/drivers/rpmsg/imx_rpmsg_pingpong.c
@@ -18,7 +18,7 @@
#include <linux/rpmsg.h>
#define MSG "hello world!"
-#define MSG_LIMIT 100000
+#define MSG_LIMIT 51
static unsigned int rpmsg_pingpong;
static int rx_count;