diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-16 14:01:34 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-11-16 14:01:34 +0100 |
commit | 856f60dbd157126241cf9033514137849bb5ca22 (patch) | |
tree | fca1784ef63b89a78127a0f4d1340f90eedd6848 /include | |
parent | ec78bea331e195fff267ae949cee4777ef1add56 (diff) | |
parent | f4ca20c4d27751ee749f382cfd4949d825534fce (diff) | |
download | barebox-856f60dbd157126241cf9033514137849bb5ca22.tar.gz barebox-856f60dbd157126241cf9033514137849bb5ca22.tar.xz |
Merge branch 'for-next/misc'
Conflicts:
commands/Makefile
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/driver.h | 15 | ||||
-rw-r--r-- | include/environment.h | 11 | ||||
-rw-r--r-- | include/param.h | 11 |
3 files changed, 25 insertions, 12 deletions
diff --git a/include/driver.h b/include/driver.h index 4918054887..f8d815c619 100644 --- a/include/driver.h +++ b/include/driver.h @@ -193,6 +193,21 @@ static inline const char *dev_name(const struct device_d *dev) } /* + * get resource base 'name' for a device + */ +struct resource *dev_get_resource_by_name(struct device_d *dev, + const char *name); +/* + * get register base 'name' for a device + */ +void *dev_get_mem_region_by_name(struct device_d *dev, const char *name); + +/* + * exlusively request register base 'name' for a device + */ +void __iomem *dev_request_mem_region_by_name(struct device_d *dev, + const char *name); +/* * get register base 'num' for a device */ void *dev_get_mem_region(struct device_d *dev, int num); diff --git a/include/environment.h b/include/environment.h index 95e75e7ec7..4184977009 100644 --- a/include/environment.h +++ b/include/environment.h @@ -26,14 +26,15 @@ * Managment of a environment variable */ struct variable_d { - struct variable_d *next; /**< List management */ - char data[0]; /**< variable length data */ + struct list_head list; + char *name; + char *data; }; struct env_context { - struct env_context *parent; /**< FIXME */ - struct variable_d *local; /**< FIXME */ - struct variable_d *global; /**< FIXME */ + struct env_context *parent; + struct list_head local; + struct list_head global; }; struct env_context *get_current_context(void); diff --git a/include/param.h b/include/param.h index a855102d15..21f4f7d832 100644 --- a/include/param.h +++ b/include/param.h @@ -30,6 +30,8 @@ int dev_add_param(struct device_d *dev, const char *name, int dev_add_param_fixed(struct device_d *dev, char *name, char *value); +void dev_remove_param(struct device_d *dev, char *name); + void dev_remove_parameters(struct device_d *dev); int dev_param_set_generic(struct device_d *dev, struct param_d *p, @@ -38,8 +40,6 @@ int dev_param_set_generic(struct device_d *dev, struct param_d *p, /* Convenience functions to handle a parameter as an ip address */ int dev_set_param_ip(struct device_d *dev, char *name, IPaddr_t ip); IPaddr_t dev_get_param_ip(struct device_d *dev, char *name); - -int global_add_parameter(struct param_d *param); #else static inline const char *dev_get_param(struct device_d *dev, const char *name) { @@ -69,6 +69,8 @@ static inline int dev_add_param_fixed(struct device_d *dev, char *name, char *va return 0; } +static inline void dev_remove_param(struct device_d *dev, char *name) {} + static inline void dev_remove_parameters(struct device_d *dev) {} static inline int dev_param_set_generic(struct device_d *dev, struct param_d *p, @@ -86,11 +88,6 @@ static inline IPaddr_t dev_get_param_ip(struct device_d *dev, char *name) { return 0; } - -static inline int global_add_parameter(struct param_d *param) -{ - return 0; -} #endif #endif /* PARAM_H */ |