summaryrefslogtreecommitdiff
path: root/drivers/core/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/device.c')
-rw-r--r--drivers/core/device.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 4873c47d10b..d917d4e82da 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -518,6 +518,14 @@ int device_probe(struct udevice *dev)
dev_or_flags(dev, DM_FLAG_ACTIVATED);
+ 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;
+ }
+
/*
* Process pinctrl for everything except the root device, and
* continue regardless of the result of pinctrl. Don't process pinctrl
@@ -540,14 +548,6 @@ int device_probe(struct udevice *dev)
dev->name, ret, errno_str(ret));
}
- 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;
- }
-
if (CONFIG_IS_ENABLED(IOMMU) && dev->parent &&
(device_get_uclass_id(dev) != UCLASS_IOMMU)) {
ret = dev_iommu_enable(dev);