summaryrefslogtreecommitdiff
path: root/include/asm-generic
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-05-22 12:43:05 +0200
committerTom Rini <trini@ti.com>2014-05-27 10:21:32 -0400
commit54c5d08a09e631f88738db54c75395c6457c2157 (patch)
tree989241d18408f19062618bc380ef5948154f2334 /include/asm-generic
parent9665fa8f9e1488209d5e01d0792c243e0a220c5a (diff)
downloadu-boot-imx-54c5d08a09e631f88738db54c75395c6457c2157.zip
u-boot-imx-54c5d08a09e631f88738db54c75395c6457c2157.tar.gz
u-boot-imx-54c5d08a09e631f88738db54c75395c6457c2157.tar.bz2
dm: rename device struct to udevice
using UBI and DM together leads in compiler error, as both define a "struct device", so rename "struct device" in include/dm/device.h to "struct udevice", as we use linux code (MTD/UBI/UBIFS some USB code,...) and cannot change the linux "struct device" Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/global_data.h2
-rw-r--r--include/asm-generic/gpio.h22
2 files changed, 12 insertions, 12 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index e98b661..2850ed8 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -65,7 +65,7 @@ typedef struct global_data {
struct global_data *new_gd; /* relocated global data */
#ifdef CONFIG_DM
- struct device *dm_root; /* Root instance for Driver Model */
+ struct udevice *dm_root;/* Root instance for Driver Model */
struct list_head uclass_root; /* Head of core tree */
#endif
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index e325df4..a6e52a0 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -86,7 +86,7 @@ enum {
GPIOF_UNKNOWN,
};
-struct device;
+struct udevice;
/**
* struct struct dm_gpio_ops - Driver model GPIO operations
@@ -116,15 +116,15 @@ struct device;
* all devices. Be careful not to confuse offset with gpio in the parameters.
*/
struct dm_gpio_ops {
- int (*request)(struct device *dev, unsigned offset, const char *label);
- int (*free)(struct device *dev, unsigned offset);
- int (*direction_input)(struct device *dev, unsigned offset);
- int (*direction_output)(struct device *dev, unsigned offset,
+ int (*request)(struct udevice *dev, unsigned offset, const char *label);
+ int (*free)(struct udevice *dev, unsigned offset);
+ int (*direction_input)(struct udevice *dev, unsigned offset);
+ int (*direction_output)(struct udevice *dev, unsigned offset,
int value);
- int (*get_value)(struct device *dev, unsigned offset);
- int (*set_value)(struct device *dev, unsigned offset, int value);
- int (*get_function)(struct device *dev, unsigned offset);
- int (*get_state)(struct device *dev, unsigned offset, char *state,
+ int (*get_value)(struct udevice *dev, unsigned offset);
+ int (*set_value)(struct udevice *dev, unsigned offset, int value);
+ int (*get_function)(struct udevice *dev, unsigned offset);
+ int (*get_state)(struct udevice *dev, unsigned offset, char *state,
int maxlen);
};
@@ -166,7 +166,7 @@ struct gpio_dev_priv {
* @offset_count: Returns number of GPIOs within this bank
* @return bank name of this device
*/
-const char *gpio_get_bank_info(struct device *dev, int *offset_count);
+const char *gpio_get_bank_info(struct udevice *dev, int *offset_count);
/**
* gpio_lookup_name - Look up a GPIO name and return its details
@@ -179,7 +179,7 @@ const char *gpio_get_bank_info(struct device *dev, int *offset_count);
* @offsetp: Returns the offset number within this device
* @gpiop: Returns the absolute GPIO number, numbered from 0
*/
-int gpio_lookup_name(const char *name, struct device **devp,
+int gpio_lookup_name(const char *name, struct udevice **devp,
unsigned int *offsetp, unsigned int *gpiop);
#endif /* _ASM_GENERIC_GPIO_H_ */