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 \(Arm\)" X-Patchwork-Id: 43804 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 682BE23FFF for ; Mon, 26 Jan 2015 21:49:29 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf5676814lab.3 for ; Mon, 26 Jan 2015 13:49:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=FqM2vcbxIOoFGFVcobVoyxxMs5kfOBhwI2Sbbqbv5cM=; b=DWRS4UtZwd85+F8SlsheJlBIwipqjK3wbVX8J2md/pw4FyreUX1urjkfDaNW9KMBNM 026P4qYXlMQkq0Bht8gp+QU4SvdzN3JwDJyoR8gxZFny7whj17ANWEEYP+8CZm8MZ4F/ OAlaHPQPH4RHD+GGv7gOhJFZI+zbQsH6ZZhlRgk3s62BCcm8Fss+J7b/ReJ8AvuLnWS1 yz7TTqPsF7inSiF0gc3yq97z3SeeV4yq0utbQnN01s3E7KHuQ0uTBZx4OHI62c0CRtty FJb1BWdFSj1x5UXo49lsEeqz2hfZFNdYSUyooS/dN9B30hnRPvxbtKHGymZQm/Xui3/B I3kg== X-Gm-Message-State: ALoCoQm0sYqvkhzM7pj9Y/JmIGc90MDKQcAaaLHatm2HxA41WDxhoypNyRsg4ZRzpKyFqetqCoSb X-Received: by 10.112.64.171 with SMTP id p11mr56548lbs.12.1422308968410; Mon, 26 Jan 2015 13:49:28 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.29.133 with SMTP id k5ls492349lah.48.gmail; Mon, 26 Jan 2015 13:49:28 -0800 (PST) X-Received: by 10.112.252.42 with SMTP id zp10mr500498lbc.51.1422308968301; Mon, 26 Jan 2015 13:49:28 -0800 (PST) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com. [2a00:1450:4010:c03::233]) by mx.google.com with ESMTPS id n3si7898405lan.56.2015.01.26.13.49.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 26 Jan 2015 13:49:28 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::233 as permitted sender) client-ip=2a00:1450:4010:c03::233; Received: by mail-la0-f51.google.com with SMTP id ge10so10123162lab.10 for ; Mon, 26 Jan 2015 13:49:28 -0800 (PST) X-Received: by 10.112.135.196 with SMTP id pu4mr511882lbb.41.1422308968216; Mon, 26 Jan 2015 13:49:28 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp907125lbj; Mon, 26 Jan 2015 13:49:27 -0800 (PST) X-Received: by 10.180.160.166 with SMTP id xl6mr15507984wib.16.1422308967608; Mon, 26 Jan 2015 13:49:27 -0800 (PST) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id n2si22243190wiy.31.2015.01.26.13.49.26; Mon, 26 Jan 2015 13:49:27 -0800 (PST) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; 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) 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: 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 X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::233 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (body hash did not verify) header.i=@ Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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)