X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=include%2Fusb_mass_storage.h;h=8229f62b97fcfc594922eafcac6977e2ce88d303;hb=0d00f9b6c136634e673a7412d99df68aaa6c9a6a;hp=13f535ce2e424d9be41744147098db404d6944cd;hpb=55aea84b1db277bd86edadb37d11b78d36db7608;p=u-boot diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h index 13f535ce2e..8229f62b97 100644 --- a/include/usb_mass_storage.h +++ b/include/usb_mass_storage.h @@ -9,40 +9,25 @@ #define __USB_MASS_STORAGE_H__ #define SECTOR_SIZE 0x200 - -#include +#include #include -struct ums_device { - struct mmc *mmc; - int dev_num; - int offset; - int part_size; -}; +/* Wait at maximum 60 seconds for cable connection */ +#define UMS_CABLE_READY_TIMEOUT 60 -struct ums_board_info { - int (*read_sector)(struct ums_device *ums_dev, +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 blk_desc block_dev; }; -int fsg_init(struct ums_board_info *); +int fsg_init(struct ums *ums_devs, int count); void fsg_cleanup(void); -struct ums_board_info *board_ums_init(unsigned int, unsigned int, - unsigned int); int fsg_main_thread(void *); - -#ifdef CONFIG_USB_GADGET_MASS_STORAGE int fsg_add(struct usb_configuration *c); -#else -int fsg_add(struct usb_configuration *c) -{ - return 0; -} -#endif #endif /* __USB_MASS_STORAGE_H__ */