drivers: iommu: Add map/unmap range ops

Add IOMMU ops functions to allow mapping and unmapping
whole ranges of address space based on a scatterlist.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
drivers: iommu: Add flags to iommu_domain_alloc

Add the ability to pass flags into the iommu_domain_alloc
function to specify domain attributes.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
iommu/core: Define iommu_ops and register_iommu only with CONFIG_IOMMU_API
drivers: iommu: move to a dedicated folder
iommu/core: use the existing IS_ALIGNED macro

Replace iommu's alignment checks with the existing IS_ALIGNED macro,
to drop a few lines of code and utilize IS_ALIGNED's type safety.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
iommu/core: Use PAGE_SIZE instead of hard-coded value

Replace the hard-coded 4kb by PAGE_SIZE to make iommu-api
implementations possible on architectures where
PAGE_SIZE != 4kb.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>