From patchwork Fri Sep 20 03:29:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 276194 X-Patchwork-Delegate: marek.vasut@gmail.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 AFE4E2C00F4 for ; Fri, 20 Sep 2013 13:32:10 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 121114A142; Fri, 20 Sep 2013 05:31:53 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 ySqBuTDPzvgq; Fri, 20 Sep 2013 05:31:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8E73D4A15E; Fri, 20 Sep 2013 05:31:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA22D4A17F for ; Fri, 20 Sep 2013 05:31:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de 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 XaQ6ByHptAv5 for ; Fri, 20 Sep 2013 05:31:38 +0200 (CEST) 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-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by theia.denx.de (Postfix) with ESMTPS id 2989F4A180 for ; Fri, 20 Sep 2013 05:30:51 +0200 (CEST) Received: by mail-pd0-f175.google.com with SMTP id q10so9222981pdj.34 for ; Thu, 19 Sep 2013 20:30:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qpQTWVWZtDnlpqx+7jJ4HjKshPDpkqEpkyY5cVnYE8s=; b=TwUtwaCbHKyq4Z+m74VA64xALIakjUbufm4xO+Spm91ot3mXSw2pVnZGWF7GW1AINM F/E/ERsDWyLgDzfAO8iJN18SWiJasxLs8D756g+cMet60Lj0zKFVrKoOxeINLx3adAKe Yj+X70imjhHo5OpfFPrrcX1sXxCyvPAwZTtLbHS47Nzc4QKir3DbQ+jslEOXYXQokUiI +CvqfV9rczwE7iJo4KIbd4CZ+LqIrghW7psK0IFX0RdR9GwIGlWwSW4/Gk41wqtVKPkf 3dUpjXiugBmbndVeZx9LCJX+ofKZhi4uRoTRnI3Zry16azLCz74B/UJ1CDMdmfGiFPpg lhug== X-Gm-Message-State: ALoCoQmeHwkHu2axpO3l1F0gteogq2CM5HVrkLyw2ZPg9qwGdTcNZnaL2PQ+e3tgJ2qDWTyIZsCN X-Received: by 10.66.191.5 with SMTP id gu5mr6277649pac.126.1379647844712; Thu, 19 Sep 2013 20:30:44 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPSA id wd6sm15743374pab.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Sep 2013 20:30:44 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.80) (envelope-from ) id 1VMrPe-0000hy-Fb; Thu, 19 Sep 2013 20:29:46 -0700 From: Troy Kisky To: marek.vasut@gmail.com Date: Thu, 19 Sep 2013 20:29:35 -0700 Message-Id: <1379647780-2623-13-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1379647780-2623-1-git-send-email-troy.kisky@boundarydevices.com> References: <1379647780-2623-1-git-send-email-troy.kisky@boundarydevices.com> Cc: fabio.estevam@freescale.com, otavio@ossystems.com.br, leiwen@marvell.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH V4 12/17] usb: gadget: mv_udc: optimize ep_enable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Only get head if not ep0. Signed-off-by: Troy Kisky --- v4: no change --- drivers/usb/gadget/mv_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c index 075b039..995585d 100644 --- a/drivers/usb/gadget/mv_udc.c +++ b/drivers/usb/gadget/mv_udc.c @@ -216,10 +216,8 @@ static void mv_ep_free_request(struct usb_ep *ep, struct usb_request *_req) static void ep_enable(int num, int in, int maxpacket) { - struct ept_queue_head *head; struct mv_udc *udc = (struct mv_udc *)controller.ctrl->hcor; unsigned n; - head = mv_get_qh(num, in); n = readl(&udc->epctrl[num]); if (in) @@ -228,6 +226,8 @@ static void ep_enable(int num, int in, int maxpacket) n |= (CTRL_RXE | CTRL_RXR | CTRL_RXT_BULK); if (num != 0) { + struct ept_queue_head *head = mv_get_qh(num, in); + head->config = CONFIG_MAX_PKT(maxpacket) | CONFIG_ZLT; mv_flush_qh(num); }