diff options
author | Ohad Ben-Cohen <ohad@wizery.com> | 2011-08-17 15:57:56 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2011-08-26 05:46:01 -0400 |
commit | 6c32df437c7c5b1fc29d3ca29b0ff44f8dfafc56 (patch) | |
tree | 939d751cbae86291f6b5152cee4615284165fece /arch/arm/mach-omap2/iommu2.c | |
parent | 384fa675795ae3796dbc263e5d0f35b9a27d6462 (diff) |
omap: iommu: omapify 'struct iommu' and exposed API
Prepend 'omap_' to OMAP's 'struct iommu' and exposed API, to prevent
namespace pollution and generally to improve readability of the code
that still uses the driver directly.
Update the users as needed as well.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/arm/mach-omap2/iommu2.c')
-rw-r--r-- | arch/arm/mach-omap2/iommu2.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index f286012783c6..eefc37912ef3 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c | |||
@@ -66,7 +66,7 @@ | |||
66 | ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0) | 66 | ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0) |
67 | 67 | ||
68 | 68 | ||
69 | static void __iommu_set_twl(struct iommu *obj, bool on) | 69 | static void __iommu_set_twl(struct omap_iommu *obj, bool on) |
70 | { | 70 | { |
71 | u32 l = iommu_read_reg(obj, MMU_CNTL); | 71 | u32 l = iommu_read_reg(obj, MMU_CNTL); |
72 | 72 | ||
@@ -85,7 +85,7 @@ static void __iommu_set_twl(struct iommu *obj, bool on) | |||
85 | } | 85 | } |
86 | 86 | ||
87 | 87 | ||
88 | static int omap2_iommu_enable(struct iommu *obj) | 88 | static int omap2_iommu_enable(struct omap_iommu *obj) |
89 | { | 89 | { |
90 | u32 l, pa; | 90 | u32 l, pa; |
91 | unsigned long timeout; | 91 | unsigned long timeout; |
@@ -127,7 +127,7 @@ static int omap2_iommu_enable(struct iommu *obj) | |||
127 | return 0; | 127 | return 0; |
128 | } | 128 | } |
129 | 129 | ||
130 | static void omap2_iommu_disable(struct iommu *obj) | 130 | static void omap2_iommu_disable(struct omap_iommu *obj) |
131 | { | 131 | { |
132 | u32 l = iommu_read_reg(obj, MMU_CNTL); | 132 | u32 l = iommu_read_reg(obj, MMU_CNTL); |
133 | 133 | ||
@@ -138,12 +138,12 @@ static void omap2_iommu_disable(struct iommu *obj) | |||
138 | dev_dbg(obj->dev, "%s is shutting down\n", obj->name); | 138 | dev_dbg(obj->dev, "%s is shutting down\n", obj->name); |
139 | } | 139 | } |
140 | 140 | ||
141 | static void omap2_iommu_set_twl(struct iommu *obj, bool on) | 141 | static void omap2_iommu_set_twl(struct omap_iommu *obj, bool on) |
142 | { | 142 | { |
143 | __iommu_set_twl(obj, false); | 143 | __iommu_set_twl(obj, false); |
144 | } | 144 | } |
145 | 145 | ||
146 | static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) | 146 | static u32 omap2_iommu_fault_isr(struct omap_iommu *obj, u32 *ra) |
147 | { | 147 | { |
148 | u32 stat, da; | 148 | u32 stat, da; |
149 | u32 errs = 0; | 149 | u32 errs = 0; |
@@ -173,13 +173,13 @@ static u32 omap2_iommu_fault_isr(struct iommu *obj, u32 *ra) | |||
173 | return errs; | 173 | return errs; |
174 | } | 174 | } |
175 | 175 | ||
176 | static void omap2_tlb_read_cr(struct iommu *obj, struct cr_regs *cr) | 176 | static void omap2_tlb_read_cr(struct omap_iommu *obj, struct cr_regs *cr) |
177 | { | 177 | { |
178 | cr->cam = iommu_read_reg(obj, MMU_READ_CAM); | 178 | cr->cam = iommu_read_reg(obj, MMU_READ_CAM); |
179 | cr->ram = iommu_read_reg(obj, MMU_READ_RAM); | 179 | cr->ram = iommu_read_reg(obj, MMU_READ_RAM); |
180 | } | 180 | } |
181 | 181 | ||
182 | static void omap2_tlb_load_cr(struct iommu *obj, struct cr_regs *cr) | 182 | static void omap2_tlb_load_cr(struct omap_iommu *obj, struct cr_regs *cr) |
183 | { | 183 | { |
184 | iommu_write_reg(obj, cr->cam | MMU_CAM_V, MMU_CAM); | 184 | iommu_write_reg(obj, cr->cam | MMU_CAM_V, MMU_CAM); |
185 | iommu_write_reg(obj, cr->ram, MMU_RAM); | 185 | iommu_write_reg(obj, cr->ram, MMU_RAM); |
@@ -193,7 +193,8 @@ static u32 omap2_cr_to_virt(struct cr_regs *cr) | |||
193 | return cr->cam & mask; | 193 | return cr->cam & mask; |
194 | } | 194 | } |
195 | 195 | ||
196 | static struct cr_regs *omap2_alloc_cr(struct iommu *obj, struct iotlb_entry *e) | 196 | static struct cr_regs *omap2_alloc_cr(struct omap_iommu *obj, |
197 | struct iotlb_entry *e) | ||
197 | { | 198 | { |
198 | struct cr_regs *cr; | 199 | struct cr_regs *cr; |
199 | 200 | ||
@@ -230,7 +231,8 @@ static u32 omap2_get_pte_attr(struct iotlb_entry *e) | |||
230 | return attr; | 231 | return attr; |
231 | } | 232 | } |
232 | 233 | ||
233 | static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf) | 234 | static ssize_t |
235 | omap2_dump_cr(struct omap_iommu *obj, struct cr_regs *cr, char *buf) | ||
234 | { | 236 | { |
235 | char *p = buf; | 237 | char *p = buf; |
236 | 238 | ||
@@ -254,7 +256,8 @@ static ssize_t omap2_dump_cr(struct iommu *obj, struct cr_regs *cr, char *buf) | |||
254 | goto out; \ | 256 | goto out; \ |
255 | } while (0) | 257 | } while (0) |
256 | 258 | ||
257 | static ssize_t omap2_iommu_dump_ctx(struct iommu *obj, char *buf, ssize_t len) | 259 | static ssize_t |
260 | omap2_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len) | ||
258 | { | 261 | { |
259 | char *p = buf; | 262 | char *p = buf; |
260 | 263 | ||
@@ -280,7 +283,7 @@ out: | |||
280 | return p - buf; | 283 | return p - buf; |
281 | } | 284 | } |
282 | 285 | ||
283 | static void omap2_iommu_save_ctx(struct iommu *obj) | 286 | static void omap2_iommu_save_ctx(struct omap_iommu *obj) |
284 | { | 287 | { |
285 | int i; | 288 | int i; |
286 | u32 *p = obj->ctx; | 289 | u32 *p = obj->ctx; |
@@ -293,7 +296,7 @@ static void omap2_iommu_save_ctx(struct iommu *obj) | |||
293 | BUG_ON(p[0] != IOMMU_ARCH_VERSION); | 296 | BUG_ON(p[0] != IOMMU_ARCH_VERSION); |
294 | } | 297 | } |
295 | 298 | ||
296 | static void omap2_iommu_restore_ctx(struct iommu *obj) | 299 | static void omap2_iommu_restore_ctx(struct omap_iommu *obj) |
297 | { | 300 | { |
298 | int i; | 301 | int i; |
299 | u32 *p = obj->ctx; | 302 | u32 *p = obj->ctx; |
@@ -343,13 +346,13 @@ static const struct iommu_functions omap2_iommu_ops = { | |||
343 | 346 | ||
344 | static int __init omap2_iommu_init(void) | 347 | static int __init omap2_iommu_init(void) |
345 | { | 348 | { |
346 | return install_iommu_arch(&omap2_iommu_ops); | 349 | return omap_install_iommu_arch(&omap2_iommu_ops); |
347 | } | 350 | } |
348 | module_init(omap2_iommu_init); | 351 | module_init(omap2_iommu_init); |
349 | 352 | ||
350 | static void __exit omap2_iommu_exit(void) | 353 | static void __exit omap2_iommu_exit(void) |
351 | { | 354 | { |
352 | uninstall_iommu_arch(&omap2_iommu_ops); | 355 | omap_uninstall_iommu_arch(&omap2_iommu_ops); |
353 | } | 356 | } |
354 | module_exit(omap2_iommu_exit); | 357 | module_exit(omap2_iommu_exit); |
355 | 358 | ||