summaryrefslogtreecommitdiff
path: root/include/dm/device.h
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2014-07-16 08:51:30 +0200
committerStefano Babic <sbabic@denx.de>2014-07-16 08:51:30 +0200
commitdab5e3469d294a4e1ffed8407d296a78e02cc01f (patch)
treec6378034591210b3142ca3add806d52c6ea22b3b /include/dm/device.h
parent14a1613140519a8d0a88e6054c302a8cb3e067a5 (diff)
parent524123a70761110c5cf3ccc5f52f6d4da071b959 (diff)
downloadu-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.zip
u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.tar.gz
u-boot-imx-dab5e3469d294a4e1ffed8407d296a78e02cc01f.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de> Conflicts: boards.cfg
Diffstat (limited to 'include/dm/device.h')
-rw-r--r--include/dm/device.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/dm/device.h b/include/dm/device.h
index 4cd38ed..ae75a3f 100644
--- a/include/dm/device.h
+++ b/include/dm/device.h
@@ -21,10 +21,10 @@ struct driver_info;
#define DM_FLAG_ACTIVATED (1 << 0)
/* DM is responsible for allocating and freeing platdata */
-#define DM_FLAG_ALLOC_PDATA (2 << 0)
+#define DM_FLAG_ALLOC_PDATA (1 << 1)
/**
- * struct device - An instance of a driver
+ * struct udevice - An instance of a driver
*
* This holds information about a device, which is a driver bound to a
* particular port or peripheral (essentially a driver instance).
@@ -53,12 +53,12 @@ struct driver_info;
* @sibling_node: Next device in list of all devices
* @flags: Flags for this device DM_FLAG_...
*/
-struct device {
+struct udevice {
struct driver *driver;
const char *name;
void *platdata;
int of_offset;
- struct device *parent;
+ struct udevice *parent;
void *priv;
struct uclass *uclass;
void *uclass_priv;
@@ -75,11 +75,11 @@ struct device {
#define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED)
/**
- * struct device_id - Lists the compatible strings supported by a driver
+ * struct udevice_id - Lists the compatible strings supported by a driver
* @compatible: Compatible string
* @data: Data for this compatible string
*/
-struct device_id {
+struct udevice_id {
const char *compatible;
ulong data;
};
@@ -121,12 +121,12 @@ struct device_id {
struct driver {
char *name;
enum uclass_id id;
- const struct device_id *of_match;
- int (*bind)(struct device *dev);
- int (*probe)(struct device *dev);
- int (*remove)(struct device *dev);
- int (*unbind)(struct device *dev);
- int (*ofdata_to_platdata)(struct device *dev);
+ const struct udevice_id *of_match;
+ int (*bind)(struct udevice *dev);
+ int (*probe)(struct udevice *dev);
+ int (*remove)(struct udevice *dev);
+ int (*unbind)(struct udevice *dev);
+ int (*ofdata_to_platdata)(struct udevice *dev);
int priv_auto_alloc_size;
int platdata_auto_alloc_size;
const void *ops; /* driver-specific operations */
@@ -144,7 +144,7 @@ struct driver {
* @dev Device to check
* @return platform data, or NULL if none
*/
-void *dev_get_platdata(struct device *dev);
+void *dev_get_platdata(struct udevice *dev);
/**
* dev_get_priv() - Get the private data for a device
@@ -154,6 +154,6 @@ void *dev_get_platdata(struct device *dev);
* @dev Device to check
* @return private data, or NULL if none
*/
-void *dev_get_priv(struct device *dev);
+void *dev_get_priv(struct udevice *dev);
#endif