Re: [PATCH v2 1/7] ARM: mm: Introduce archdata.dma_pfn_offset
From: Arnd Bergmann <hidden>
Date: 2014-02-28 09:30:48
Also in:
linux-arm-kernel
On Thursday 27 February 2014 16:17:46 Santosh Shilimkar wrote:
From: Grygorii Strashko <redacted> 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-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org> Cc: Arnd Bergmann <redacted> Cc: Olof Johansson <redacted> Signed-off-by: Grygorii Strashko <redacted> Signed-off-by: Santosh Shilimkar <redacted>
This was my suggestion, and the implementation is trivial, so Acked-by: Arnd Bergmann <redacted> This should be most of what LinusW needs to generalize the mach-integrator PCI DMA mapping. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html