Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: OMAP2+: Make some definitions local

Move some of the definitions in omap-iommu.h that can be made local to
either drivers/iommu.

Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Omar Ramirez Luna <omar.luna@linaro.org>
Signed-off-by: Ido Yariv <ido@wizery.com>
Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
[tony@atomide.com: updated for header changes in the series]
Signed-off-by: Tony Lindgren <tony@atomide.com>

authored by

Ido Yariv and committed by
Tony Lindgren
7bd9e25f ed1c7de2

+24 -30
+15
drivers/iommu/omap-iommu.c
··· 54 54 spinlock_t lock; 55 55 }; 56 56 57 + #define MMU_LOCK_BASE_SHIFT 10 58 + #define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT) 59 + #define MMU_LOCK_BASE(x) \ 60 + ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT) 61 + 62 + #define MMU_LOCK_VICT_SHIFT 4 63 + #define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT) 64 + #define MMU_LOCK_VICT(x) \ 65 + ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT) 66 + 67 + struct iotlb_lock { 68 + short base; 69 + short vict; 70 + }; 71 + 57 72 /* accommodate the difference between omap1 and omap2/3 */ 58 73 static const struct iommu_functions *arch_iommu; 59 74
+3 -30
drivers/iommu/omap-iommu.h
··· 72 72 }; 73 73 }; 74 74 75 - struct iotlb_lock { 76 - short base; 77 - short vict; 78 - }; 79 - 80 75 /* architecture specific functions */ 81 76 struct iommu_functions { 82 77 unsigned long version; ··· 112 117 } 113 118 #endif 114 119 115 - /* IOMMU errors */ 116 - #define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) 117 - #define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1) 118 - #define OMAP_IOMMU_ERR_EMU_MISS (1 << 2) 119 - #define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3) 120 - #define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4) 121 - 122 120 /* 123 121 * MMU Register offsets 124 122 */ ··· 139 151 /* 140 152 * MMU Register bit definitions 141 153 */ 142 - #define MMU_LOCK_BASE_SHIFT 10 143 - #define MMU_LOCK_BASE_MASK (0x1f << MMU_LOCK_BASE_SHIFT) 144 - #define MMU_LOCK_BASE(x) \ 145 - ((x & MMU_LOCK_BASE_MASK) >> MMU_LOCK_BASE_SHIFT) 146 - 147 - #define MMU_LOCK_VICT_SHIFT 4 148 - #define MMU_LOCK_VICT_MASK (0x1f << MMU_LOCK_VICT_SHIFT) 149 - #define MMU_LOCK_VICT(x) \ 150 - ((x & MMU_LOCK_VICT_MASK) >> MMU_LOCK_VICT_SHIFT) 151 - 152 154 #define MMU_CAM_VATAG_SHIFT 12 153 155 #define MMU_CAM_VATAG_MASK \ 154 156 ((~0UL >> MMU_CAM_VATAG_SHIFT) << MMU_CAM_VATAG_SHIFT) ··· 200 222 extern int 201 223 omap_iopgtable_store_entry(struct omap_iommu *obj, struct iotlb_entry *e); 202 224 203 - extern int omap_iommu_set_isr(const char *name, 204 - int (*isr)(struct omap_iommu *obj, u32 da, u32 iommu_errs, 205 - void *priv), 206 - void *isr_priv); 207 - 208 225 extern void omap_iommu_save_ctx(struct device *dev); 209 226 extern void omap_iommu_restore_ctx(struct device *dev); 210 227 211 - extern int omap_install_iommu_arch(const struct iommu_functions *ops); 212 - extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); 213 - 214 228 extern int omap_foreach_iommu_device(void *data, 215 229 int (*fn)(struct device *, void *)); 230 + 231 + extern int omap_install_iommu_arch(const struct iommu_functions *ops); 232 + extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); 216 233 217 234 extern ssize_t 218 235 omap_iommu_dump_ctx(struct omap_iommu *obj, char *buf, ssize_t len);
+6
drivers/iommu/omap-iommu2.c
··· 68 68 ((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \ 69 69 ((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0) 70 70 71 + /* IOMMU errors */ 72 + #define OMAP_IOMMU_ERR_TLB_MISS (1 << 0) 73 + #define OMAP_IOMMU_ERR_TRANS_FAULT (1 << 1) 74 + #define OMAP_IOMMU_ERR_EMU_MISS (1 << 2) 75 + #define OMAP_IOMMU_ERR_TBLWALK_FAULT (1 << 3) 76 + #define OMAP_IOMMU_ERR_MULTIHIT_FAULT (1 << 4) 71 77 72 78 static void __iommu_set_twl(struct omap_iommu *obj, bool on) 73 79 {