iommu: Add DMA window parser, of_get_dma_window()
authorHiroshi Doyu <hdoyu@nvidia.com>
Mon, 25 Jun 2012 11:23:54 +0000 (14:23 +0300)
committerJoerg Roedel <joerg.roedel@amd.com>
Mon, 25 Jun 2012 11:50:28 +0000 (13:50 +0200)
commit4e0ee78f2af96676c9dca898c13250f62c513058
treeb6851b6678d8a99a6c158a18f210442e545f78c3
parent485802a6c524e62b5924849dd727ddbb1497cc71
iommu: Add DMA window parser, of_get_dma_window()

This code was based on:
    "arch/microblaze/kernel/prom_parse.c"
    "arch/powerpc/kernel/prom_parse.c"

Can replace "of_parse_dma_window()" in the above. This supports
different formats flexibly. "prefix" can be configured if any. "busno"
and "index" are optionally specified. Set NULL and 0 if not used.

Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/Kconfig
drivers/iommu/Makefile
drivers/iommu/of_iommu.c [new file with mode: 0644]
include/linux/of_iommu.h [new file with mode: 0644]