Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754756AbbIACHk (ORCPT ); Mon, 31 Aug 2015 22:07:40 -0400 Received: from mail-bn1bon0133.outbound.protection.outlook.com ([157.56.111.133]:55921 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753606AbbIACHh (ORCPT ); Mon, 31 Aug 2015 22:07:37 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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: Tue, 1 Sep 2015 08:55:46 +0800 From: Peter Chen To: Nathan Sullivan CC: , , , , , , , , Subject: Re: [PATCH v2 1/2] usb: chipidea: add xilinx zynq platform data Message-ID: <20150901005545.GB10030@shlinux2> References: <1441032592-8121-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: <1441032592-8121-1-git-send-email-nathan.sullivan@ni.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD027;1:H2ne9vKtrZnauzuQAP9begcbqz2eTay46n3Ke5q+vKWRtfXTBmcs4D3PQ3H4F4cAH020/TJ5OZqdeax+sJkMT5P8YLVbrXkDk1C54Nt3UWs4wb9hGOcPikbuMvc9gtJ3l/OllivUNGcoDQvLdfwaLtaMKVq9+goRlnjfje+PlQxpRJfJ50M+hG3PkXtvoWV5qHrCU1AUXPR5lkETAMgjwxn5UyCqCdseocxVj0p7LD52VYwNPobDxobIaFbWFlVw1ywRZJ+eG9atS7v4V0TCzcLgHHAGDHLP7s3Xn6aP3RcDpVePB5RMr7XO8RLroO8cNa1D+2v+ML7G62s8kISykfvnkK24O8deGCDhmZvuh1wKnd0KFiGXgvvPttWFSv3gmdUsOexdPBn+hCWN2uIwJaVMWlAXJJD3mvaHAnukV94= X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(339900001)(3050300001)(199003)(24454002)(164054003)(189002)(97736004)(4001540100001)(33716001)(77096005)(83506001)(46102003)(54356999)(92566002)(69596002)(68736005)(86362001)(46406003)(106466001)(6806004)(104016003)(4001350100001)(19580395003)(87936001)(97756001)(64706001)(81156007)(19580405001)(77156002)(5007970100001)(105606002)(33656002)(5001860100001)(2950100001)(76176999)(47776003)(23726002)(189998001)(85426001)(5001830100001)(50466002)(5001960100002)(50986999)(62966003)(110136002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR03MB489;H:az84smr01.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB489;2:gCSSWRk0kwwp25+j416qB7MVFoRAmPOfP8wVW9jD1IpzDXde2+FCrRxl6GzHYVecKdveatYiADXSAKd6tUndG0p72htq9syhkOI7E/sxLc02h06jI2WmYCHLy5WddXx0peKDvVa8lLpdS9s1pbnia/N8TiEolR2IU7Lh2R9/qP8=;3:SEgsQmXHfn93a3NTNIiDWgsl8l0nIJFvsEPCJIUcK8xQrKi0s2yVx0YOzDqOsBkXmcXgfoXlU1AL066y0P+yxl7Tuv+tWPJrc6RlulogvWrr8rTJU/iEno5479hQ6LQYx9kzIidKDOUm4862+zQk6tUG0hD70W51awRo41EdpvVuJCxf/PxzWoE8NU9s5iBDbPW0eCz/pXT0eJhmnFJsOktJTVLs4Fdov+GwUstKG1k=;25:+DTPtREeie7w/TSFesrdMzPdvLMGsn/5SuJSb/k0OUtJtkHWHv1Ace3jZTOp9xBN6QLM8t5JSuBo42jodmaHXyeIOh3YgToc1fxsMsIj+vknVzYctEkUxOVR5laSDuelNIgewmchSS3nDVtFxktKdzVFrG1t5bfJhRA1A3IbEsd8EPUohfBwR1P9V1T/yKTZWoXl8WNqiQKoJzgLCPE3czf8N1lRaQmS7dntIvViAOs6TT2A6u8dpcUiDUZNQyfF X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB489; X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB489;20:H6kP2jeE3d/s5Q4C0n+ln0rhOacssiHUUmi68PmkWXoEH8NwMMII43rwPW+S66xHFjeK8ER8M332c/vlmQIyGSs8co9Kw1ZRVzQe854J2RdJ1hi1ttTYcNKhsaTWN+DgNqEjnVxxQugl0BKB527w9tPM+S1nJ5D/SwwhiTM0NXeXhK2kruXMRqIU7R8DOL4E1yaVSotIpzBThUlFJVy1imopWzjHczwR88RkFuROvmTrAkWXbKHa0de7Rv3MLgSFC5TJW6wydZ9Z5HYv/mVT+woobck9T46QdnUqesDPZG7X9tm7gHaNnOhBNE/CUZw6cNZlN2Y2iCCuNm58nmhrm+NXUEQqtiAPuP3CvvdA1tQ=;4:OiCAr/JWvfZZouTOEPqlYTg8kRZSnkYKmZ+Wrg9Xl7XtiD6kX5C2cbVMwPUk0A9Se1jFfGz6JuMCSN9duoItKngEsngRKRkXVVwCFAyaOg7cbiohL2Kgkua4OqusiW5gLUxe3qO4swvyYKutX7/8T93nnTEh5jKPFu8P9vG5sH5GZ1BuuwoUVnyd/uNo8igiiTnR9/noIChTtwDvJ55o0iVrDeZlY1A8Z2ucbWec44IFMXUMymEzHsKGiQjeJRSYDnS+1qFGZgxFQHh8KQ3JSvQzaP6TRqBe5Etn/gdSCESCmUVAcBeLKA17h8jYMmsP 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:BY2PR03MB489;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB489; X-Forefront-PRVS: 06860EDC7B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR03MB489;23:92K906sL4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ii?Q?6jQgokaPGLZF+MnkGWho3np/drPr2CiAGHo1zKMPi3+4QJK2WOUWvtqrywwR?= =?us-ascii?Q?cmixZUIl7GapjuUiOdJi6LquMH2tFj0/2Vw4uxVjsTLHAE0Mc06ziY3TIwD0?= =?us-ascii?Q?ZleoZmum4NqdIA1APMUieuPZVRsnAP32st97NKGfrqXqWL/gBcbqOf/DgQnv?= =?us-ascii?Q?mXfymoEVE74bZFGKSNc6qSU6EvXkX3H4+oR9SEU2oa1ZzEYVl2RJJyMMU08P?= =?us-ascii?Q?UZ8/DsJtzS4mSbeYHmKwwhQzp8shhAg9+PWDJoS74wR9xPaZnvpAYANaj7Ef?= =?us-ascii?Q?MC2+OYv2PA6FrMWav5oNplRx864quoUqLZ7cSWkuE8kbZcPQf+wQz1qq8hR/?= =?us-ascii?Q?BDMhnrTwDxs6/fCM8=3D?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR03MB489;5:pGNcvzQJrtRTLOlnXCAQ4vXA68NB5P+VcvrtD5LCXtD1y+svPMsL9+OwPgyUjF+LgsLrvKjx41yjJY4fS4D22QuUheZrZ/fLpy8HL+WJhIiXmLf7oCFW4+JhYE7WdAfX8fy3EPUaBr1JUfoBLYntqg==;24:GxqP4l0/vF6GKhKSA/sSU6fPes3CDTzYi0jwCWsGFUPGlFoU01tTlud37wMOzsdqILkbNghOXe+0ZIKuJmVurAsztBQvCbuOY3yeYAnk8b8=;20:D49K4akBuMYCz+yhP6x/5bKoMSr9XIX+tNEEgqBWC2GI1fXlAxTty3URIecv2VAmKiOkxL4gW2R6AXKqaH10aA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2015 02:07:32.7706 (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.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB489 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3150 Lines: 94 On Mon, Aug 31, 2015 at 09:49:51AM -0500, Nathan Sullivan wrote: > Due to having hardware tx buffers less than 512 bytes in size, streaming > must be enabled on the Zynq for the udc to work at all. Add platform data > specific to the Zynq udc, which does not set the CI_HDRC_DISABLE_STREAMING > flag. > > Based on a patch by the same name from the Xilinx vendor tree. > > Signed-off-by: Nathan Sullivan > --- > Changes from v1 - better describe the issue in the description, the root cause > is that the Zynq hardware does not have big enough tx buffers to hold entire > packets, so streaming must be on. > --- > 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 > Thanks, I will queue it, and send it as bug fix for v4.3 -- 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/