summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-03-03 21:48:49 -0500
committerTom Rini <trini@konsulko.com>2020-03-03 21:48:49 -0500
commit1efb9796f80e1394f080be1b4f3173ff108ad1f2 (patch)
tree178d15612a53330d74f2be235df2e0252562edd3
parent8aad16916d04e3db0d1652cb96e840e209e19252 (diff)
parent9aa886cc0b4424b49b24486f804fd18aafad00b2 (diff)
downloadu-boot-1efb9796f80e1394f080be1b4f3173ff108ad1f2.tar.gz
u-boot-1efb9796f80e1394f080be1b4f3173ff108ad1f2.tar.xz
u-boot-1efb9796f80e1394f080be1b4f3173ff108ad1f2.zip
Merge tag 'dm-pull-3mar20' of git://git.denx.de/u-boot-dm
Fixes for power domain on device removal
-rw-r--r--drivers/core/device-remove.c5
-rw-r--r--drivers/video/meson/meson_vpu.c2
-rw-r--r--include/dm/device.h6
3 files changed, 10 insertions, 3 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)) {
diff --git a/drivers/video/meson/meson_vpu.c b/drivers/video/meson/meson_vpu.c
index 4eb66398d0..aa8c0a962f 100644
--- a/drivers/video/meson/meson_vpu.c
+++ b/drivers/video/meson/meson_vpu.c
@@ -210,5 +210,5 @@ U_BOOT_DRIVER(meson_vpu) = {
.probe = meson_vpu_probe,
.bind = meson_vpu_bind,
.priv_auto_alloc_size = sizeof(struct meson_vpu_priv),
- .flags = DM_FLAG_PRE_RELOC,
+ .flags = DM_FLAG_PRE_RELOC | DM_FLAG_REMOVE_WITH_PD_ON,
};
diff --git a/include/dm/device.h b/include/dm/device.h
index ab806d0b7e..a56164b19b 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -68,6 +68,12 @@ struct driver_info;
#define DM_FLAG_PLATDATA_VALID (1 << 12)
/*
+ * Device is removed without switching off its power domain. This might
+ * be required, i. e. for serial console (debug) output when booting OS.
+ */
+#define DM_FLAG_REMOVE_WITH_PD_ON (1 << 13)
+
+/*
* One or multiple of these flags are passed to device_remove() so that
* a selective device removal as specified by the remove-stage and the
* driver flags can be done.