diff options
| author | Tom Rini <trini@ti.com> | 2013-11-08 15:25:29 -0500 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-11-08 15:25:29 -0500 | 
| commit | 15c5cdf5aa6b292145e5e3e220ec1f42b11eff6f (patch) | |
| tree | 662fecd9e66cfe485097f777912824d81f9642e6 /include | |
| parent | 28c860b23fb2dd1affec909e98f25c58324e2140 (diff) | |
| parent | 47d79deb996797dddd0984cef8b48a566c82180e (diff) | |
| download | olio-uboot-2014.01-15c5cdf5aa6b292145e5e3e220ec1f42b11eff6f.tar.xz olio-uboot-2014.01-15c5cdf5aa6b292145e5e3e220ec1f42b11eff6f.zip | |
Merge branch 'master' of git://www.denx.de/git/u-boot-usb
Diffstat (limited to 'include')
| -rw-r--r-- | include/configs/trats.h | 2 | ||||
| -rw-r--r-- | include/g_dnl.h | 1 | ||||
| -rw-r--r-- | include/usb.h | 10 | ||||
| -rw-r--r-- | include/usb_mass_storage.h | 33 | 
4 files changed, 28 insertions, 18 deletions
| diff --git a/include/configs/trats.h b/include/configs/trats.h index 6ed331326..3d080c4d1 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -321,9 +321,7 @@  #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 120 * 4) + (1 << 12))  #define CONFIG_CMD_USB_MASS_STORAGE -#if defined(CONFIG_CMD_USB_MASS_STORAGE)  #define CONFIG_USB_GADGET_MASS_STORAGE -#endif  /* Pass open firmware flat tree */  #define CONFIG_OF_LIBFDT    1 diff --git a/include/g_dnl.h b/include/g_dnl.h index de669fb85..8f813c21e 100644 --- a/include/g_dnl.h +++ b/include/g_dnl.h @@ -13,5 +13,6 @@  int g_dnl_bind_fixup(struct usb_device_descriptor *, const char *);  int g_dnl_register(const char *s);  void g_dnl_unregister(void); +void g_dnl_set_serialnumber(char *);  #endif /* __G_DOWNLOAD_H_ */ diff --git a/include/usb.h b/include/usb.h index d9fedeeff..736730e89 100644 --- a/include/usb.h +++ b/include/usb.h @@ -197,6 +197,16 @@ int board_usb_init(int index, enum usb_init_type init);   */  int board_usb_cleanup(int index, enum usb_init_type init); +/* + * If CONFIG_USB_CABLE_CHECK is set then this function + * should be defined in board file. + * + * @return 1 if cable is connected and 0 otherwise. + */ +#ifdef CONFIG_USB_CABLE_CHECK +int usb_cable_connected(void); +#endif +  #ifdef CONFIG_USB_STORAGE  #define USB_MAX_STOR_DEV 5 diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h index 13f535ce2..9df3adcf2 100644 --- a/include/usb_mass_storage.h +++ b/include/usb_mass_storage.h @@ -9,32 +9,33 @@  #define __USB_MASS_STORAGE_H__  #define SECTOR_SIZE		0x200 -  #include <mmc.h>  #include <linux/usb/composite.h> -struct ums_device { -	struct mmc *mmc; -	int dev_num; -	int offset; -	int part_size; -}; +#ifndef UMS_START_SECTOR +#define UMS_START_SECTOR	0 +#endif -struct ums_board_info { -	int (*read_sector)(struct ums_device *ums_dev, +#ifndef UMS_NUM_SECTORS +#define UMS_NUM_SECTORS		0 +#endif + +struct ums { +	int (*read_sector)(struct ums *ums_dev,  			   ulong start, lbaint_t blkcnt, void *buf); -	int (*write_sector)(struct ums_device *ums_dev, +	int (*write_sector)(struct ums *ums_dev,  			    ulong start, lbaint_t blkcnt, const void *buf); -	void (*get_capacity)(struct ums_device *ums_dev, -			     long long int *capacity); +	unsigned int start_sector; +	unsigned int num_sectors;  	const char *name; -	struct ums_device ums_dev; +	struct mmc *mmc;  }; -int fsg_init(struct ums_board_info *); +extern struct ums *ums; + +int fsg_init(struct ums *);  void fsg_cleanup(void); -struct ums_board_info *board_ums_init(unsigned int, unsigned int, -				      unsigned int); +struct ums *ums_init(unsigned int);  int fsg_main_thread(void *);  #ifdef CONFIG_USB_GADGET_MASS_STORAGE |