[PATCH 4/4] ARM: keystone: Use dma-ranges for dma_pfn_offset configuration

Arnd Bergmann arnd at arndb.de
Tue Feb 25 09:37:02 EST 2014


On Tuesday 25 February 2014 17:19:59 Grygorii Strashko wrote:
> The Keystone can work in two modes:
> - LPAE disabled: In this case Platform bus notifier will not be called at all
> and DMA range == MEM range (32 bits mode)

The hardware setting doesn't change here, just the available memory, right?

> - LPAE enabled: In this case, I'll update code to treat absence of "dam-ranges"
> property as "no dma possible" and clean up DMA mask. Is it ok?
> In this mode "dam-ranges" prop has to be defined always to enable DMA.

Ok, sounds good.
 
> Empty "dma-ranges" can't be treated as "no translation required" because it is used
> to move one level up while traversing DT to find the valid "dma-ranges" prop.
> Used to handle child devices like:
> 
>  bus {
>         dma-ranges = <...>;
>         
>         Dev A {
>                 dma-ranges;
> 
>                 child_dev_A1 { }
>                 child_dev_A2 { }
> 
> This is standard behavior for "[dma-]ranges".

That is what I meant: "no translation required at this level". You still
have to go up to the root in order to know the full translation.

	Arnd



More information about the linux-arm-kernel mailing list