From: Lokesh Vutla Date: Fri, 20 Dec 2019 11:16:38 +0530 Subject: [PATCH v1] Revert "core: device: use dev_power_domain_on" In-Reply-To: <20191217121431.28819-1-igor.opaniuk@gmail.com> References: <20191217121431.28819-1-igor.opaniuk@gmail.com> Message-ID: <6eb6eda4-e433-d523-56b6-b31fb2b63c6c@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 17/12/19 5:44 PM, Igor Opaniuk wrote: > From: Igor Opaniuk > > This reverts commit f0cc4eae9a1702a768817ea25d9f23cece69d021 > > This was previously reported that f0cc4eae9a ("core: device: > use dev_power_domain_on") breaks initial boot on Colibri iMX8X and > IMX8 QM ROM 7720a1 board. Revert it until the problem is properly fixed. > > Signed-off-by: Igor Opaniuk NAK. This breaks other drivers with multiple power domains that rely on core framework to enable. > --- > > drivers/core/device.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/core/device.c b/drivers/core/device.c > index 4e037083a6..c5b232c259 100644 > --- a/drivers/core/device.c > +++ b/drivers/core/device.c > @@ -313,6 +313,7 @@ static void *alloc_priv(int size, uint flags) > > int device_probe(struct udevice *dev) > { > + struct power_domain pd; > const struct driver *drv; > int size = 0; > int ret; > @@ -396,9 +397,8 @@ int device_probe(struct udevice *dev) > if (CONFIG_IS_ENABLED(POWER_DOMAIN) && dev->parent && > (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; Can you check by not returning on failure here? If yes then check the power-domain/driver that is failing. If any driver doesn't expect core to enable power-domain then enable DM_FLAG_DEFAULT_PD_CTRL_OFF in the respective driver. Thanks and regards, Lokesh > + if (!power_domain_get(dev, &pd)) > + power_domain_on(&pd); > } > > ret = uclass_pre_probe_device(dev); >