Blame view
include/usb_mass_storage.h
849 Bytes
83d290c56
|
1 |
/* SPDX-License-Identifier: GPL-2.0+ */ |
b528f7139
|
2 3 4 |
/* * Copyright (C) 2011 Samsung Electrnoics * Lukasz Majewski <l.majewski@samsung.com> |
b528f7139
|
5 6 7 8 9 10 |
*/ #ifndef __USB_MASS_STORAGE_H__ #define __USB_MASS_STORAGE_H__ #define SECTOR_SIZE 0x200 |
ce19d9740
|
11 |
#include <part.h> |
ba4e95c9f
|
12 |
#include <linux/usb/composite.h> |
b528f7139
|
13 |
|
3603e31db
|
14 15 |
/* Wait at maximum 60 seconds for cable connection */ #define UMS_CABLE_READY_TIMEOUT 60 |
93c813b3a
|
16 17 |
struct ums { int (*read_sector)(struct ums *ums_dev, |
b528f7139
|
18 |
ulong start, lbaint_t blkcnt, void *buf); |
93c813b3a
|
19 |
int (*write_sector)(struct ums *ums_dev, |
b528f7139
|
20 |
ulong start, lbaint_t blkcnt, const void *buf); |
0697f206d
|
21 22 |
unsigned int start_sector; unsigned int num_sectors; |
b528f7139
|
23 |
const char *name; |
4101f6879
|
24 |
struct blk_desc block_dev; |
b528f7139
|
25 |
}; |
02585eb3b
|
26 |
int fsg_init(struct ums *ums_devs, int count); |
16297cfb2
|
27 |
void fsg_cleanup(void); |
16297cfb2
|
28 |
int fsg_main_thread(void *); |
ba4e95c9f
|
29 |
int fsg_add(struct usb_configuration *c); |
b528f7139
|
30 |
#endif /* __USB_MASS_STORAGE_H__ */ |