diff options
author | Tom Rini <trini@ti.com> | 2013-03-18 15:33:47 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-03-18 15:33:47 -0400 |
commit | 3c47f2f4871c345c20b9d986b11fec550ef6cc9f (patch) | |
tree | 267c6eedacaa02cc8c7096f67bedb9d17fe3e21d /include | |
parent | 0ce033d2582129243aca10d3072a221386bbba44 (diff) | |
parent | ae003d057077d792c1f2131753a7596c94e0bba4 (diff) | |
download | u-boot-imx-3c47f2f4871c345c20b9d986b11fec550ef6cc9f.zip u-boot-imx-3c47f2f4871c345c20b9d986b11fec550ef6cc9f.tar.gz u-boot-imx-3c47f2f4871c345c20b9d986b11fec550ef6cc9f.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-usb
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/coreboot.h | 17 | ||||
-rw-r--r-- | include/configs/trats.h | 5 | ||||
-rw-r--r-- | include/usb_mass_storage.h | 55 | ||||
-rw-r--r-- | include/usbdevice.h | 4 |
4 files changed, 80 insertions, 1 deletions
diff --git a/include/configs/coreboot.h b/include/configs/coreboot.h index 49f05de..87daf62 100644 --- a/include/configs/coreboot.h +++ b/include/configs/coreboot.h @@ -273,6 +273,23 @@ */ #define CONFIG_PCI +/*----------------------------------------------------------------------- + * USB configuration + */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_PCI +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 12 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +#define CONFIG_USB_STORAGE +#define CONFIG_USB_KEYBOARD +#define CONFIG_SYS_USB_EVENT_POLL + +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX +#define CONFIG_USB_ETHER_SMSC95XX + +#define CONFIG_CMD_USB + #define CONFIG_EXTRA_ENV_SETTINGS \ CONFIG_STD_DEVICES_SETTINGS diff --git a/include/configs/trats.h b/include/configs/trats.h index 63745ac..31d8190 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -316,4 +316,9 @@ #define CONFIG_VIDEO_BMP_GZIP #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE ((500 * 120 * 4) + (1 << 12)) +#define CONFIG_CMD_USB_MASS_STORAGE +#if defined(CONFIG_CMD_USB_MASS_STORAGE) +#define CONFIG_USB_GADGET_MASS_STORAGE +#endif + #endif /* __CONFIG_H */ diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h new file mode 100644 index 0000000..ffc3a13 --- /dev/null +++ b/include/usb_mass_storage.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2011 Samsung Electrnoics + * Lukasz Majewski <l.majewski@samsung.com> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * aloong with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __USB_MASS_STORAGE_H__ +#define __USB_MASS_STORAGE_H__ + +#define SECTOR_SIZE 0x200 + +#include <mmc.h> + +struct ums_device { + struct mmc *mmc; + int dev_num; + int offset; + int part_size; +}; + +struct ums_board_info { + int (*read_sector)(struct ums_device *ums_dev, + ulong start, lbaint_t blkcnt, void *buf); + int (*write_sector)(struct ums_device *ums_dev, + ulong start, lbaint_t blkcnt, const void *buf); + void (*get_capacity)(struct ums_device *ums_dev, + long long int *capacity); + const char *name; + struct ums_device ums_dev; +}; + +extern void board_usb_init(void); + +extern int fsg_init(struct ums_board_info *); +extern void fsg_cleanup(void); +extern struct ums_board_info *board_ums_init(unsigned int, + unsigned int, unsigned int); +extern int usb_gadget_handle_interrupts(void); +extern int fsg_main_thread(void *); + +#endif /* __USB_MASS_STORAGE_H__ */ diff --git a/include/usbdevice.h b/include/usbdevice.h index 3edaf8b..7037efd 100644 --- a/include/usbdevice.h +++ b/include/usbdevice.h @@ -475,7 +475,9 @@ typedef struct urb_link { * function driver to inform it that data has arrived. */ -#define URB_BUF_SIZE 128 /* in linux we'd malloc this, but in u-boot we prefer static data */ +/* in linux we'd malloc this, but in u-boot we prefer static data */ +#define URB_BUF_SIZE 512 + struct urb { struct usb_endpoint_instance *endpoint; |