From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754752AbcE0NfB (ORCPT ); Fri, 27 May 2016 09:35:01 -0400 Received: from mga02.intel.com ([134.134.136.20]:30141 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754667AbcE0Ne7 (ORCPT ); Fri, 27 May 2016 09:34:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,374,1459839600"; d="asc'?scan'208";a="816088850" From: Felipe Balbi To: Leo Li Cc: Rajesh Bhagat , "linux-usb\@vger.kernel.org" , lkml , Greg Kroah-Hartman , Li Yang , sriram.dash@nxp.com Subject: Re: [PATCH] drivers: usb: dwc3 : Configure DMA properties and ops from DT In-Reply-To: References: <1462333318-29772-1-git-send-email-rajesh.bhagat@nxp.com> <874maefe6h.fsf@intel.com> <871t4pqkzr.fsf@linux.intel.com> User-Agent: Notmuch/0.22+11~g124a67e (http://notmuchmail.org) Emacs/25.0.93.2 (x86_64-pc-linux-gnu) Date: Fri, 27 May 2016 16:32:22 +0300 Message-ID: <874m9jpqxl.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Leo Li writes: >> Leo Li writes: >>>>> On certain platforms (e.g. ARM64) the dma_ops needs to be explicitly = set >>>>> to be able to do DMA allocations, so use the of_dma_configure() helper >>>>> to populate the dma properties and assign an appropriate dma_ops. >>>>> >>>>> Signed-off-by: Rajesh Bhagat >>>>> Reviewed-by: Yang-Leo Li >>>> >>>> Cool, nxp is also using dwc3 :-) C'mon Rajesh, send us a glue layer :) >>>> >>>>> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c >>>>> index c679f63..4d5b783 100644 >>>>> --- a/drivers/usb/dwc3/host.c >>>>> +++ b/drivers/usb/dwc3/host.c >>>>> @@ -17,6 +17,7 @@ >>>>> >>>>> #include >>>>> #include >>>>> +#include >>>>> >>>>> #include "core.h" >>>>> >>>>> @@ -32,6 +33,9 @@ int dwc3_host_init(struct dwc3 *dwc) >>>>> return -ENOMEM; >>>>> } >>>>> >>>>> + if (IS_ENABLED(CONFIG_OF) && dwc->dev->of_node) >>>>> + of_dma_configure(&xhci->dev, dwc->dev->of_node); >>>> >>>> okay, so we have a long discussion about this going on. You can catch = up >>>> with it starting here: >>>> >>>> http://marc.info/?i=3D1461612094-30939-1-git-send-email-grygorii.stras= hko@ti.com >>>> >>>> At least for now, this patch will be applied. We need to have a better >>>> solution for this, one that helps not only DT platforms. >>> >>> Balbi, >>> >>> Has the patch from Grygorii been applied? I don't see it in the >>> mainline tree yet. Without fix, the dwc3 driver will fail for all >>> ARM64 SoCs. >> >> right, it's still broken. But we don't want something that fixes only >> OF, right? dwc3 is also broken for PCI when IOMMU is enabled. It breaks >> for the same reasons. >> >> We really need a way to inherit DMA bits from parent device here. > > I agree with your proposal, but the original discussion seems to be on > halt right now. If it need more time to get to an agreement on proper > fix, probably it's better to have a temporary fix right now to make > the driver working again. if it temporarily solves all users, sure. But if temporarily solves the problem for just a subset of the users, then that subset will stop thinking about the solution while the other subset is left alone thinking about it. Sorry, but I prefer to get this sorted out for everybody, rather than for one subset of users. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXSExmAAoJEIaOsuA1yqREVmQQAIcLC/aN9LQhWbIfDI0A5O0T 4yeuKPyXQUnnwOGug1yDag8qF70Ba2LIcl2BU8yrsKE3+T19NY6cJLreqMeUhgrM hWPTiNh1EPl+48QCqkqCvODsBhtt46gzp0KvSGox0hkNfvunBpSBprtaMNRHJ4ho XN1/aJJc53BpcRGBKuqqFLJqtIF6HAPckUctlnQjHTs4/LOgQpFy6G3oJJbwhRxd MDo/1Jzi/fmGOMrLp6qxdfBbMdrMbhv3ETFjBG6XSNaNVUA+N7WCkkqvwnPBdatd tQrJbAL6G2Rb1/6NWQ/JPiY6xiGGlgUKmBNmaRxGHnkxuW/HcfH5iL/cK6RmO6ic 5tjGjouKxHijsS+AY39UYy+yQLCXHTQNcWY2m9+22p4cywsy2+QgUoLk5u5ImxGA 86sLWLrLeSTDdqDyWrL0yVGHDWoJdRrOddv/zWIWpJCQWDVAmvl4zFseJwkwGnVO m4XJ8cfle4ymOj/2zXlSjmWs4YfKWvEaBbcHNjIllZg5cvWEfZmt4l1ewkunQ7vv 1jaVHmAhZwm3tQuTPsioLpJeUPg0LCXpglZrYyJ++cL1z0BODTJCfe6hps4VrQm5 mhsX9b882aijfBm5o3UMKo6QOq/WUoFZq1+HfL/+l0d/keIkZ0JvjH8y7A4LAeuv 4DMlJn1S5XK7uc/9VZnb =eD9g -----END PGP SIGNATURE----- --=-=-=--