1
2
3
4
5 #ifndef __IPU3_MMU_H
6 #define __IPU3_MMU_H
7
8 #define IPU3_PAGE_SHIFT 12
9 #define IPU3_PAGE_SIZE (1UL << IPU3_PAGE_SHIFT)
10
11
12
13
14
15
16
17 struct imgu_mmu_info {
18 dma_addr_t aperture_start;
19 dma_addr_t aperture_end;
20 };
21
22 struct device;
23 struct scatterlist;
24
25 struct imgu_mmu_info *imgu_mmu_init(struct device *parent, void __iomem *base);
26 void imgu_mmu_exit(struct imgu_mmu_info *info);
27 void imgu_mmu_suspend(struct imgu_mmu_info *info);
28 void imgu_mmu_resume(struct imgu_mmu_info *info);
29
30 int imgu_mmu_map(struct imgu_mmu_info *info, unsigned long iova,
31 phys_addr_t paddr, size_t size);
32 size_t imgu_mmu_unmap(struct imgu_mmu_info *info, unsigned long iova,
33 size_t size);
34 size_t imgu_mmu_map_sg(struct imgu_mmu_info *info, unsigned long iova,
35 struct scatterlist *sg, unsigned int nents);
36 #endif