X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fdm%2Fdevice.h;h=fafecceb1ab1137cabe99f0af5fafd050b119bf4;hb=3479253dad2ac9d1c71f4843aae52ea7cd0c7716;hp=7a48eb88b8ccf1ce1b52d8ffb898d8b2610c4e56;hpb=c9cac3f8413c1f67d1e1b7a1770e584584107cd2;p=u-boot diff --git a/include/dm/device.h b/include/dm/device.h index 7a48eb88b8..fafecceb1a 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -30,6 +30,9 @@ struct driver_info; /* DM is responsible for allocating and freeing parent_platdata */ #define DM_FLAG_ALLOC_PARENT_PDATA (1 << 3) +/* Allocate driver private data on a DMA boundary */ +#define DM_FLAG_ALLOC_PRIV_DMA (1 << 4) + /** * struct udevice - An instance of a driver * @@ -67,7 +70,7 @@ struct driver_info; * when the device is probed and will be unique within the device's uclass. */ struct udevice { - struct driver *driver; + const struct driver *driver; const char *name; void *platdata; void *parent_platdata; @@ -237,6 +240,16 @@ void *dev_get_priv(struct udevice *dev); */ struct udevice *dev_get_parent(struct udevice *child); +/** + * dev_get_uclass_priv() - Get the private uclass data for a device + * + * This checks that dev is not NULL, but no other checks for now + * + * @dev Device to check + * @return private uclass data for this device, or NULL if none + */ +void *dev_get_uclass_priv(struct udevice *dev); + /** * dev_get_of_data() - get the device tree data used to bind a device *