diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-06 09:30:50 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-05-06 09:30:50 +0200 |
commit | c19efab88606a974c050aa6caa9ec1803f88bdc9 (patch) | |
tree | 552a1520368f3d1500f7ad7d519e8e0d7758f367 /include | |
parent | da1ada40d27c734ec51f1da924b2ecbbd28115c1 (diff) | |
parent | 2f24a5c33c9b9034e412b52ec88c1019307c14f0 (diff) | |
download | barebox-c19efab88606a974c050aa6caa9ec1803f88bdc9.tar.gz barebox-c19efab88606a974c050aa6caa9ec1803f88bdc9.tar.xz |
Merge branch 'for-next/param'
Conflicts:
drivers/mci/mci-core.c
Diffstat (limited to 'include')
-rw-r--r-- | include/ata_drive.h | 1 | ||||
-rw-r--r-- | include/console.h | 2 | ||||
-rw-r--r-- | include/fb.h | 1 | ||||
-rw-r--r-- | include/linux/mtd/mtd.h | 1 | ||||
-rw-r--r-- | include/mci.h | 2 | ||||
-rw-r--r-- | include/net.h | 7 | ||||
-rw-r--r-- | include/param.h | 66 |
7 files changed, 64 insertions, 16 deletions
diff --git a/include/ata_drive.h b/include/ata_drive.h index 4f8b6c05fd..049082f0ca 100644 --- a/include/ata_drive.h +++ b/include/ata_drive.h @@ -95,6 +95,7 @@ struct ata_port { struct block_device blk; uint16_t *id; int initialized; + int probe; }; int ide_port_register(struct device_d *, struct ata_ioports *); diff --git a/include/console.h b/include/console.h index c45feb4785..72cf99f55b 100644 --- a/include/console.h +++ b/include/console.h @@ -42,6 +42,8 @@ struct console_device { unsigned char f_caps; unsigned char f_active; + + unsigned int baudrate; }; int console_register(struct console_device *cdev); diff --git a/include/fb.h b/include/fb.h index c5944184b1..23d6c6d025 100644 --- a/include/fb.h +++ b/include/fb.h @@ -102,6 +102,7 @@ struct fb_info { struct fb_bitfield transp; /* transparency */ int enabled; + int p_enable; }; int register_framebuffer(struct fb_info *info); diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 390f4b0767..df04030473 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -208,6 +208,7 @@ struct mtd_info { /* If true erasing bad blocks is allowed, this is set via a device parameter */ bool allow_erasebad; + int p_allow_erasebad; }; int mtd_erase(struct mtd_info *mtd, struct erase_info *instr); diff --git a/include/mci.h b/include/mci.h index cf9582dbe3..eca48a52f4 100644 --- a/include/mci.h +++ b/include/mci.h @@ -328,6 +328,8 @@ struct mci { uint64_t capacity; /**< Card's data capacity in bytes */ int ready_for_use; /** true if already probed */ char *ext_csd; + int probe; + struct param_d *param_probe; }; int mci_register(struct mci_host*); diff --git a/include/net.h b/include/net.h index e4f6f86ad0..bb6b8fa281 100644 --- a/include/net.h +++ b/include/net.h @@ -52,6 +52,12 @@ struct eth_device { struct device_d *parent; struct list_head list; + + IPaddr_t ipaddr; + IPaddr_t serverip; + IPaddr_t netmask; + IPaddr_t gateway; + char ethaddr[6]; }; #define dev_to_edev(d) container_of(d, struct eth_device, dev) @@ -384,7 +390,6 @@ typedef void rx_handler_f(void *ctx, char *packet, unsigned int len); void eth_set_current(struct eth_device *eth); struct eth_device *eth_get_current(void); struct eth_device *eth_get_byname(char *name); -void net_update_env(void); /** * net_receive - Pass a received packet from an ethernet driver to the protocol stack diff --git a/include/param.h b/include/param.h index 3a585cd193..4af2d09c4c 100644 --- a/include/param.h +++ b/include/param.h @@ -15,6 +15,8 @@ struct param_d { unsigned int flags; char *name; char *value; + struct device_d *dev; + void *driver_priv; struct list_head list; }; @@ -28,18 +30,33 @@ int dev_add_param(struct device_d *dev, const char *name, const char *(*get)(struct device_d *, struct param_d *p), unsigned long flags); +struct param_d *dev_add_param_int(struct device_d *dev, const char *name, + int (*set)(struct param_d *p, void *priv), + int (*get)(struct param_d *p, void *priv), + int *value, const char *format, void *priv); + +struct param_d *dev_add_param_bool(struct device_d *dev, const char *name, + int (*set)(struct param_d *p, void *priv), + int (*get)(struct param_d *p, void *priv), + int *value, void *priv); + +struct param_d *dev_add_param_int_ro(struct device_d *dev, const char *name, + int value, const char *format); + +struct param_d *dev_add_param_ip(struct device_d *dev, const char *name, + int (*set)(struct param_d *p, void *priv), + int (*get)(struct param_d *p, void *priv), + IPaddr_t *ip, void *priv); + 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_param(struct param_d *p); void dev_remove_parameters(struct device_d *dev); int dev_param_set_generic(struct device_d *dev, struct param_d *p, const char *val); -/* 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); #else static inline const char *dev_get_param(struct device_d *dev, const char *name) { @@ -64,31 +81,50 @@ static inline int dev_add_param(struct device_d *dev, char *name, return 0; } -static inline int dev_add_param_fixed(struct device_d *dev, char *name, char *value) +static inline struct param_d *dev_add_param_int(struct device_d *dev, const char *name, + int (*set)(struct param_d *p, void *priv), + int (*get)(struct param_d *p, void *priv), + int *value, const char *format, void *priv) { - return 0; + return NULL; } -static inline void dev_remove_param(struct device_d *dev, char *name) {} +static inline struct param_d *dev_add_param_bool(struct device_d *dev, const char *name, + int (*set)(struct param_d *p, void *priv), + int (*get)(struct param_d *p, void *priv), + int *value, void *priv) +{ + return NULL; +} -static inline void dev_remove_parameters(struct device_d *dev) {} +static inline struct param_d *dev_add_param_int_ro(struct device_d *dev, const char *name, + int value, const char *format) +{ + return NULL; +} -static inline int dev_param_set_generic(struct device_d *dev, struct param_d *p, - const char *val) +static inline struct param_d *dev_add_param_ip(struct device_d *dev, const char *name, + int (*set)(struct param_d *p, void *priv), + int (*get)(struct param_d *p, void *priv), + IPaddr_t *ip, void *priv) { - return 0; + return NULL; } -/* Convenience functions to handle a parameter as an ip address */ -static inline int dev_set_param_ip(struct device_d *dev, char *name, IPaddr_t ip) +static inline int dev_add_param_fixed(struct device_d *dev, char *name, char *value) { return 0; } -static inline IPaddr_t dev_get_param_ip(struct device_d *dev, char *name) + +static inline void dev_remove_param(struct param_d *p) {} + +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, + const char *val) { return 0; } #endif #endif /* PARAM_H */ - |