X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fdm%2Froot.h;h=058eb9892314ebf3275997d16221e25d3e55b4c1;hb=0d00f9b6c136634e673a7412d99df68aaa6c9a6a;hp=c7f0c1d5ca302acd8bd89887b5bc8c53119af4dd;hpb=b1cdd8baa14f518288ceddb391d6587c1ecb3174;p=u-boot diff --git a/include/dm/root.h b/include/dm/root.h index c7f0c1d5ca..058eb98923 100644 --- a/include/dm/root.h +++ b/include/dm/root.h @@ -21,6 +21,16 @@ struct udevice; */ struct udevice *dm_root(void); +struct global_data; +/** + * dm_fixup_for_gd_move() - Handle global_data moving to a new place + * + * The uclass list is part of global_data. Due to the way lists work, moving + * the list will cause it to become invalid. This function fixes that up so + * that the uclass list will work correctly. + */ +void dm_fixup_for_gd_move(struct global_data *new_gd); + /** * dm_scan_platdata() - Scan all platform data and bind drivers * @@ -105,4 +115,20 @@ int dm_init(void); */ int dm_uninit(void); +#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE) +/** + * dm_remove_devices_flags - Call remove function of all drivers with + * specific removal flags set to selectively + * remove drivers + * + * All devices with the matching flags set will be removed + * + * @flags: Flags for selective device removal + * @return 0 if OK, -ve on error + */ +int dm_remove_devices_flags(uint flags); +#else +static inline int dm_remove_devices_flags(uint flags) { return 0; } +#endif + #endif