Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures
iommu.h File Reference
#include <plat/iommu2.h>

Go to the source code of this file.

Data Structures

struct  iotlb_entry
 
struct  omap_iommu
 
struct  cr_regs
 
struct  iotlb_lock
 
struct  iommu_functions
 
struct  omap_mmu_dev_attr
 
struct  iommu_platform_data
 
struct  omap_iommu_arch_data
 

: name of the iommu device

struct iommu_arch_data - omap iommu private data

: handle of the iommu device

This is an omap iommu private data object, which binds an iommu user to its iommu device. This object should be placed at the iommu user's dev_archdata so generic IOMMU API can be used without having to utilize omap-specific plumbing anymore.

#define OMAP_IOMMU_ERR_TLB_MISS   (1 << 0)
 
#define OMAP_IOMMU_ERR_TRANS_FAULT   (1 << 1)
 
#define OMAP_IOMMU_ERR_EMU_MISS   (1 << 2)
 
#define OMAP_IOMMU_ERR_TBLWALK_FAULT   (1 << 3)
 
#define OMAP_IOMMU_ERR_MULTIHIT_FAULT   (1 << 4)
 
#define iopgsz_max(bytes)
 
#define bytes_to_iopgsz(bytes)
 
#define iopgsz_to_bytes(iopgsz)
 
#define iopgsz_ok(bytes)   (bytes_to_iopgsz(bytes) >= 0)
 
u32 omap_iommu_arch_version (void)
 
void omap_iotlb_cr_to_e (struct cr_regs *cr, struct iotlb_entry *e)
 
int omap_iopgtable_store_entry (struct omap_iommu *obj, struct iotlb_entry *e)
 
int omap_iommu_set_isr (const char *name, int(*isr)(struct omap_iommu *obj, u32 da, u32 iommu_errs, void *priv), void *isr_priv)
 
void omap_iommu_save_ctx (struct device *dev)
 
void omap_iommu_restore_ctx (struct device *dev)
 
int omap_install_iommu_arch (const struct iommu_functions *ops)
 
void omap_uninstall_iommu_arch (const struct iommu_functions *ops)
 
int omap_foreach_iommu_device (void *data, int(*fn)(struct device *, void *))
 
ssize_t omap_iommu_dump_ctx (struct omap_iommu *obj, char *buf, ssize_t len)
 
size_t omap_dump_tlb_entries (struct omap_iommu *obj, char *buf, ssize_t len)
 

Macro Definition Documentation

#define bytes_to_iopgsz (   bytes)
Value:

Definition at line 178 of file iommu.h.

#define iopgsz_max (   bytes)
Value:
(((bytes) >= SZ_16M) ? SZ_16M : \
((bytes) >= SZ_1M) ? SZ_1M : \
((bytes) >= SZ_64K) ? SZ_64K : \
((bytes) >= SZ_4K) ? SZ_4K : 0)

Definition at line 172 of file iommu.h.

#define iopgsz_ok (   bytes)    (bytes_to_iopgsz(bytes) >= 0)

Definition at line 190 of file iommu.h.

#define iopgsz_to_bytes (   iopgsz)
Value:
(((iopgsz) == MMU_CAM_PGSZ_16M) ? SZ_16M : \
((iopgsz) == MMU_CAM_PGSZ_1M) ? SZ_1M : \
((iopgsz) == MMU_CAM_PGSZ_64K) ? SZ_64K : \
((iopgsz) == MMU_CAM_PGSZ_4K) ? SZ_4K : 0)

Definition at line 184 of file iommu.h.

#define OMAP_IOMMU_ERR_EMU_MISS   (1 << 2)

Definition at line 158 of file iommu.h.

#define OMAP_IOMMU_ERR_MULTIHIT_FAULT   (1 << 4)

Definition at line 160 of file iommu.h.

#define OMAP_IOMMU_ERR_TBLWALK_FAULT   (1 << 3)

Definition at line 159 of file iommu.h.

#define OMAP_IOMMU_ERR_TLB_MISS   (1 << 0)

Definition at line 156 of file iommu.h.

#define OMAP_IOMMU_ERR_TRANS_FAULT   (1 << 1)

Definition at line 157 of file iommu.h.

Function Documentation

size_t omap_dump_tlb_entries ( struct omap_iommu obj,
char buf,
ssize_t  len 
)
int omap_foreach_iommu_device ( void data,
int(*)(struct device *, void *)  fn 
)
int omap_install_iommu_arch ( const struct iommu_functions ops)

omap_install_iommu_arch - Install archtecure specific iommu functions : a pointer to architecture specific iommu functions

There are several kind of iommu algorithm(tlb, pagetable) among omap series. This interface installs such an iommu algorighm.

Definition at line 67 of file omap-iommu.c.

u32 omap_iommu_arch_version ( void  )

omap_iommu_arch_version - Return running iommu arch version

Definition at line 119 of file omap-iommu.c.

ssize_t omap_iommu_dump_ctx ( struct omap_iommu obj,
char buf,
ssize_t  len 
)
void omap_iommu_restore_ctx ( struct device dev)

omap_iommu_restore_ctx - Restore registers for pm off-mode support : client device

Definition at line 108 of file omap-iommu.c.

void omap_iommu_save_ctx ( struct device dev)

omap_iommu_save_ctx - Save registers for pm off-mode support : client device

Definition at line 96 of file omap-iommu.c.

int omap_iommu_set_isr ( const char name,
int(*)(struct omap_iommu *obj, u32 da, u32 iommu_errs, void *priv isr,
void isr_priv 
)
int omap_iopgtable_store_entry ( struct omap_iommu obj,
struct iotlb_entry e 
)

omap_iopgtable_store_entry - Make an iommu pte entry : target iommu : an iommu tlb entry info

Definition at line 649 of file omap-iommu.c.

void omap_iotlb_cr_to_e ( struct cr_regs cr,
struct iotlb_entry e 
)

Definition at line 158 of file omap-iommu.c.

void omap_uninstall_iommu_arch ( const struct iommu_functions ops)

omap_uninstall_iommu_arch - Uninstall archtecure specific iommu functions : a pointer to architecture specific iommu functions

This interface uninstalls the iommu algorighm installed previously.

Definition at line 83 of file omap-iommu.c.