[RFC PATCH v4 0/8] RFC: dm: core: Add support for vital devices

Simon Glass sjg at chromium.org
Fri Jan 8 06:16:28 CET 2021


This is an attempt to come up with a 'late removal' feature, as
implemented by Marek, but using different terminology and trying to fit in
with the existing removal flags.

Missing from this is a call to dm_remove_devices_flags() with the
DM_REMOVE_NON_VITAL flag, except for the call in dm_init(). It could
perhaps be placed in bootm.

I have taken the opportunity to clean up a few related things.

The series is available at u-boot-dm/late-working

The previous patch was here:

   http://patchwork.ozlabs.org/project/uboot/patch/20201108140818.55172-1-marek.vasut+renesas@gmail.com/

Changes in v4:
- Use 'vital' rather than 'late' as the description
- Invert the removal flag to DM_REMOVE_NON_VITAL, to avoid the need for
        two-pass processing in the bowels of driver model
- Simplify the test to only test 'vital'
- Drop the change to uclass_destroy()
- Revised and updated based on discussion

Marek Vasut (1):
  dm: core: Add late driver remove option

Simon Glass (7):
  smem: Don't use -EPROBE_DEFER
  nand: brcmnand: Don't use -EPROBE_DEFER
  dm: Rename DM_FLAG_REMOVE_WITH_PD_ON
  dm: pci: Correct use of wrong flag name
  dm: core: Remove children before advising uclass
  dm: core: Avoid partially removing devices
  dm: core: Add documentation about device removal

 doc/driver-model/design.rst              | 20 ++++++
 drivers/core/device-remove.c             | 83 +++++++++++++++---------
 drivers/core/root.c                      |  2 +
 drivers/mtd/nand/raw/brcmnand/brcmnand.c |  5 +-
 drivers/pci/pcie_iproc.c                 |  2 +-
 drivers/smem/msm_smem.c                  |  6 +-
 drivers/video/meson/meson_vpu.c          |  2 +-
 drivers/watchdog/rti_wdt.c               |  2 +-
 include/dm/device-internal.h             | 15 ++++-
 include/dm/device.h                      | 15 ++++-
 test/dm/core.c                           | 47 ++++++++++++++
 test/dm/test-driver.c                    | 11 ++++
 test/dm/virtio.c                         |  4 +-
 13 files changed, 169 insertions(+), 45 deletions(-)

-- 
2.30.0.284.gd98b1dd5eaa7-goog



More information about the U-Boot mailing list