1
0
Fork 0

LF-202-4 firmware: imx: scu-pd: ignore power domain not owned

Should not register power domain that not owned by current
partition.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peng Fan 2019-11-27 17:28:15 +08:00
parent 5a5785a7c4
commit b32c7c3b6a
1 changed files with 4 additions and 0 deletions

View File

@ -46,6 +46,7 @@
#include <dt-bindings/firmware/imx/rsrc.h>
#include <linux/firmware/imx/sci.h>
#include <linux/firmware/imx/svc/rm.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
@ -248,6 +249,9 @@ imx_scu_add_pm_domain(struct device *dev, int idx,
struct imx_sc_pm_domain *sc_pd;
int ret;
if (!imx_sc_rm_is_resource_owned(pm_ipc_handle, pd_ranges->rsrc + idx))
return NULL;
sc_pd = devm_kzalloc(dev, sizeof(*sc_pd), GFP_KERNEL);
if (!sc_pd)
return ERR_PTR(-ENOMEM);