[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87inu8kny0.fsf@linux.intel.com>
Date: Wed, 07 Sep 2016 13:24:07 +0300
From: Felipe Balbi <balbi@...nel.org>
To: Arnd Bergmann <arnd@...db.de>, Peter Chen <hzpeterchen@...il.com>
Cc: Leo Li <pku.leo@...il.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Russell King - ARM Linux <linux@....linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
"linux-usb\@vger.kernel.org" <linux-usb@...r.kernel.org>,
Sekhar Nori <nsekhar@...com>,
lkml <linux-kernel@...r.kernel.org>,
Stuart Yoder <stuart.yoder@....com>,
Scott Wood <oss@...error.net>,
David Fisher <david.fisher1@...opsys.com>,
"Thang Q. Nguyen" <tqnguyen@....com>,
Alan Stern <stern@...land.harvard.edu>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"linux-arm-kernel\@lists.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev
Hi,
Arnd Bergmann <arnd@...db.de> writes:
[...]
> 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.
There are a couple problems with this:
1) won't work for PCI-based systems.
DWC3 is used in production PCI-based HW and also in Synopsys HAPS DX
platform (FPGA that appears like a PCI card to host PC)
2) not very robust solution
of_dma_configure() will hardcode 32-bit DMA dmask for xhci-plat because
that's not created by DT. The only reason why this works at all is
because of the default 32-bit dma mask thing :-) So, how is it any
different than copying 32-bit dma mask from parent?
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (801 bytes)
Powered by blists - more mailing lists