Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752135AbbHaDrz (ORCPT ); Sun, 30 Aug 2015 23:47:55 -0400 Received: from mail-bn1bon0130.outbound.protection.outlook.com ([157.56.111.130]:15040 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751160AbbHaDrw (ORCPT ); Sun, 30 Aug 2015 23:47:52 -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 10:36:06 +0800 From: Peter Chen To: Nathan Sullivan CC: , , , , , , , , Subject: Re: [PATCH 1/2] usb: chipidea: add xilinx zynq platform data Message-ID: <20150831023605.GD25516@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: <1440602865-30468-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;BY2FFO11FD030;1:CKawQ3jsWCblr0xs1l+TEBmvoSlGv5FXG7oniRBCj7QlXoiIL10UiDL2dZHYsavLwuvH4UZlBGDK3BWap6Apwi8WpCfmd47WbDi0uGCjGllckd0iu9J7AEON+OXcuHluoLRm2MQqr/PQ+NlPN+TrHG/pk6ppLdvEoi5LwOOiK1kktxHijE8WENy75LaWV3P43owYSUeP7uhc9mDN3PeiJ4bBjRCaVlZmnwdx2a8rV2teWk/YwqagwleFrZPLIsEweXLoxnjJgITiRMWW+KTATNerXrxS+MURCs3iw22nhD+sS5TAJ+5qWcuPdQMaHSX5OTuxDuL+A8LM8MBBsBvlE4Au/S/fy5AilAXc7DynBZ3Po7C2JvbeiUUEd7VqlnOS8fOvt1Nu35+2l60HlmMW9A== X-Forefront-Antispam-Report: CIP:192.88.168.50;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(3050300001)(339900001)(24454002)(189002)(199003)(46406003)(50986999)(189998001)(23726002)(47776003)(77096005)(68736005)(19580395003)(6806004)(19580405001)(50466002)(81156007)(97736004)(4001540100001)(4001350100001)(76176999)(54356999)(104016003)(97756001)(87936001)(105606002)(33716001)(106466001)(5007970100001)(86362001)(62966003)(77156002)(110136002)(85426001)(5001860100001)(5001830100001)(5001960100002)(33656002)(64706001)(83506001)(92566002)(46102003)(2950100001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR03MB336;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB336;2:K8yk466etsOgYelAZu3PtJUJic6YtMrBnEU3p4AswbtZyMHNXiDL7F2bw/XosAvTGhCXxIJtFhKiCgqWb/zW4co8VcRjfl11hCISb07p+2ieq4iE31zQZCX4S+FuEsVjubPsBny6F5ZvsFGkgYuRUjKHwMFEOLoWFaEpg/1VcU0=;3:oNcJOt+ykD1SbHFU3Un6BQWrCFUOuoIWU5iO3WZOmTUloi4HIx8h4rsIRIo/y56fVzPWg4GU3OoSmHvXF/wOu1WWvpg78i21SFdPv28gh3LaoqIqeqCMA2pcj6tMjyMZrJZsc6fUH12pJ3SWsrmEiD1WeEEv+FG5lhklXXkNdvJun0i8ZQxo8QrIhOkcZuXfR5l+RlPilGgn/Vqiz7LjDi6yKh1VpORR4k85WPFZiQs=;25:UVRMeRbwMKZJLkfjCjF32zu4rx4De8LFp96P0HHWJAfXxSHoPcfgoCLC6PFZMLfqD2OSa5SLfwGsE8gO1yVfvfWsN/Am1JrH15GeVrhv9ag/BkKa/0fwdNCF27JlW4P7WVxnpzReqIt3oPNVEPfvJ7X9tgS1cu99+siHFW3zlMC8mQt4BnHoiLAcJQwfu67G4W31kgdRrQ5I3/j3qK7WHojFLMcYU3f7MtNN3oGRjalFhGdZyTwzOBcBeFW/BTqZ X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB336; X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB336;20:LL1qVNlc9j1wihyxuWtjodw0c3qSqZOsmiiCPvtKdNMoastyJKpfj+SPjxeHW8yXlYLoN38w9CREeMs0xk13nQ/1O3sw66ayy456dRvUk+ReJAxuVsHx56jL9Zpuu4D7FJNOPCjcTF7abnUN6UYzmR9b0CaryJWRyKofWvNZ/vR6dB5HshbXAH91uXz/d2PQOZbkp5phO4s1iCmH6klmQ2mSFFHmBEfmyP03L2CZFPeu+Rftc6HS/d4QOxoYlFlb5SkT50pOqnJAjTGY0KL4CnIHCqGCp17YB+cxJjuh96gEZoDo/qnP/pkIvWzGJQaL4pEh0LvsMgXj1gTyUSQy6mfaWX1eyaRCUi/vRuxCDB4=;4:Z9FFSs1liv2XtPLH+C6WTBT7PGYiEp3zvdDV8JivmYVqQI5OO4ESA7o5bmWJeiMZmk7ennklSsV2eE5xa0z+L1rNf+JXBSq5Dcdstn55NAiAP192m+Zg8YbTP74Adh/oDBAs57Pggwsvpy7nOJ511WVX9MVbChE3KmCWzqEpdFkRyIHZNj4G7MlfN6KlTYOcHfX9T6S65a/V9R6ErRYFYemvr1hQALvi4amVY42GdXtxP0rLGDnvk01zQLEjYKY0NeR5qeUTQizUlJV6qyw3YYr/l0ccXD162Ggfm2+08YbfWrwX7Zo92N5HB/Gz9N5u X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:DM2PR03MB336;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB336; X-Forefront-PRVS: 0685122203 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DM2PR03MB336;23:+uiOdyOAa17C1t5cYYrT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9p1x3ZsxmYBh6ppBUb80o8fq3yoeaRpb+fcPg47z4Fmzr3QCA/Pem?= =?us-ascii?Q?A4Mk4u9vuH3zH7BPqmpQphESiNpJwaIQ6IoiOOXhShhukwZMYKNSWUdk1cls?= =?us-ascii?Q?8Tk9HMNsOPCYvqfdELO3yK+hsQaOorFy63LoCQCDaRPfbkvAuhkVWDMm9ADo?= =?us-ascii?Q?ifkPq8cNrXcTsYbSFgtivTJyP3TSn1gAkxnFj4AdN/egPKDXTA2PPhzp4EES?= =?us-ascii?Q?QlhK3wkwf0HpZiAvyiUSq42qo3FH0AfQqZfrkAz8etfxSZigQtcTt4gdN5Gn?= =?us-ascii?Q?EI21vaK/JiupIei4NsSQmy00dM9Tl7GJWF?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR03MB336;5:jHA7AMJUdpBpUtDqIKiXlWeruYIPRP7QnoayhcnzqgAPsyVV566MarNLO6DiWscqfoClo1y8tphESP40G8NAUzbJbiveG39Q8Mb7MP4Cr8TMSJyTU9zaWCG3uNsCXWPmXnB2odgu9f6rwOBoXZwghA==;24:MUKksfyF0XKEDfjBWJyiYTquCJDgm0p0KbtYV14fmstILAhT8KZLJHcjcL9apJh+PWL5e0ZzKjh9UCfd+X/1Emis1KZBSViZehbDto0wnKk=;20:xObf+B/Io21MZF3SxYt2gh44uNprhIAA1CIByEc2MMP0oqxUWkdc5IM80KvYAmefnf0upIDTdFbi/AWRgvPbSA== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2015 03:47:49.4493 (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: DM2PR03MB336 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2888 Lines: 92 On Wed, Aug 26, 2015 at 10:27:44AM -0500, 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. > You may add the possible reason, eg, tx buffer is not enough. Others are ok. > Based on a patch by the same name from the Xilinx vendor tree. > > 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 > -- 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/