]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - lib/iommu-helper.c
OMAP: dmtimer: enable all timers to be wakeup events
[linux-2.6-omap-h63xx.git] / lib / iommu-helper.c
index 5d90074dca7550f4935e71127911441c9bc617e2..75dbda03f4fb99a92ef8cc3ead817afefd707702 100644 (file)
@@ -79,3 +79,12 @@ void iommu_area_free(unsigned long *map, unsigned long start, unsigned int nr)
        }
 }
 EXPORT_SYMBOL(iommu_area_free);
+
+unsigned long iommu_num_pages(unsigned long addr, unsigned long len,
+                             unsigned long io_page_size)
+{
+       unsigned long size = (addr & (io_page_size - 1)) + len;
+
+       return DIV_ROUND_UP(size, io_page_size);
+}
+EXPORT_SYMBOL(iommu_num_pages);