31 #include <linux/kernel.h>
32 #include <linux/module.h>
40 #define IOR_PHYS_GRAIN ((phys_addr_t) 1 << IOR_LSBITS)
41 #define IOR_PHYS_GRAIN_MASK (IOR_PHYS_GRAIN - 1)
43 #define IOR_DMA_GRAIN ((dma_addr_t) 1 << IOR_LSBITS)
44 #define IOR_DMA_GRAIN_MASK (IOR_DMA_GRAIN - 1)
71 int dma_idx, first_idx, last_idx;
83 for (dma_idx = first_idx; dma_idx <= last_idx; dma_idx++)
98 int phys_idx, first_idx, last_idx;
110 for (phys_idx = first_idx; phys_idx <= last_idx; phys_idx++)
130 (size & IOR_PHYS_GRAIN_MASK) != 0)
131 pr_crit(
"Memory allocation must be in chunks of 0x%x bytes\n",
134 setup_dma_to_phys(dma, phys - dma, size);
135 setup_phys_to_dma(phys, dma - phys, size);