diff options
| author | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-11-03 10:11:27 -0400 |
|---|---|---|
| committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2010-11-03 10:11:27 -0400 |
| commit | 8f987768eb99631374f4ab0bb19cd062baf1397d (patch) | |
| tree | b89aa5c207f7ba6a688f45657424b937f17ceb8a /include/linux/io-mapping.h | |
| parent | 63f7526f26f0a9291ac3f7a986aa18ebfb61ec19 (diff) | |
| parent | c8ddb2713c624f432fa5fe3c7ecffcdda46ea0d4 (diff) | |
Merge commit 'v2.6.37-rc1' into for-2.6.37
Diffstat (limited to 'include/linux/io-mapping.h')
| -rw-r--r-- | include/linux/io-mapping.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 0a6b3d5c490c..8cdcc2a199ad 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
| @@ -79,10 +79,9 @@ io_mapping_free(struct io_mapping *mapping) | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | /* Atomic map/unmap */ | 81 | /* Atomic map/unmap */ |
| 82 | static inline void * | 82 | static inline void __iomem * |
| 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 84 | unsigned long offset, | 84 | unsigned long offset) |
| 85 | int slot) | ||
| 86 | { | 85 | { |
| 87 | resource_size_t phys_addr; | 86 | resource_size_t phys_addr; |
| 88 | unsigned long pfn; | 87 | unsigned long pfn; |
| @@ -90,16 +89,16 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, | |||
| 90 | BUG_ON(offset >= mapping->size); | 89 | BUG_ON(offset >= mapping->size); |
| 91 | phys_addr = mapping->base + offset; | 90 | phys_addr = mapping->base + offset; |
| 92 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); | 91 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); |
| 93 | return iomap_atomic_prot_pfn(pfn, slot, mapping->prot); | 92 | return iomap_atomic_prot_pfn(pfn, mapping->prot); |
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | static inline void | 95 | static inline void |
| 97 | io_mapping_unmap_atomic(void *vaddr, int slot) | 96 | io_mapping_unmap_atomic(void __iomem *vaddr) |
| 98 | { | 97 | { |
| 99 | iounmap_atomic(vaddr, slot); | 98 | iounmap_atomic(vaddr); |
| 100 | } | 99 | } |
| 101 | 100 | ||
| 102 | static inline void * | 101 | static inline void __iomem * |
| 103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 102 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 104 | { | 103 | { |
| 105 | resource_size_t phys_addr; | 104 | resource_size_t phys_addr; |
| @@ -111,7 +110,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | |||
| 111 | } | 110 | } |
| 112 | 111 | ||
| 113 | static inline void | 112 | static inline void |
| 114 | io_mapping_unmap(void *vaddr) | 113 | io_mapping_unmap(void __iomem *vaddr) |
| 115 | { | 114 | { |
| 116 | iounmap(vaddr); | 115 | iounmap(vaddr); |
| 117 | } | 116 | } |
| @@ -125,38 +124,37 @@ struct io_mapping; | |||
| 125 | static inline struct io_mapping * | 124 | static inline struct io_mapping * |
| 126 | io_mapping_create_wc(resource_size_t base, unsigned long size) | 125 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
| 127 | { | 126 | { |
| 128 | return (struct io_mapping *) ioremap_wc(base, size); | 127 | return (struct io_mapping __force *) ioremap_wc(base, size); |
| 129 | } | 128 | } |
| 130 | 129 | ||
| 131 | static inline void | 130 | static inline void |
| 132 | io_mapping_free(struct io_mapping *mapping) | 131 | io_mapping_free(struct io_mapping *mapping) |
| 133 | { | 132 | { |
| 134 | iounmap(mapping); | 133 | iounmap((void __force __iomem *) mapping); |
| 135 | } | 134 | } |
| 136 | 135 | ||
| 137 | /* Atomic map/unmap */ | 136 | /* Atomic map/unmap */ |
| 138 | static inline void * | 137 | static inline void __iomem * |
| 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, | 138 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
| 140 | unsigned long offset, | 139 | unsigned long offset) |
| 141 | int slot) | ||
| 142 | { | 140 | { |
| 143 | return ((char *) mapping) + offset; | 141 | return ((char __force __iomem *) mapping) + offset; |
| 144 | } | 142 | } |
| 145 | 143 | ||
| 146 | static inline void | 144 | static inline void |
| 147 | io_mapping_unmap_atomic(void *vaddr, int slot) | 145 | io_mapping_unmap_atomic(void __iomem *vaddr) |
| 148 | { | 146 | { |
| 149 | } | 147 | } |
| 150 | 148 | ||
| 151 | /* Non-atomic map/unmap */ | 149 | /* Non-atomic map/unmap */ |
| 152 | static inline void * | 150 | static inline void __iomem * |
| 153 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 151 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
| 154 | { | 152 | { |
| 155 | return ((char *) mapping) + offset; | 153 | return ((char __force __iomem *) mapping) + offset; |
| 156 | } | 154 | } |
| 157 | 155 | ||
| 158 | static inline void | 156 | static inline void |
| 159 | io_mapping_unmap(void *vaddr) | 157 | io_mapping_unmap(void __iomem *vaddr) |
| 160 | { | 158 | { |
| 161 | } | 159 | } |
| 162 | 160 | ||
