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