From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753328AbcEZIdM (ORCPT ); Thu, 26 May 2016 04:33:12 -0400 Received: from mga01.intel.com ([192.55.52.88]:18976 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776AbcEZIdJ (ORCPT ); Thu, 26 May 2016 04:33:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,367,1459839600"; d="asc'?scan'208";a="985035085" 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> User-Agent: Notmuch/0.22+11~g124a67e (http://notmuchmail.org) Emacs/25.0.93.2 (x86_64-pc-linux-gnu) Date: Thu, 26 May 2016 11:30:48 +0300 Message-ID: <871t4pqkzr.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: >>> 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.strashk= o@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. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXRrQ4AAoJEIaOsuA1yqREAlcP/1giMoNZ2ELx6jUMnZu8rQP+ jSWQCDy2C8PKso6nLUSCzAWDWS/Ac2sLdj43nYcb7Ogc8vpeFFEyA4Ru9avc+QtD mU2C5qJ+hRLAP2p+oiZP9gg/K5Mdx99JVC3MnVR3ADzZVsLgo/naa6e7yKD0MrU7 ytdUxUrleg831dR8sN3glEh+8YD9G5TQkWgAESQyOzFplof6RBkolDJ9PjBijbfT qRf5WGtQchQXDSEAsMZC22Jg9th89eJYwzXvxFg1vaIETEVt2Xi1hrEPJdLw4iVT 5DONc0WpCO3uE9+KqzMDb55OGPZkJAj+o54L4W2tElU3i0q8FMtgY8FFqVUYkAyn mV4ZFT5qMKt6+OIAIbTYdxErREZqGzYASqr9WBWDVv05CuiiIkVE1avxM4JFqUsU XtddsjJ1DTREq1soU6nxPJ7NwuZRPl/pY9N+oHuEGLgzEk5HcafMyUQkPmgPJ54B LUDyR3qA/wahH9isAmakhm2o8Jsy6Dsf1FiXm3LfiH50Z6rgCg+8L7sKl6wplnAN ewFudQEBwEMNASyHe6T2bF8HkHEA0SXiGKoygXiDISoJcup7AZq6Pywn4FdinQNU CrdtCBwxT+HvJ/9fiwoE4Wtcv8mXg/9HnpdbXY5A358FPLJ1r7oYR6Mz0p+FECCT FLsl+24obtSef3zyEbBT =Ea/2 -----END PGP SIGNATURE----- --=-=-=--