Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752970AbbH0F7q (ORCPT ); Thu, 27 Aug 2015 01:59:46 -0400 Received: from mail-bl2on0110.outbound.protection.outlook.com ([65.55.169.110]:44400 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751285AbbH0F7p (ORCPT ); Thu, 27 Aug 2015 01:59:45 -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: Thu, 27 Aug 2015 12:33:40 +0800 From: Peter Chen To: sundeep subbaraya CC: Nathan Sullivan , Subbaraya Sundeep Bhatta , , , "Mark Rutland" , , , 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: <20150827043339.GA29157@shlinux2> References: <1440602865-30468-1-git-send-email-nathan.sullivan@ni.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC012;1:zHPQ2HZnywUew0gNGvlxRC9rawO1UW4GR+gh6susqfQRV4pvnniNWxKFvHoQRDQ26ZzwdmRHMg41dC588CNMYcbFuMg5mIeQ+KITFX+ELoycvv3oZRcbrl65EfQLpCcu0ovnx1XVoLXEb1GM+imK7HTAKaC0rGjzdaQu8Wd9SILPjn0rCW3rujfoeBLahajUXYQiuaVKswnYFOEFbw6u+g6/mDEp9FLdfgYOUQGe5sZxXIjAbFhMDPXcCtKKofZ2V+INRFWSSa4myE6sk3+rLO9s36e/4/THF5GQBEB4M9hNT6ZU6DvdWgIIziiHAuyJSo4x7fqa9T51LVDtesCGIBAwavdAqVHzNUVW2Wb3zcXRiB1kdUjQyW9ECRWf0Mtm19BOc7xgCYC2e52n3/bvqw== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(199003)(377454003)(164054003)(189002)(24454002)(97756001)(47776003)(104016003)(33656002)(33716001)(77156002)(5001920100001)(106466001)(5001960100002)(83506001)(4001540100001)(46406003)(81156007)(5001830100001)(2950100001)(23726002)(97736004)(5007970100001)(110136002)(15975445007)(4001350100001)(189998001)(50466002)(86362001)(76176999)(105606002)(92566002)(62966003)(77096005)(50986999)(64706001)(87936001)(6806004)(19580395003)(5001860100001)(68736005)(46102003)(85426001)(54356999)(19580405001)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR03MB481;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB481;2:nqGy9jtyEr90DH+/9ECjL3K8L2tVz3DOScp7EvR8Wvc4nKhLqrBJvhsYNzPsgSjc+83MBBZa0UU4+eanAlkpFl3tSpyWCUt4KFZ/jfq8z4ZSWwM78TQ6VU3W3/Sd7l9mwNJzOiO/bedqiEOW0B6WN0KscHzyug5si68DMcYxNBE=;3:McdSaO2mF2BJGIUxpYEWHgrvEGAQ0NujGFkrxDsbSNCQAfUxYokcmIygLRbP4f+LiJWPKAod/Q7FQsy+/pt/eW3ch8APMiMl5m8149tWoTlYV+yZBCUW85LLmhn/k8TD1Y5m8xFlRE/N35YmoVCyb+67q9ZGTR2ZyLXuBxqpBIkFcLNNWmAzJeCUadyc8F0MLb2fJwyM5kenV5CERNb9fGE/ljn7sTHZXPXMbsDrhl6VoyosDXnkJOQt05F3MjH0c6GQW7idocmv5SfC3QjTvA==;25:HqBN1BPab4EuM3I6oFzjV1BVbedx7w0jF/2ho7DXUr9GQ/gtQnBo04BQgUO3HpOqLo87dIq8+2Q07EXnWdiMGCOkc8qMSBq34Qjv1qDhKjI5nUzT69CB6HgcxyBDMtFRS6spdfUmMCuTxXliNNPnRrZHTD16oPIq/lrpMfzdFgFDQkiJPdFsODYpcDk+hif7Q76qmjtpru2AiOqp/fmlk1Z8r9JdAEA/lcd+k7hEJ1hxg4VBHZJ9hMOASf462opuyoUtDGDFO1xMaZPenCJv1g== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(42134001)(42139001);SRVR:BL2PR03MB481; X-Microsoft-Exchange-Diagnostics: 1;BL2PR03MB481;20:oZf8eneOsSg1wHABBIWlhuwrJStR5vrdSeoA+cee53Vk7yz27y1ittFgAClzXELAyKHK02obgSnJmle68JhsUj1lq6sjvzoSUcS0OlZX7uIPD7yni40eanLko+otMY/MTzZ8ucy2YTN4ps1HaaBSAJF+On1Ga/UqV4bT+OJIlwPF1/cA/lNM3fcz5YepL315RyYSQwj7sexor4WrxCmLjkRz+QoEwd71mgKW36g0k6MhE+0Lt1L12OiJs/6JyiChEtdHaFKDWZdtGU7UgMlfrAiIZFU5JrxChNG6xEAyUG1wfhct7Lja9BPzIriZBTn8+8HfkcSVlV5HWFE42dWKQ5jjL/wp+GTh1zXpAxYTVJs=;4:l3OHWi1eHIqjzX4eZTP1ogDgdt8va+tpLknUYx3v0TN0zGjirE+ItCgCMCH+aq9TxJDFOzqTqtWQAgQ9+/4B/8Ieic6K7+eKaA7pqCwvnTRf2G7hb6CZ2o9t2AC5T+VtkwH4gcak5aRWf6fLIAVvPpYf58HNsk150/sg0nP39ssK3EoBGbIwJtSwnkegCdzX/VY4AiHoysjdoC+Bjd2pSrQjOqu3og70Nfqu5iBouOcWUNva/9LE0BcU3PPiUY1zIvWfD+pn3bQjKo9qP7gXEH2pABGf1nPOMBrFY+PTd+spiLTKnOXIpWiW7/JdDNI0 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:BL2PR03MB481;BCL:0;PCL:0;RULEID:;SRVR:BL2PR03MB481; X-Forefront-PRVS: 06818431B9 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BL2PR03MB481;23:FcyATVt6KzJtfHsKu8ARI14bzk1XSou4a7q/gHH6D5?= =?us-ascii?Q?imyrMNrFMsDInBlbGVwxn80tS7IHBR4LXYWnEIxpvyDMy4LqD4Zvd1AVP0UK?= =?us-ascii?Q?blP8NJBoHLejFxVNASq7fijKrDDwEd6tAjHQUaycuIoFGu0CRYlAAs+j8VlL?= =?us-ascii?Q?qpm04LeAilYeSmTOiBBfLhsa7EXaCmjyK6DbWF9W7WivDR/s2zjROFiGQEB+?= =?us-ascii?Q?iPlZbI012IJyiLvKJqRs0qx1TCZSgi+rVeNy/O2Ch2t6kIPim5rluGdyuF7f?= =?us-ascii?Q?fEtuuV7awHlugHOVFq15R0fA/UTwUi9Aj99hJuqKeHFOKPiMDCygHBc8H12i?= =?us-ascii?Q?1hOWXyjHOOBDwDTUXmD1jZJA5t4+ocUsioqaZ45JHFsTGZqwyIT47b3uoZrU?= =?us-ascii?Q?MCqnSh0stSM0k4xwWtkBCm0hSwlYZ1+s65Toy4I5A22HVgl5g41jv8olgofi?= =?us-ascii?Q?pDLMXrN+N7LrTKt0UVSxnSKGd2JK1DrVpPHQC8wFsyIjGw1Mmszgrp0tFwrI?= =?us-ascii?Q?1SXmS28F3mnX4pE/nhgjbMy8MwIffLRpZ4plQ1R5p7LQcg8uSdNiCAfJeL8f?= =?us-ascii?Q?cnb5up32gCUcjcmKbwVEKSiJ0Mer13aJ52RqCqIssSoj8WiXvSxc9yqmtPJZ?= =?us-ascii?Q?1DJtk2MawMKSOEkRp6gh5koTtmCnyiWFwsvecZnpdeKnqDTM36NvAMPZ2kUy?= =?us-ascii?Q?hTvpom/Q1wgX/N88KgQHlVwLqsvic1gxg7IVQpikB6gt3qXVjCiM+C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kqLNJN0RmRcnvqaWP/W/+XgOJKtf5I3w== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2015 05:45:11.9134 (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: BL2PR03MB481 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4184 Lines: 116 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. Peter > > Thanks, > Sundeep > > > > > Signed-off-by: Nathan Sullivan > > --- > > drivers/usb/chipidea/ci_hdrc_usb2.c | 25 +++++++++++++++++++------ > > 1 file changed, 19 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/usb/chipidea/ci_hdrc_usb2.c b/drivers/usb/chipidea/ci_hdrc_usb2.c > > index 9eae1a1..4456d2c 100644 > > --- a/drivers/usb/chipidea/ci_hdrc_usb2.c > > +++ b/drivers/usb/chipidea/ci_hdrc_usb2.c > > @@ -12,6 +12,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -30,18 +31,36 @@ static const struct ci_hdrc_platform_data ci_default_pdata = { > > .flags = CI_HDRC_DISABLE_STREAMING, > > }; > > > > +static struct ci_hdrc_platform_data ci_zynq_pdata = { > > + .capoffset = DEF_CAPOFFSET, > > +}; > > + > > +static const struct of_device_id ci_hdrc_usb2_of_match[] = { > > + { .compatible = "chipidea,usb2"}, > > + { .compatible = "xlnx,zynq-usb-2.20a", .data = &ci_zynq_pdata}, > > + { } > > +}; > > +MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match); > > + > > static int ci_hdrc_usb2_probe(struct platform_device *pdev) > > { > > struct device *dev = &pdev->dev; > > struct ci_hdrc_usb2_priv *priv; > > struct ci_hdrc_platform_data *ci_pdata = dev_get_platdata(dev); > > int ret; > > + const struct of_device_id *match; > > > > if (!ci_pdata) { > > ci_pdata = devm_kmalloc(dev, sizeof(*ci_pdata), GFP_KERNEL); > > *ci_pdata = ci_default_pdata; /* struct copy */ > > } > > > > + match = of_match_device(ci_hdrc_usb2_of_match, &pdev->dev); > > + if (match && match->data) { > > + /* struct copy */ > > + *ci_pdata = *(struct ci_hdrc_platform_data *)match->data; > > + } > > + > > priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > > if (!priv) > > return -ENOMEM; > > @@ -96,12 +115,6 @@ static int ci_hdrc_usb2_remove(struct platform_device *pdev) > > return 0; > > } > > > > -static const struct of_device_id ci_hdrc_usb2_of_match[] = { > > - { .compatible = "chipidea,usb2" }, > > - { } > > -}; > > -MODULE_DEVICE_TABLE(of, ci_hdrc_usb2_of_match); > > - > > static struct platform_driver ci_hdrc_usb2_driver = { > > .probe = ci_hdrc_usb2_probe, > > .remove = ci_hdrc_usb2_remove, > > -- > > 1.7.10.4 > > > > -- > > 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/ -- 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/