[PATCH v2 1/7] ARM: mm: Introduce archdata.dma_pfn_offset

Linus Walleij linus.walleij at linaro.org
Tue Mar 4 23:45:01 EST 2014


On Fri, Feb 28, 2014 at 5:17 AM, Santosh Shilimkar
<santosh.shilimkar at ti.com> wrote:

> From: Grygorii Strashko <grygorii.strashko at ti.com>
>
> In most of cases DMA addresses can be performed using offset value of
>  Bus address space relatively to physical address space as following:
>
> PFN->DMA:
>  __pfn_to_phys(pfn + [-]dma_pfn_offset)
>
> DMA->PFN:
>  __phys_to_pfn(dma_addr) + [-]dma_pfn_offset
>
> This patch introduces new field dma_pfn_offset in ARM dev_archdata
> structure which has to be filed per-device at arch init time
> (simplest way is to use Platform bus notifier to handle
> BUS_NOTIFY_ADD_DEVICE event) and updates DMA address translation
> routines in order to accommodate bus offset value by default.
>
> Cc: Russell King <linux at arm.linux.org.uk>
> Cc: Arnd Bergmann <arnd at arndb.de>
> Cc: Olof Johansson <olof at lixom.net>
> Signed-off-by: Grygorii Strashko <grygorii.strashko at ti.com>
> Signed-off-by: Santosh Shilimkar <santosh.shilimkar at ti.com>

This looks like exactly what I need to proceed to multiplatform on
Integrator.
Acked-by: Linus Walleij <linus.walleij at linaro.org>

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list