2 * Copyright (C) 2011 Samsung Electrnoics
3 * Lukasz Majewski <l.majewski@samsung.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * aloong with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
21 #ifndef __USB_MASS_STORAGE_H__
22 #define __USB_MASS_STORAGE_H__
24 #define SECTOR_SIZE 0x200
35 struct ums_board_info {
36 int (*read_sector)(struct ums_device *ums_dev,
37 ulong start, lbaint_t blkcnt, void *buf);
38 int (*write_sector)(struct ums_device *ums_dev,
39 ulong start, lbaint_t blkcnt, const void *buf);
40 void (*get_capacity)(struct ums_device *ums_dev,
41 long long int *capacity);
43 struct ums_device ums_dev;
46 extern void board_usb_init(void);
48 extern int fsg_init(struct ums_board_info *);
49 extern void fsg_cleanup(void);
50 extern struct ums_board_info *board_ums_init(unsigned int,
51 unsigned int, unsigned int);
52 extern int usb_gadget_handle_interrupts(void);
53 extern int fsg_main_thread(void *);
55 #endif /* __USB_MASS_STORAGE_H__ */