From af94ad418dc72957d3b7398d83bfc5a1efd415db Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Fri, 27 Sep 2019 13:48:12 +0530 Subject: dm: core: Allow for not controlling the power-domain by DM framework In some remoteproc cases, enabling the power domain of the core will start running the core. In such cases image should be loaded before enabling the power domain. But the current DM framework enables the power-domain by default during probe. This is causing the remotecore to start and crash as there is no valid image loaded. In order to avoid this introduce a DM flag that doesn't allow for enabling/disabling the power-domain by DM framework. Signed-off-by: Lokesh Vutla Reviewed-by: Simon Glass --- drivers/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/core/device.c b/drivers/core/device.c index 28363ff00ba..95f26efdd3b 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -393,7 +393,8 @@ int device_probe(struct udevice *dev) pinctrl_select_state(dev, "default"); if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent && - device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) { + (device_get_uclass_id(dev) != UCLASS_POWER_DOMAIN) && + !(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF)) { ret = dev_power_domain_on(dev); if (ret) goto fail; -- cgit v1.2.3