1 /* Public domain. */ 2 3 #ifndef _LINUX_IO_MAPPING_H 4 #define _LINUX_IO_MAPPING_H 5 6 #include <linux/types.h> 7 8 struct io_mapping { 9 resource_size_t base; 10 unsigned long size; 11 void *iomem; 12 }; 13 14 static inline void * 15 io_mapping_map_wc(struct io_mapping *map, unsigned long off, unsigned long size) 16 { 17 return ((uint8_t *)map->iomem + off); 18 } 19 20 static inline void 21 io_mapping_unmap(void *va) 22 { 23 } 24 25 static inline void * 26 io_mapping_map_local_wc(struct io_mapping *map, unsigned long off) 27 { 28 return ((uint8_t *)map->iomem + off); 29 } 30 31 static inline void 32 io_mapping_unmap_local(void *va) 33 { 34 } 35 36 static inline void * 37 io_mapping_map_atomic_wc(struct io_mapping *map, unsigned long off) 38 { 39 return ((uint8_t *)map->iomem + off); 40 } 41 42 static inline void 43 io_mapping_unmap_atomic(void *va) 44 { 45 } 46 47 #endif 48