diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-01 14:10:38 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-01 14:10:38 +0200 |
commit | b821d73607cc6387b1ee588af97a44e8eb2b4fe2 (patch) | |
tree | 74df0464f1eec0120d9f9aebc75f3707e0a5d8d7 /include | |
parent | 1a886dd4780c55c29129a145cd4c771fe297fa6f (diff) | |
parent | ad7590ee64b9c90d372d9294d4d1b1b9a2960e51 (diff) | |
download | barebox-b821d73607cc6387b1ee588af97a44e8eb2b4fe2.tar.gz barebox-b821d73607cc6387b1ee588af97a44e8eb2b4fe2.tar.xz |
Merge branch 'resource' of git://uboot.jcrosoft.org/barebox into next
Diffstat (limited to 'include')
-rw-r--r-- | include/dm9000.h | 5 | ||||
-rw-r--r-- | include/driver.h | 38 | ||||
-rw-r--r-- | include/ns16550.h | 2 |
3 files changed, 32 insertions, 13 deletions
diff --git a/include/dm9000.h b/include/dm9000.h index 0991ab534b..a9a4635d2a 100644 --- a/include/dm9000.h +++ b/include/dm9000.h @@ -2,12 +2,7 @@ #ifndef __DM9000_H__ #define __DM9000_H__ -#define DM9000_WIDTH_8 1 -#define DM9000_WIDTH_16 2 -#define DM9000_WIDTH_32 3 - struct dm9000_platform_data { - int buswidth; int srom; }; diff --git a/include/driver.h b/include/driver.h index 9f0075489f..e9ac7279f4 100644 --- a/include/driver.h +++ b/include/driver.h @@ -71,12 +71,6 @@ struct device_d { * something like eth0 or nor0. */ int id; - resource_size_t size; - - /*! For devices which are directly mapped into memory, i.e. NOR - * Flash or SDRAM. */ - resource_size_t map_base; - struct resource *resource; int num_resources; @@ -229,10 +223,38 @@ static inline struct device_d *add_cfi_flash_device(int id, resource_size_t star struct NS16550_plat; static inline struct device_d *add_ns16550_device(int id, resource_size_t start, - resource_size_t size, struct NS16550_plat *pdata) + resource_size_t size, int flags, struct NS16550_plat *pdata) { return add_generic_device("serial_ns16550", id, NULL, start, size, - IORESOURCE_MEM, pdata); + IORESOURCE_MEM | flags, pdata); +} + +#ifdef CONFIG_DRIVER_NET_DM9000 +struct device_d *add_dm9000_device(int id, resource_size_t base, + resource_size_t data, int flags, void *pdata); +#else +static inline struct device_d *add_dm9000_device(int id, resource_size_t base, + resource_size_t data, int flags, void *pdata) +{ + return NULL; +} +#endif + +#ifdef CONFIG_USB_EHCI +struct device_d *add_usb_ehci_device(int id, resource_size_t hccr, + resource_size_t hcor, void *pdata); +#else +static inline struct device_d *add_usb_ehci_device(int id, resource_size_t hccr, + resource_size_t hcor, void *pdata) +{ + return NULL; +} +#endif + +static inline struct device_d *add_generic_usb_ehci_device(int id, + resource_size_t base, void *pdata) +{ + return add_usb_ehci_device(id, base + 0x100, base + 0x140, pdata); } /* linear list over all available devices diff --git a/include/ns16550.h b/include/ns16550.h index b40d1fa5ae..5fd52fa744 100644 --- a/include/ns16550.h +++ b/include/ns16550.h @@ -50,6 +50,8 @@ struct NS16550_plat { */ void (*reg_write) (unsigned int val, unsigned long base, unsigned char reg_offset); + + int shift; }; #endif /* __NS16650_PLATFORM_H_ */ |