From patchwork Fri Jan 22 18:18:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 8091731 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1FE7E9F859 for ; Fri, 22 Jan 2016 18:20:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 27E922058E for ; Fri, 22 Jan 2016 18:20:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 413C2204DE for ; Fri, 22 Jan 2016 18:19:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMgJS-00040Q-R2; Fri, 22 Jan 2016 18:19:58 +0000 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aMgJN-0003tB-RL for linux-rockchip@lists.infradead.org; Fri, 22 Jan 2016 18:19:55 +0000 Received: by mail-pf0-x22b.google.com with SMTP id e65so46170507pfe.0 for ; Fri, 22 Jan 2016 10:19:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JXpUI8ewZg16bsQup/inQhe3gkxQFBzLtQO8OQMXz70=; b=aJUFpGvbl2QB78+RammebmOCoBZ7O0N5IEngJM/Cy7zXEuRw6GATh3qbSYQ7wmR/he K0ItEzLMHNDdXGAk08r4nuVzzLoawQ726YtokHcRgWtoExbWUSa1irTjtfv9ccdGxRv5 cb/MyBBVnYS/S1J5NF9BiBJ7zceU0pO2N+QUY= 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=JXpUI8ewZg16bsQup/inQhe3gkxQFBzLtQO8OQMXz70=; b=X9RkMvlCUFt+doPoNWCxy0QSh/TfdDKJInDPMhuaCJefyB5pd7ZhtEi+G55xwTfPiC 3sJ6iMV2VUfbxl9Cz7WZgjLcVgEAlLpcEZbJzv52PQnYvClv2Pzar06KNanNhzNKRkF1 Zs5/qS07p4c1AtiBmmW/IsXl6QCUnNzqOe8151T/hk9gY1+wC3JktjVhgjKBB0akmuIS +pbEwk+cxM2T4tvKtb45r661Zdc2q/YNVVYgTY47womSp32LLYkwE1VeZ6DNwCGvMblx 0hvxLiIrZ66Q+S6/hsOPwcf9wdbe3/J3jVabE3IrkLPZm/psNXd3fa77mofeVNE5x70c zTSg== X-Gm-Message-State: AG10YOTdTrvrCpx6pIHAvDTKcYsdFCkNWPkMKfofAQg84QVek/y+jYsbiZxNKNuXTAHt9Q== X-Received: by 10.98.42.135 with SMTP id q129mr6407784pfq.13.1453486773018; Fri, 22 Jan 2016 10:19:33 -0800 (PST) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id y86sm11276415pfa.26.2016.01.22.10.19.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 22 Jan 2016 10:19:32 -0800 (PST) From: Douglas Anderson To: John Youn , balbi@ti.com, kever.yang@rock-chips.com Subject: [PATCH v5 04/21] usb: dwc2: host: Set host_perio_tx_fifo_size to 304 for rk3066 Date: Fri, 22 Jan 2016 10:18:39 -0800 Message-Id: <1453486736-15358-5-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 In-Reply-To: <1453486736-15358-1-git-send-email-dianders@chromium.org> References: <1453486736-15358-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160122_101954_019252_84F9AE39 X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: huangtao@rock-chips.com, gregory.herrero@intel.com, heiko@sntech.de, johnyoun@synopsys.com, gregkh@linuxfoundation.org, ming.lei@canonical.com, linux-usb@vger.kernel.org, Douglas Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, yousaf.kaukab@intel.com, stern@rowland.harvard.edu, william.wu@rock-chips.com, Julius Werner , dinguyen@opensource.altera.com MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Looking at rk3288, there are two dwc2 ports. One has 960 total_fifo_size and the other 972. We're currently assigning 528 + 128 + 256 = 912. That means we're wasting 48 words on one port and 60 words on the other. Since we have one settings block for both ports, let's just eat the 48 words that we know we have and assign them to what's probably the most latency-senstive part of the system: periodic transfers. Presumably other rk3288 parts using the rk3066 settings also have these extra 48 words as well. Note: ideally we'd adjust dwc2_calculate_dynamic_fifo() to handle this more dynamically, but until that's done hardcoding things here seems OK. NOTE: no known use cases are improved by this patch, but in my stressful USB tests I certainly see my periodic FIFO filling up both before and after this change. Presumably there are some USB configurations where the periodic FIFO would have been filled before where it no longer is. Signed-off-by: Douglas Anderson --- Changes in v5: None Changes in v4: - Set host_perio_tx_fifo_size to 304 for rk3066 new for v4. Changes in v3: None Changes in v2: None drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index b6d7666e715c..afdcdeee266d 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -128,7 +128,7 @@ static const struct dwc2_core_params params_rk3066 = { .en_multiple_tx_fifo = -1, .host_rx_fifo_size = 528, /* 528 DWORDs */ .host_nperio_tx_fifo_size = 128, /* 128 DWORDs */ - .host_perio_tx_fifo_size = 256, /* 256 DWORDs */ + .host_perio_tx_fifo_size = 304, /* 304 DWORDs */ .max_transfer_size = -1, .max_packet_count = -1, .host_channels = -1,