MLK-23754-12 remoteproc: imx_proc: add ipc-only support
ipc-only is different from early-booted. You could still stop/start the early-booted remote processors, but you could not stop/start the remote processor that only support IPC. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
a2fac0fbd3
commit
c99efe4d56
|
@ -91,6 +91,7 @@ struct imx_rproc {
|
|||
const struct imx_rproc_dcfg *dcfg;
|
||||
struct imx_rproc_mem mem[IMX7D_RPROC_MEM_MAX];
|
||||
struct clk *clk;
|
||||
bool ipc_only;
|
||||
bool early_boot;
|
||||
void *rsc_va;
|
||||
};
|
||||
|
@ -171,6 +172,11 @@ static int imx_rproc_start(struct rproc *rproc)
|
|||
int ret;
|
||||
u32 val;
|
||||
|
||||
if (priv->ipc_only) {
|
||||
dev_info(dev, "%s: IPC only\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (priv->enable) {
|
||||
if (!reset_control_status(priv->enable)) {
|
||||
dev_info(dev, "alreay started\n");
|
||||
|
@ -207,6 +213,11 @@ static int imx_rproc_stop(struct rproc *rproc)
|
|||
struct device *dev = priv->dev;
|
||||
int ret;
|
||||
|
||||
if (priv->ipc_only) {
|
||||
dev_info(dev, "%s: IPC only\n", __func__);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (priv->enable) {
|
||||
ret = reset_control_assert(priv->enable);
|
||||
if (!ret)
|
||||
|
@ -523,7 +534,11 @@ static int imx_rproc_configure_mode(struct imx_rproc *priv)
|
|||
int ret;
|
||||
u32 val;
|
||||
|
||||
if (of_get_property(dev->of_node, "early-booted", NULL)) {
|
||||
if (of_get_property(dev->of_node, "ipc-only", NULL)) {
|
||||
priv->ipc_only = true;
|
||||
priv->early_boot = true;
|
||||
priv->rproc->skip_fw_load_recovery = true;
|
||||
} else if (of_get_property(dev->of_node, "early-booted", NULL)) {
|
||||
priv->early_boot = true;
|
||||
} else {
|
||||
ret = regmap_read(priv->regmap, dcfg->src_reg, &val);
|
||||
|
|
Loading…
Reference in New Issue