Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752309AbbHaBw1 (ORCPT ); Sun, 30 Aug 2015 21:52:27 -0400 Received: from mail-bn1bon0138.outbound.protection.outlook.com ([157.56.111.138]:9294 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751943AbbHaBwX (ORCPT ); Sun, 30 Aug 2015 21:52:23 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=freescale.com; Date: Mon, 31 Aug 2015 08:40:33 +0800 From: Peter Chen To: Nathan Sullivan CC: punnaiah choudary kalluri , sundeep subbaraya , Subbaraya Sundeep Bhatta , "robh+dt@kernel.org" , "pawel.moll@arm.com" , Mark Rutland , "ijc+devicetree@hellion.org.uk" , Kumar Gala , Greg Kroah-Hartman , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" Subject: Re: [PATCH 1/2] usb: chipidea: add xilinx zynq platform data Message-ID: <20150831004032.GB25516@shlinux2> References: <1440602865-30468-1-git-send-email-nathan.sullivan@ni.com> <20150827043339.GA29157@shlinux2> <20150827143307.GA3775@nathan3500-linux-VM> <20150828013011.GA15341@shlinux2> <20150828144256.GA30916@nathan3500-linux-VM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150828144256.GA30916@nathan3500-linux-VM> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD003;1:G5y/6nVFGG6+0qpUCgzGvHTj0lR8RXN1uwDl1gtTFugBa+VlWNZsioOVPub4/U/7LBK/gLVryL/ptnmCwo1awgx1FWFqsBbAcmI+wM+301gsXZjh6OLN9wpli9hG8XFlPf4wVB/+N1k6SAElFjM7kcMDLnyqVf+OgCHyDE5ilDT1tWNmlNPCtK3bgFEZG9jD9XlGk//GfeQGyQ8vnmWYnkfoYK0ZZniu7InIjJ/C1JfAP4p0SEhhwgWEEUeC7hB4Lo/9gY15te/v2X85cYRLOsr5cxzRzUyOKCRgsiaLhLzOvDiAZDnCZon4V0kgwJSLpbXks3GwsfOjabax4Bbkyoa4xCrx1OwxVZ3HzMaAAjfSiqepue37Ofy2eLTSlEDG7XJ863tve8zzXxeXZs1xbuGmxGCnqOy2ENfYfw+m5nE= X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(199003)(24454002)(189002)(377454003)(4001540100001)(104016003)(46406003)(76176999)(23726002)(86362001)(68736005)(77156002)(54356999)(33656002)(92566002)(83506001)(19580395003)(19580405001)(50986999)(97756001)(33716001)(2950100001)(87936001)(85426001)(6806004)(77096005)(97736004)(81156007)(106466001)(105606002)(46102003)(50466002)(4001350100001)(5001960100002)(5007970100001)(62966003)(47776003)(110136002)(5001830100001)(189998001)(64706001)(93886004)(5001860100001)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB321;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB321;2:jBOBHpAsIwXVp2p6wj4sQkOUxXkfWLFjNUFrzZ/mVhXjYp+jWGXiKiNL4z9U3M7ye8UqpZbHgErCcb2nUo37eIkhfr/jcm4VjKhljk/aCYoqSAVTv7plqyGekJ/e62Drwd4EEomvBEqDkKQEPGqKG8evnAfMVTgpAh2Y9wpekL4=;3:OlrkuFLZZOuqWAA+QIr88upuY6axBA6tugYeepSCc+OOwKN6wyk6PaWY9E1O5RqIIvgz2wum0z7LFg0Mmdn2eRfzaHwk9zP25JXwUu2ZVOZJ+SyCen4OxHz9BFPB9DNR96+oKOKyhzX9sD6PwcBSLhp/3kpeyv7InRiSBNetnOoVcmjbyd9RLHmNMweM6pHPGU6uGc6dX3oJXeYVhdDA53Zs5Yqn66dhiWxnchRSbv8=;25:l0MPuAcBuC207FTmfyISIAEmKSPxq6ERafTGx0H4aXy8nivjRnEaUKzh4b7YHekImk4CqtZgPnuT4nVupBoPKeTfaEep79SplUUMnVNYhDWlLWqGQjwlGqIr67NS3YajB73n41WdPXnUiVmgKzhlfpkouTqislB1yS+oZuJE8QToB/OpMIixjdcoGYLJ+RBIp7vv8JqhsxRaqneaNYW8fCvJif1vZPLNMIMw+/JBbmNCIzP+weodiez0roEXeY0qB2h7Uvt3Zpauvs4GEgvqLQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB321; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB321;20:b++n+nnDkxc8l9BF2PWuA+DHA/yFyMA6EBenGwvghTwOnZL0lTKkqs/6ALlyMVrkrYv8bmqH1ttKXUdZMPPXxoDbVy0Dpc3dRwShUXzoqhXwRUy30q7tEorliO2qcsDcI19gOozmw1kMGdGjlxOvBfLBmJ05YPXv3sdkxDzNHbDT1V/mO6xrwAu1SGImPvFUrJaAMSdnkvPg+8odtffy/Q9AwBw/id+UvHz8qvYozLYdWmY44i4vfMo39LbMhKtgYw2bSK5cpG4zs89YXbyMAxD6NwaccEerjiJKEwtRO736tYoAkEiPRdkjLNRm9K8mvphfujpSJBY58m4y5zaiN/AycNJ2vXr719I++rrdEpc=;4:wFJO+qj0Khvabqg3iYy1nxNhfW7owOczm6BVpR2NnNhQov8JXPgDJ8TKLWpBnKMdhQroB1wMIEaa6UL8MU5DCjfGlAlm6+hgi5gzaOBt3n6XzSeqisdFkWUNQOY555w/XBTTedJx9RXLG1c/Im5wX77dguR//hnTb4pHWU6a+QWb3jnLhhFvWcF/aVKNbOiE9hKhTZ/KD5spugmFt31loJEfrcJYddnV2wJOG38aCvdrqpDm41NWAnitt2KValpuix1SmGrfCMlCnptCsihkvP9/sxfDw/XChAAhJPKLd56FXMKRKeWsPQSv4rD0cTCQX+DHdX0/IjsphM0eNPbgwA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:BL2PR03MB321;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB321; X-Forefront-PRVS: 0685122203 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB321;23:WcKmhKRzM77urzOFaqqJu8MGkjzD6jhr2bknKAcs/b?= =?us-ascii?Q?HQssn8BAqNDS07GFvv5K1j89qDeONv+hVTWVk4TNmjYFhuYmjkXf1QSui1+I?= =?us-ascii?Q?pRGwC1919ILSodhK+5NC+wAeosoXZRtzP7t8jFK9C2AcZqtY2EOw+rlECrfP?= =?us-ascii?Q?uLuTQUfzM/VrjqQpfKj3HFYq58pNUO+MTaWk5aL1EQARvJ0ZNFcgN9aG9rIg?= =?us-ascii?Q?NbSPpV05tg0VY251rW5BOwhv+jHNLa+MI69QZep5WHO7aJOJb/BmsCe/CvEG?= =?us-ascii?Q?tUmiyfYwJrCernyHuIwXAwRyVntau2sTU/svEFDh0b8W80/O2ZKiIUk+uGdO?= =?us-ascii?Q?nhg/5DfwoEfi+cwh2MhgyxrQ6OWEKuAR6PGjH91joEjDbPkWsWUccpQjvO7H?= =?us-ascii?Q?HHIFOlg626HQmMh74KFRCS+jLSQ4qOl7jHbZw6L6cAdlb6Od6j8BSYPtYTl/?= =?us-ascii?Q?RowaMPsdtYCi+tcXOQGYesRkPEM+s/AnQDBQb8Pmz0cddS8nuwGEBliNDvGR?= =?us-ascii?Q?nYZf8UWofXDlUIT4xoaqOckUcYVApu+CbDVr95Sv6mKY4zlscuBELKTKp4oi?= =?us-ascii?Q?tCeBYGafd6wC7HfFbhZakiCW8hkEH6/m7oSBqNoDj1f3Ws9Xrml0VRCuFZ41?= =?us-ascii?Q?uJGoceNPwERqPD1OM/k5ClEghfgThkNL5GpRDuf6S71+1uKC/uIbBcBDQIni?= =?us-ascii?Q?zxB4yuuy43qWPShHh9pupRUIxy2d3iHOFPWZg9tTunb2/eNT6lUa2qilZ8mS?= =?us-ascii?Q?/xl3c8VBcv0o4aRRQ0L+TzFJJNuK17a/pyHR8CvpV3phkyzb3hcohdbzjUWb?= =?us-ascii?Q?rjeR9Ce352kXja8VeZYNx+3abew78SwFlf2bAeg3zwiAZ5F0jr4lDZOpu+um?= =?us-ascii?Q?3LM5x6+zec79dZeUjDArKyg3srAU30JNnbd06G1GnoPUKj/3cQ68eHWsl10j?= =?us-ascii?Q?0u370Foa6fSN8eBOahG7e0u3db7CKWr9SzP3RzxdRED4hGLuaUlOEENFA9cM?= =?us-ascii?Q?J7jYeXOfSNQjl2/+HVub36nLokdT8eHmsRnlD4ZK0SR3xU9bdYUNRupH5/VG?= =?us-ascii?Q?KstLL9TpLnbQ0e/Ghthet11iV3H/D2ZeYFnGy512BRCYVW3MFn8I6UPubDz/?= =?us-ascii?Q?G1WiFTPlbZ5nYrlZsEJ7Z1B2AoMoi23wQe5XFgvO0XzZqAowz/Wt60LIxHl3?= =?us-ascii?Q?G4lU1TgpKnTH95etP0i1H/Sdzignn/vpaCmjhq8GhEqx4oJM5MusXA+QdAPB?= =?us-ascii?Q?a3QQ2uAwEI+d+rIuVHwJ+U4TVwhL14sqCfeC2Q?= X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB321;5:TL3lE8cdQGh609IdKWpPPnOyfQSOOHdmq970vNbUYHpYYHYaXHICmc3KugvCM/F/8teesoKZe51NDc6oTBMbJy7jjyxA70GV9O+9y/S6f48yDEQYm6eUJ2ZCuGUp0kg7oS3wnu/AppejK4UzlIx6LA==;24:84Ag6W87OXPIedpnqNSV07zDwwDLIJt0QX02Iw47Ay/IHlNLBzR3L28eqKuyxiby5pQ2NccsXlU6gfwa0IS9sm+iT+RFMoiYGxBV3q3IgtE=;20:HQTuTyJaMDmZsb6F/N7W6lPf2LG5K/ZIBvp51092v2ZfboFfrMsUid+7u09auCDmqdFsOxIoyJMZ/G0KilvmSA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2015 01:52:18.5013 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR03MB321 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4991 Lines: 110 On Fri, Aug 28, 2015 at 09:42:56AM -0500, Nathan Sullivan wrote: > On Fri, Aug 28, 2015 at 09:30:12AM +0800, Peter Chen wrote: > > On Thu, Aug 27, 2015 at 09:33:07AM -0500, Nathan Sullivan wrote: > > > On Thu, Aug 27, 2015 at 01:11:30PM +0530, punnaiah choudary kalluri wrote: > > > > Hi, > > > > > > > > On Thu, Aug 27, 2015 at 10:03 AM, Peter Chen wrote: > > > > > On Thu, Aug 27, 2015 at 10:59:22AM +0530, sundeep subbaraya wrote: > > > > >> Hi, > > > > >> > > > > >> > > > > >> On Wed, Aug 26, 2015 at 8:57 PM, Nathan Sullivan wrote: > > > > >> > The Xilinx Zynq udc does not need the CI_HDRC_DISABLE_STREAMING flag, > > > > >> > unlike the default platform data. Add platform data specific to the > > > > >> > Zynq udc. > > > > >> > > > > > >> > Based on a patch by the same name from the Xilinx vendor tree. > > > > >> > > > > >> I am that Xilinx guy who sent this patch :). It is in Xilinx tree as > > > > >> temporary fix and > > > > >> I did not debug further why UDC works only when streaming is enabled. > > > > >> Probably this is right time to post my question here. > > > > >> I was expecting like: > > > > >> Streaming disabled - both low bandwidth and high bandwidth systems > > > > >> should work fine > > > > >> Streaming enabled - only for high bandwidth systems > > > > >> but this is not the case, Zynq UDC works only when Streaming is enabled. > > > > >> Please correct me if I am wrong. > > > > > > > > > > You are right, stream mode disabled should work at anytime. > > > > > It is so strange why zynq UDC only works when stream mode is enabled. > > > > > > > > I am referring the section 8.5.2 in Synopsys usb 2.0 HS controllervDoc 2.20a, > > > > this is what it says about SDIS (streaming mode disable option) > > > > > > > > Before activating this mode, the user must check if the TX latency > > > > buffers per endpoint are able to > > > > accommodate at least one entire maximum size packet. The RX buffer > > > > size must, at least, double the TX > > > > buffer size per endpoint. To optimize the stream disable performance, > > > > system bus burst must be set as high > > > > as possible. > > > > When the stream disable mode is used, the burst size (VUSB_HS_RX_BURST > > > > and VUSB_HS_TX_BURST) > > > > must be a integer sub-multiple of the latency buffer size > > > > (VUSB_HS_RX_DEPTH for RX buffer and > > > > VUSB_HS_TX_CHAN for the TX buffer). If this is not respected the > > > > controller will not work properly in stream > > > > disable mode. > > > > The stream disable mode should just be used in situations where the > > > > available system bandwidth is low or the > > > > system bus access latency is high, in order to avoid underruns and > > > > overruns in the latency buffers. This works > > > > for all types of endpoints, except for ISO endpoints. > > > > Such a system can't ensure the real time support that the ISO > > > > endpoints require, so the ISO endpoints are not > > > > supported when the SDIS bit is set. > > > > > > > > Definitely we need to root cause why disable streaming mode is not > > > > working for zynq but from controller spec > > > > point of view it is possible that controller not work properly in > > > > stream disable mode. > > > > > > > > Regards, > > > > Punnaiah > > > > > > > > > > Maybe the burst size isn't set correctly by default? It does say the controller > > > won't work correctly with stream disable set and an invalid burst size. Looks > > > like TX and RX burst both default to 16, per the Zynq manual. > > > > > > With the stream disable bit set, the behvior we see on our hardware is > > > that priming just stops, with an outstanding transfer in memory marked > > > active in the status field by the controller. This happens at random, even > > > when doing single transfers at a time like with g_ether set to have a queue > > > size of 1. With SDIS clear everything works great. Given that the Zynq is not > > > bandwidth constrained, it seems like SDIS clear should be the default. > > > > > > > I suspect the possible reason is the tx buffer for each endpoint is > > small (<=512 bytes), so it can't copy one packet (assume max packet size > > for bulk) to tx buffer, then the prime can't be finished. > > > > Would you help to dump the registers HWTXBUF ($BASE + 0x10) and DCCPARAMS > > ($BASE + 124)? > > > > tx buffer size = ((2 ^ HWTXBUF.VUSB_HS_TX_ADD) / DCCPARAMS.DEN) * > > (DWORD_PER_BYTES) > > > > DWORD_PER_BYTES is 4 > > > > -- > > > > Best Regards, > > Peter Chen > > HWTXBUF is 0x80060A10, DCCPARAMS is 0xE0003124. Are you sure you read correct address? Your DCCPARAMS means it is host capable, but not device capable. -- Best Regards, Peter Chen -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/