u-boot/include/dm
Janne Grunau dabaa4ae32 dm: Add dm_remove_devices_active() for ordered device removal
This replaces dm_remove_devices_flags() calls in all boot
implementations to ensure non vital devices are consistently removed
first. All boot implementation except arch/arm/lib/bootm.c currently
just call dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL). This can result
in crashes when dependencies between devices exists. The driver model's
design document describes DM_FLAG_VITAL as "indicates that the device is
'vital' to the operation of other devices". Device removal at boot
should follow this.

Instead of adding dm_remove_devices_flags() with (DM_REMOVE_ACTIVE_ALL |
DM_REMOVE_NON_VITAL) everywhere add dm_remove_devices_active() which
does this.

Fixes a NULL pointer deref in the apple dart IOMMU driver during EFI
boot. The xhci-pci (driver which depends on the IOMMU to work) removes
its mapping on removal. This explodes when the IOMMU device was removed
first.

dm_remove_devices_flags() is kept since it is used for testing of
device_remove() calls in dm.

Signed-off-by: Janne Grunau <j@jannau.net>
2024-11-24 15:41:28 -06:00
..
platform_data Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi 2023-07-13 20:39:10 -04:00
acpi.h acpi: Add fill_madt to acpi_ops 2024-10-27 17:24:13 -06:00
device-internal.h dm: core: Add note about device_probe idempotence 2022-10-29 07:36:33 -06:00
device.h dm: core: Tweak device_is_on_pci_bus() for code size 2023-10-06 14:38:13 -04:00
device_compat.h common: Drop linux/printk.h from common header 2023-09-24 09:54:57 -04:00
devres.h dm: use newly added linux/compat alloc functions 2024-06-07 16:20:25 -06:00
fdtaddr.h core: introduce dev_read_addr_name[_size]_ptr() functions 2023-10-13 10:15:41 -07:00
lists.h dm: core: Document return value of device bind functions 2022-10-29 07:36:33 -06:00
of.h Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
of_access.h dm: core: Add a way to delete a node 2023-10-06 14:38:13 -04:00
of_addr.h include: dm: Remove duplicate newlines 2024-07-29 15:01:04 -06:00
of_extra.h doc: add include/dm/of*.h to the HTML documentation 2022-01-15 10:57:21 +01:00
ofnode.h dm: core: implement ofnode_options helpers 2024-10-10 16:02:20 -06:00
ofnode_decl.h dm: core: Add definitions for multiple ofnode trees 2022-09-29 22:43:43 -04:00
pci.h doc: replace @return by Return: 2022-01-19 18:11:34 +01:00
pinctrl.h headers: don't depend on errno.h being available 2024-01-24 11:12:11 -05:00
platdata.h doc: add include/dm/platdata.h to the HTML documentation 2022-01-15 10:57:21 +01:00
read.h core: introduce dev_read_addr_name[_size]_ptr() functions 2023-10-13 10:15:41 -07:00
root.h dm: Add dm_remove_devices_active() for ordered device removal 2024-11-24 15:41:28 -06:00
simple_bus.h dm: core: Correctly read <ranges> of simple-bus 2021-04-15 14:22:17 +05:30
tag.h dm: core: Add a command to show driver model statistics 2022-06-28 03:09:52 +01:00
test.h test: Rename UTF_CONSOLE_REC to UTF_CONSOLE 2024-08-26 18:51:49 -06:00
uclass-id.h usb: tcpm: add core framework 2024-10-17 03:12:47 +02:00
uclass-internal.h dm: core: Allow finding a uclass device by partial name 2022-04-25 10:00:03 -04:00
uclass.h dm: core: Add a function to see if a device exists 2024-11-03 21:27:12 -06:00
util.h dm: use list_count_nodes() for counting list nodes 2024-07-31 09:54:53 +02:00