diff options
author | Lukasz Majewski <l.majewski@samsung.com> | 2013-03-05 12:10:17 +0100 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2013-03-18 18:58:53 +0100 |
commit | b528f71394038e593a116bd70f6409fabd147ea6 (patch) | |
tree | a03ed4c2e01df789db55ad211b70d6ac93c517f3 /drivers/usb/gadget | |
parent | b4d36f6809f3029b6fe05d523abb13c6fa76450a (diff) | |
download | u-boot-imx-b528f71394038e593a116bd70f6409fabd147ea6.zip u-boot-imx-b528f71394038e593a116bd70f6409fabd147ea6.tar.gz u-boot-imx-b528f71394038e593a116bd70f6409fabd147ea6.tar.bz2 |
usb:gadget: USB Mass Storage Gadget support
This patch adds the USB Mass Storage Gadget to u-boot
New command called "ums" is implemented to provide access
to on-device embedded persistent memory.
USB Mass Storage is supposed to work on top of the USB
Gadget framework
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/g_dnl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/g_dnl.c b/drivers/usb/gadget/g_dnl.c index a5a4c1f..cc3f344 100644 --- a/drivers/usb/gadget/g_dnl.c +++ b/drivers/usb/gadget/g_dnl.c @@ -31,6 +31,7 @@ #include "gadget_chips.h" #include "composite.c" +#include "f_mass_storage.c" /* * One needs to define the following: @@ -104,6 +105,8 @@ static int g_dnl_do_config(struct usb_configuration *c) printf("GADGET DRIVER: %s\n", s); if (!strcmp(s, "usb_dnl_dfu")) ret = dfu_add(c); + else if (!strcmp(s, "usb_dnl_ums")) + ret = fsg_add(c); return ret; } @@ -188,6 +191,9 @@ int g_dnl_register(const char *type) if (!strcmp(type, "dfu")) { strcpy(name, shortname); strcat(name, type); + } else if (!strcmp(type, "ums")) { + strcpy(name, shortname); + strcat(name, type); } else { printf("%s: unknown command: %s\n", __func__, type); return -EINVAL; |