mmc: fsl_esdhc: workaround for hardware 3.3v IO reliability issue
[oweals/u-boot.git] / drivers / core / device-remove.c
index 8736fd9821e74515ff7a1ef9255e97c97e18a7ed..efdb0f29058f641837d936389563ceb47543d980 100644 (file)
@@ -198,7 +198,8 @@ int device_remove(struct udevice *dev, uint flags)
                }
        }
 
-       if (!(drv->flags &
+       if (!(flags & DM_REMOVE_NO_PD) &&
+           !(drv->flags &
              (DM_FLAG_DEFAULT_PD_CTRL_OFF | DM_FLAG_REMOVE_WITH_PD_ON)) &&
            dev != gd->cur_serial_dev)
                dev_power_domain_off(dev);