]> git.sur5r.net Git - u-boot/blobdiff - include/dm/device.h
dm: core: Convert driver_bind() to use const
[u-boot] / include / dm / device.h
index 7a48eb88b8ccf1ce1b52d8ffb898d8b2610c4e56..fafecceb1ab1137cabe99f0af5fafd050b119bf4 100644 (file)
@@ -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
  *