Prepare v2025.01
[u-boot.git] / include / usb_mass_storage.h
blob6d83d93cad7fb2c21d91cf4cc482173e65788c53
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Copyright (C) 2011 Samsung Electrnoics
4 * Lukasz Majewski <l.majewski@samsung.com>
5 */
7 #ifndef __USB_MASS_STORAGE_H__
8 #define __USB_MASS_STORAGE_H__
10 #include <part.h>
11 #include <linux/usb/composite.h>
13 /* Wait at maximum 60 seconds for cable connection */
14 #define UMS_CABLE_READY_TIMEOUT 60
16 struct ums {
17 int (*read_sector)(struct ums *ums_dev,
18 ulong start, lbaint_t blkcnt, void *buf);
19 int (*write_sector)(struct ums *ums_dev,
20 ulong start, lbaint_t blkcnt, const void *buf);
21 unsigned int start_sector;
22 unsigned int num_sectors;
23 const char *name;
24 struct blk_desc block_dev;
27 int fsg_init(struct ums *ums_devs, int count, struct udevice *udc);
28 void fsg_cleanup(void);
29 int fsg_main_thread(void *);
30 int fsg_add(struct usb_configuration *c);
31 #endif /* __USB_MASS_STORAGE_H__ */