summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMichael Scott <michael.scott@linaro.org>2015-01-26 15:49:00 -0600
committerMarek Vasut <marex@denx.de>2015-02-25 17:47:02 +0100
commitde1956202e24bc490787192b443a1a8e8048c83b (patch)
tree1bea5d190933103c92344dc2003e3a0b34c7b787 /drivers
parent193d7d153024214f2906e34f2c8abd495be57696 (diff)
downloadu-boot-imx-de1956202e24bc490787192b443a1a8e8048c83b.zip
u-boot-imx-de1956202e24bc490787192b443a1a8e8048c83b.tar.gz
u-boot-imx-de1956202e24bc490787192b443a1a8e8048c83b.tar.bz2
fastboot: add "fastboot oem" command support
Add code stub to handle "fastboot oem __" command. As unlock is a common fastboot command, distinguish that it is not implemented. Signed-off-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Steve Rae <srae@broadcom.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/f_fastboot.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 310175a..e2fda86 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -513,6 +513,17 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req)
}
#endif
+static void cb_oem(struct usb_ep *ep, struct usb_request *req)
+{
+ char *cmd = req->buf;
+ if (strncmp("unlock", cmd + 4, 8) == 0) {
+ fastboot_tx_write_str("FAILnot implemented");
+ }
+ else {
+ fastboot_tx_write_str("FAILunknown oem command");
+ }
+}
+
struct cmd_dispatch_info {
char *cmd;
void (*cb)(struct usb_ep *ep, struct usb_request *req);
@@ -541,6 +552,10 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = {
.cb = cb_flash,
},
#endif
+ {
+ .cmd = "oem",
+ .cb = cb_oem,
+ },
};
static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)