]>
git.ipfire.org Git - people/ms/u-boot.git/blob - include/usb_mass_storage.h
2 * Copyright (C) 2011 Samsung Electrnoics
3 * Lukasz Majewski <l.majewski@samsung.com>
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __USB_MASS_STORAGE_H__
9 #define __USB_MASS_STORAGE_H__
11 #define SECTOR_SIZE 0x200
13 #include <linux/usb/composite.h>
15 /* Wait at maximum 60 seconds for cable connection */
16 #define UMS_CABLE_READY_TIMEOUT 60
19 int (*read_sector
)(struct ums
*ums_dev
,
20 ulong start
, lbaint_t blkcnt
, void *buf
);
21 int (*write_sector
)(struct ums
*ums_dev
,
22 ulong start
, lbaint_t blkcnt
, const void *buf
);
23 unsigned int start_sector
;
24 unsigned int num_sectors
;
26 block_dev_desc_t
*block_dev
;
29 extern struct ums
*ums
;
31 int fsg_init(struct ums
*);
32 void fsg_cleanup(void);
33 int fsg_main_thread(void *);
34 int fsg_add(struct usb_configuration
*c
);
35 #endif /* __USB_MASS_STORAGE_H__ */