[U-Boot] [PATCH 2/4 v4] dm: core: Add dm_remove_devices_flags() and hook it into device_remove()

Simon Glass sjg at chromium.org
Wed Apr 5 03:27:53 UTC 2017


On 27 March 2017 at 02:58, Stefan Roese <sr at denx.de> wrote:
> The new function dm_remove_devices_flags() is intented for driver specific
> last-stage cleanup operations before the OS is started. This patch adds
> this functionality and hooks it into the common device_remove()
> function.
>
> Drivers wanting to use this feature for some last-stage removal calls,
> need to add one of the DM_REMOVE_xx flags to their driver .flags.
>
> Signed-off-by: Stefan Roese <sr at denx.de>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> ---
> v4:
> - Make comparison of flags more explicit by masking the driver flags
>   with the drivers "remove flags" before masking them with the
>   device_remove() removal flags parameter
>
> v3:
> - Add conditional compilation to fix compilation breakage on platforms
>   without DM and DM_DEVICE_REMOVE support. With this change, Travis
>   compiles all targets without any error
>
> v2:
> - Added Simons Reviewed-by
>
> drivers/core/device-remove.c | 17 +++++++++++++----
>  drivers/core/root.c          |  9 +++++++++
>  include/dm/root.h            | 16 ++++++++++++++++
>  3 files changed, 38 insertions(+), 4 deletions(-)
>

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list