]>
Commit | Line | Data |
---|---|---|
b528f713 ŁM |
1 | /* |
2 | * Copyright (C) 2011 Samsung Electrnoics | |
3 | * Lukasz Majewski <[email protected]> | |
4 | * | |
1a459660 | 5 | * SPDX-License-Identifier: GPL-2.0+ |
b528f713 ŁM |
6 | */ |
7 | ||
8 | #ifndef __USB_MASS_STORAGE_H__ | |
9 | #define __USB_MASS_STORAGE_H__ | |
10 | ||
11 | #define SECTOR_SIZE 0x200 | |
ce19d974 | 12 | #include <part.h> |
ba4e95c9 | 13 | #include <linux/usb/composite.h> |
b528f713 | 14 | |
3603e31d PM |
15 | /* Wait at maximum 60 seconds for cable connection */ |
16 | #define UMS_CABLE_READY_TIMEOUT 60 | |
17 | ||
93c813b3 PM |
18 | struct ums { |
19 | int (*read_sector)(struct ums *ums_dev, | |
b528f713 | 20 | ulong start, lbaint_t blkcnt, void *buf); |
93c813b3 | 21 | int (*write_sector)(struct ums *ums_dev, |
b528f713 | 22 | ulong start, lbaint_t blkcnt, const void *buf); |
0697f206 PM |
23 | unsigned int start_sector; |
24 | unsigned int num_sectors; | |
b528f713 | 25 | const char *name; |
4101f687 | 26 | struct blk_desc block_dev; |
b528f713 ŁM |
27 | }; |
28 | ||
02585eb3 | 29 | int fsg_init(struct ums *ums_devs, int count); |
16297cfb | 30 | void fsg_cleanup(void); |
16297cfb | 31 | int fsg_main_thread(void *); |
ba4e95c9 | 32 | int fsg_add(struct usb_configuration *c); |
b528f713 | 33 | #endif /* __USB_MASS_STORAGE_H__ */ |