Lines Matching refs:e
230 static u32 get_iopte_attr(struct iotlb_entry *e) in get_iopte_attr() argument
234 attr = e->mixed << 5; in get_iopte_attr()
235 attr |= e->endian; in get_iopte_attr()
236 attr |= e->elsz >> 3; in get_iopte_attr()
237 attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) || in get_iopte_attr()
238 (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6); in get_iopte_attr()
312 struct iotlb_entry *e) in iotlb_alloc_cr() argument
316 if (!e) in iotlb_alloc_cr()
319 if (e->da & ~(get_cam_va_mask(e->pgsz))) { in iotlb_alloc_cr()
321 e->da); in iotlb_alloc_cr()
329 cr->cam = (e->da & MMU_CAM_VATAG_MASK) | e->prsvd | e->pgsz | e->valid; in iotlb_alloc_cr()
330 cr->ram = e->pa | e->endian | e->elsz | e->mixed; in iotlb_alloc_cr()
340 static int load_iotlb_entry(struct omap_iommu *obj, struct iotlb_entry *e) in load_iotlb_entry() argument
346 if (!obj || !obj->nr_tlb_entries || !e) in load_iotlb_entry()
357 if (!e->prsvd) { in load_iotlb_entry()
377 cr = iotlb_alloc_cr(obj, e); in load_iotlb_entry()
386 if (e->prsvd) in load_iotlb_entry()
399 static int load_iotlb_entry(struct omap_iommu *obj, struct iotlb_entry *e) in load_iotlb_entry() argument
406 static int prefetch_iotlb_entry(struct omap_iommu *obj, struct iotlb_entry *e) in prefetch_iotlb_entry() argument
408 return load_iotlb_entry(obj, e); in prefetch_iotlb_entry()
607 iopgtable_store_entry_core(struct omap_iommu *obj, struct iotlb_entry *e) in iopgtable_store_entry_core() argument
613 if (!obj || !e) in iopgtable_store_entry_core()
616 switch (e->pgsz) { in iopgtable_store_entry_core()
635 prot = get_iopte_attr(e); in iopgtable_store_entry_core()
638 err = fn(obj, e->da, e->pa, prot); in iopgtable_store_entry_core()
650 omap_iopgtable_store_entry(struct omap_iommu *obj, struct iotlb_entry *e) in omap_iopgtable_store_entry() argument
654 flush_iotlb_page(obj, e->da); in omap_iopgtable_store_entry()
655 err = iopgtable_store_entry_core(obj, e); in omap_iopgtable_store_entry()
657 prefetch_iotlb_entry(obj, e); in omap_iopgtable_store_entry()
1021 static u32 iotlb_init_entry(struct iotlb_entry *e, u32 da, u32 pa, int pgsz) in iotlb_init_entry() argument
1023 memset(e, 0, sizeof(*e)); in iotlb_init_entry()
1025 e->da = da; in iotlb_init_entry()
1026 e->pa = pa; in iotlb_init_entry()
1027 e->valid = MMU_CAM_V; in iotlb_init_entry()
1028 e->pgsz = pgsz; in iotlb_init_entry()
1029 e->endian = MMU_RAM_ENDIAN_LITTLE; in iotlb_init_entry()
1030 e->elsz = MMU_RAM_ELSZ_8; in iotlb_init_entry()
1031 e->mixed = 0; in iotlb_init_entry()
1033 return iopgsz_to_bytes(e->pgsz); in iotlb_init_entry()
1042 struct iotlb_entry e; in omap_iommu_map() local
1054 iotlb_init_entry(&e, da, pa, omap_pgsz); in omap_iommu_map()
1056 ret = omap_iopgtable_store_entry(oiommu, &e); in omap_iommu_map()