summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2020-02-17 12:36:43 +0100
committerSimon Glass <sjg@chromium.org>2020-03-02 19:47:38 -0700
commit5349e255ff913971d8b812eb363da62eace169bc (patch)
tree3b4a909fff3b367bdea965a2a9bf5198cbd8091b /drivers/core
parent8aad16916d04e3db0d1652cb96e840e209e19252 (diff)
downloadu-boot-5349e255ff913971d8b812eb363da62eace169bc.tar.gz
dm: core: Add a flag for power domain control on device removal
In various cases a power domain must stay enabled after device removal when booting OS (i.e. serial debug console or display). Add a flag to selectively skip switching off a power domain. Fixes: 52edfed65de9 ("dm: core: device: switch off power domain after device removal") Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Guillaume La Roque <glaroque@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/device-remove.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 444e34b492..ff5b28cb6a 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -194,8 +194,9 @@ int device_remove(struct udevice *dev, uint flags)
}
}
- if (!(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF) &&
- (dev != gd->cur_serial_dev))
+ if (!(drv->flags &
+ (DM_FLAG_DEFAULT_PD_CTRL_OFF | DM_FLAG_REMOVE_WITH_PD_ON)) &&
+ dev != gd->cur_serial_dev)
dev_power_domain_off(dev);
if (flags_remove(flags, drv->flags)) {