From patchwork Mon Jan 26 21:49:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 433056 X-Patchwork-Delegate: l.majewski@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id AC5891401AB for ; Tue, 27 Jan 2015 08:49:28 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 045A44B683; Mon, 26 Jan 2015 22:49:23 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IlK9Q9zbvQZp; Mon, 26 Jan 2015 22:49:22 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5DC6E4B686; Mon, 26 Jan 2015 22:49:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A2D974B65B for ; Mon, 26 Jan 2015 22:49:15 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4aJlDFaCOpeI for ; Mon, 26 Jan 2015 22:49:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by theia.denx.de (Postfix) with ESMTPS id 5034E4B659 for ; Mon, 26 Jan 2015 22:49:13 +0100 (CET) Received: by mail-ob0-f178.google.com with SMTP id nt9so10222359obb.9 for ; Mon, 26 Jan 2015 13:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=J37awFwWzfTAtQEJ7SukqRBmOA3h4dVVjguaEgN88yY=; b=e4AZBqBZ6G55BdsAppokWJr/takRw6t48nPYGAWLzOicYA6qXNV1/RHe+lz75/ihDx jL8k1qNEavJHfR3TxAbu8CB+g8+QDrjioGfaLK1EIU8nMluCcsZr8c2c2mvweCi15bvD 8zVeZ/AhwhHWGBEq52QSKqdYSHhuFsJdCG1MEnVqg6NlEe6lpqaUv804YTzVKGIWoFyf sszxPz4GPqL9TcDe4+hGmL+d3cTQ8fTWGEsRxjCjFkeR2rQwXkLYUGkpqXQsErUni5rB R1Vn3cWtQ2CJiiyIqZYRLqvB3UR0s3OC1JZgYNG/h1bCQeTvxEtiMSUUH6wALJFg0lLr /n0Q== X-Received: by 10.202.215.212 with SMTP id o203mr13440149oig.85.1422308952147; Mon, 26 Jan 2015 13:49:12 -0800 (PST) Received: from rob-laptop.herring.priv (72-48-98-129.dyn.grandenetworks.net. [72.48.98.129]) by mx.google.com with ESMTPSA id d63sm3464302oig.15.2015.01.26.13.49.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Jan 2015 13:49:11 -0800 (PST) From: Rob Herring To: Marek Vasut , =?UTF-8?q?=C5=81ukasz=20Majewski?= Date: Mon, 26 Jan 2015 15:49:00 -0600 Message-Id: <1422308941-23543-2-git-send-email-robh@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422308941-23543-1-git-send-email-robh@kernel.org> References: <1422308941-23543-1-git-send-email-robh@kernel.org> Cc: Steve Rae , u-boot@lists.denx.de, Rob Herring , Michael Scott Subject: [U-Boot] [PATCH 1/2] fastboot: add "fastboot oem" command support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Michael Scott 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 Signed-off-by: Rob Herring Tested-by: Steve Rae --- drivers/usb/gadget/f_fastboot.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)