X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fdm%2Fdevice-internal.h;h=7005d03d08f5d96adcd3f28c2a11f7f9e318ec44;hb=e59f458de6999b8a786da857e653db6777f675ca;hp=ea3df36632d80fc907412e4d5c71771006206d53;hpb=90b51c33f362926e17d4c07dcef1ce822abaa89f;p=oweals%2Fu-boot.git diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index ea3df36632..7005d03d08 100644 --- a/include/dm/device-internal.h +++ b/include/dm/device-internal.h @@ -45,12 +45,14 @@ int device_bind(struct udevice *parent, struct driver *drv, * tree. * * @parent: Pointer to device's parent + * @pre_reloc_only: If true, bind the driver only if its DM_INIT_F flag is set. + * If false bind the driver always. * @info: Name and platdata for this device * @devp: Returns a pointer to the bound device * @return 0 if OK, -ve on error */ -int device_bind_by_name(struct udevice *parent, const struct driver_info *info, - struct udevice **devp); +int device_bind_by_name(struct udevice *parent, bool pre_reloc_only, + const struct driver_info *info, struct udevice **devp); /** * device_probe() - Probe a device, activating it @@ -84,4 +86,8 @@ int device_remove(struct udevice *dev); */ int device_unbind(struct udevice *dev); +/* Cast away any volatile pointer */ +#define DM_ROOT_NON_CONST (((gd_t *)gd)->dm_root) +#define DM_UCLASS_ROOT_NON_CONST (((gd_t *)gd)->uclass_root) + #endif