]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/gadget/f_fastboot.c
fastboot: add "fastboot oem" command support
[karo-tx-uboot.git] / drivers / usb / gadget / f_fastboot.c
index 310175acfed369a76e0dacd61b6f5b76f0e714e6..e2fda8613b6bc27dbd834c0fe48f6d6d400225f7 100644 (file)
@@ -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)