From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757416AbcIGKsA (ORCPT ); Wed, 7 Sep 2016 06:48:00 -0400 Received: from mga03.intel.com ([134.134.136.65]:9105 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756853AbcIGKr6 (ORCPT ); Wed, 7 Sep 2016 06:47:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,296,1470726000"; d="asc'?scan'208";a="1052524985" From: Felipe Balbi To: Robin Murphy , Peter Chen , Arnd Bergmann Cc: Grygorii Strashko , Russell King - ARM Linux , Catalin Marinas , Yoshihiro Shimoda , "linux-usb\@vger.kernel.org" , Sekhar Nori , lkml , Stuart Yoder , Scott Wood , David Fisher , "Thang Q. Nguyen" , Leo Li , Greg Kroah-Hartman , Alan Stern , "linux-arm-kernel\@lists.infradead.org" , Lorenzo Pieralisi Subject: Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev In-Reply-To: <75ca65eb-e8c4-bc3f-e00b-b0cba46d28c6@arm.com> References: <5844875.KucAoPMrXi@wuerfel> <20160907063313.GA13903@b29397-desktop> <12021424.cItk3A7CfE@wuerfel> <20160907095549.GD13903@b29397-desktop> <75ca65eb-e8c4-bc3f-e00b-b0cba46d28c6@arm.com> User-Agent: Notmuch/0.22.1+63~g994277e (https://notmuchmail.org) Emacs/25.1.3 (x86_64-pc-linux-gnu) Date: Wed, 07 Sep 2016 13:47:22 +0300 Message-ID: <874m5skmv9.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, Robin Murphy writes: > On 07/09/16 10:55, Peter Chen wrote: > [...] >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(= ), >>> I think we should replace=20 >>> >>> pdev->dev.dma_mask =3D dev->dma_mask; >>> pdev->dev.dma_parms =3D dev->dma_parms; >>> dma_set_coherent_mask(&pdev->dev, dev->coherent_dma_mask); >>> >>> with of_dma_configure(), which has the chance to configure more than >>> just those three, as the dma API might look into different aspects: >>> >>> - iommu specific configuration >>> - cache coherency information >>> - bus type >>> - dma offset >>> - dma_map_ops pointer >>> >>> We try to handle everything in of_dma_configure() at configuration >>> time, and that would be the place to add anything else that we might >>> need in the future. >>> >>=20 >> Yes, I agree with you, but just like Felipe mentioned, we also need to >> consider PCI device, can we do something like gpiod_get_index does? Are >> there any similar APIs like of_dma_configure for ACPI? > > Not yet, but Lorenzo has one in progress[1], primarily for the sake of > abstracting away the IOMMU configuration. > > Robin. > > [1]:http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1209911.h= tml not exported for drivers to use. If Lorenzo is trying to making a matching API for ACPI systems, then it needs to follow what of_dma_configure() is doing, and add an EXPORT_SYMBOL_GPL() =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJXz/A6AAoJEMy+uJnhGpkGM5EQAIA6RTzJufv7kYhrOeQBMCht TYdv2AxaD5mPLwAecGdlaUMWfEl9FiShtY7kIYw+nF5OxBQzhhTmuU9iFzW5XkzI qd7H1iCjdabCfyFiKwLWNeHK2mcw+9R+o2pCStV2b//OC4eMRa3eThmIWTcGKUx1 gX4FJ1qvEhMhgXglCqD4i9HQKCQEsdYSxOzFyYAuC9z+HQPbjLcrJre04mLBSeak dzUx7yernRkrgQA7kPvFvYzF2yGPd8xutZ71zjB4LjYWPPr6ErU5jO3EBxaPJPxl +vg1CHlloiR3MaRoKnOJ1cJqD1lEYn98XZmwsYboTUUG2nYcLep3t/SSgrPLu7ma muoKFMzMZ+86i9NqNrHBezAGQoFVoDe77mYQ6IpsLXqlgDEXqjqWq//alWtlFBLP 8oUkT9nmLl46GVrMdEdsV4kc0QC7wnGj2BxgREIjqyZSLE/U0loYKu03jnYfAp/V EOw1veuM7FFGOXitvpTDiistkG2pjpNnBz4FFu1toI9puK4HBZF0/70pmZDjlcfu JT7uJu+fjlkmwlZ35Y0XA+MmICxcyM8HH3RNXmVG21ACZWXWB0kPw7u3qljCx/6L RvG9V5wXvJUUOIak6tLRzl2KQbJHX5EDQ71cdR/6ApErxRUgmV8iFaK+bMOScKTT V7r8y/sTn2gBi0FQ3Zjb =pto6 -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: balbi@kernel.org (Felipe Balbi) Date: Wed, 07 Sep 2016 13:47:22 +0300 Subject: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev In-Reply-To: <75ca65eb-e8c4-bc3f-e00b-b0cba46d28c6@arm.com> References: <5844875.KucAoPMrXi@wuerfel> <20160907063313.GA13903@b29397-desktop> <12021424.cItk3A7CfE@wuerfel> <20160907095549.GD13903@b29397-desktop> <75ca65eb-e8c4-bc3f-e00b-b0cba46d28c6@arm.com> Message-ID: <874m5skmv9.fsf@linux.intel.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, Robin Murphy writes: > On 07/09/16 10:55, Peter Chen wrote: > [...] >>> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >>> I think we should replace >>> >>> pdev->dev.dma_mask = dev->dma_mask; >>> pdev->dev.dma_parms = dev->dma_parms; >>> dma_set_coherent_mask(&pdev->dev, dev->coherent_dma_mask); >>> >>> with of_dma_configure(), which has the chance to configure more than >>> just those three, as the dma API might look into different aspects: >>> >>> - iommu specific configuration >>> - cache coherency information >>> - bus type >>> - dma offset >>> - dma_map_ops pointer >>> >>> We try to handle everything in of_dma_configure() at configuration >>> time, and that would be the place to add anything else that we might >>> need in the future. >>> >> >> Yes, I agree with you, but just like Felipe mentioned, we also need to >> consider PCI device, can we do something like gpiod_get_index does? Are >> there any similar APIs like of_dma_configure for ACPI? > > Not yet, but Lorenzo has one in progress[1], primarily for the sake of > abstracting away the IOMMU configuration. > > Robin. > > [1]:http://www.mail-archive.com/linux-kernel at vger.kernel.org/msg1209911.html not exported for drivers to use. If Lorenzo is trying to making a matching API for ACPI systems, then it needs to follow what of_dma_configure() is doing, and add an EXPORT_SYMBOL_GPL() -- balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 800 bytes Desc: not available URL: