lkml.org 
[lkml]   [2018]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nand: ranw: qcom_nand: stop using phys_to_dma()
Hi Arnd,

On Wed, 11 Jul 2018 16:26:31 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> On Wed, Jul 11, 2018 at 3:04 PM, Boris Brezillon
> <boris.brezillon@bootlin.com> wrote:
> > On Wed, 11 Jul 2018 14:26:58 +0200
> > Arnd Bergmann <arnd@arndb.de> wrote:
> >
> >> Compile-testing this driver on x86 caused a link error:
> >>
> >> ERROR: "__phys_to_dma" [drivers/mtd/nand/raw/qcom_nandc.ko] undefined!
> >>
> >> The problem here is that the driver attempts to convert the physical
> >> address into the DMA controller as a dma_addr_t and calls phys_to_dma()
> >> to do the conversion.
> >>
> >> However, there is no generic way to convert a phys_addr_t into a dma_addr_t
> >> for anything other than RAM (which should use the dma-mapping API instead).
> >> The only correct use of phys_to_dma() instead is inside of the dma-mapping
> >> implementation.
> >
> > Should we use dma_map_resource() to do the phys_addr_t to dma_addr_t
> > conversion?
>
> I had not seen that interface before, but yes, that does seem like the best
> way to do it here.

Do you plan to send a new version using dma_map_resource()? BTW,
there's typo in the subject prefix (s/ranw/rawnand/).

Regards,

Boris

\
 
 \ /
  Last update: 2018-07-17 22:02    [W:0.048 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site