Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
iommu2.c File Reference
#include <linux/err.h>
#include <linux/device.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/stringify.h>
#include <plat/iommu.h>

Go to the source code of this file.

Macros

#define IOMMU_ARCH_VERSION   0x00000011
 
#define MMU_SYS_IDLE_SHIFT   3
 
#define MMU_SYS_IDLE_FORCE   (0 << MMU_SYS_IDLE_SHIFT)
 
#define MMU_SYS_IDLE_NONE   (1 << MMU_SYS_IDLE_SHIFT)
 
#define MMU_SYS_IDLE_SMART   (2 << MMU_SYS_IDLE_SHIFT)
 
#define MMU_SYS_IDLE_MASK   (3 << MMU_SYS_IDLE_SHIFT)
 
#define MMU_SYS_SOFTRESET   (1 << 1)
 
#define MMU_SYS_AUTOIDLE   1
 
#define MMU_SYS_RESETDONE   1
 
#define MMU_IRQ_MULTIHITFAULT   (1 << 4)
 
#define MMU_IRQ_TABLEWALKFAULT   (1 << 3)
 
#define MMU_IRQ_EMUMISS   (1 << 2)
 
#define MMU_IRQ_TRANSLATIONFAULT   (1 << 1)
 
#define MMU_IRQ_TLBMISS   (1 << 0)
 
#define __MMU_IRQ_FAULT   (MMU_IRQ_MULTIHITFAULT | MMU_IRQ_EMUMISS | MMU_IRQ_TRANSLATIONFAULT)
 
#define MMU_IRQ_MASK   (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT | MMU_IRQ_TLBMISS)
 
#define MMU_IRQ_TWL_MASK   (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT)
 
#define MMU_IRQ_TLB_MISS_MASK   (__MMU_IRQ_FAULT | MMU_IRQ_TLBMISS)
 
#define MMU_CNTL_SHIFT   1
 
#define MMU_CNTL_MASK   (7 << MMU_CNTL_SHIFT)
 
#define MMU_CNTL_EML_TLB   (1 << 3)
 
#define MMU_CNTL_TWL_EN   (1 << 2)
 
#define MMU_CNTL_MMU_EN   (1 << 1)
 
#define get_cam_va_mask(pgsz)
 
#define pr_reg(name)
 

Functions

 module_init (omap2_iommu_init)
 
 module_exit (omap2_iommu_exit)
 
 MODULE_AUTHOR ("Hiroshi DOYU, Paul Mundt and Toshihiro Kobayashi")
 
 MODULE_DESCRIPTION ("omap iommu: omap2/3 architecture specific functions")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

Definition at line 48 of file iommu2.c.

#define get_cam_va_mask (   pgsz)
Value:
(((pgsz) == MMU_CAM_PGSZ_16M) ? 0xff000000 : \
((pgsz) == MMU_CAM_PGSZ_1M) ? 0xfff00000 : \
((pgsz) == MMU_CAM_PGSZ_64K) ? 0xffff0000 : \
((pgsz) == MMU_CAM_PGSZ_4K) ? 0xfffff000 : 0)

Definition at line 62 of file iommu2.c.

#define IOMMU_ARCH_VERSION   0x00000011

Definition at line 26 of file iommu2.c.

#define MMU_CNTL_EML_TLB   (1 << 3)

Definition at line 58 of file iommu2.c.

#define MMU_CNTL_MASK   (7 << MMU_CNTL_SHIFT)

Definition at line 57 of file iommu2.c.

#define MMU_CNTL_MMU_EN   (1 << 1)

Definition at line 60 of file iommu2.c.

#define MMU_CNTL_SHIFT   1

Definition at line 56 of file iommu2.c.

#define MMU_CNTL_TWL_EN   (1 << 2)

Definition at line 59 of file iommu2.c.

#define MMU_IRQ_EMUMISS   (1 << 2)

Definition at line 44 of file iommu2.c.

#define MMU_IRQ_MASK   (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT | MMU_IRQ_TLBMISS)

Definition at line 50 of file iommu2.c.

#define MMU_IRQ_MULTIHITFAULT   (1 << 4)

Definition at line 42 of file iommu2.c.

#define MMU_IRQ_TABLEWALKFAULT   (1 << 3)

Definition at line 43 of file iommu2.c.

#define MMU_IRQ_TLB_MISS_MASK   (__MMU_IRQ_FAULT | MMU_IRQ_TLBMISS)

Definition at line 53 of file iommu2.c.

#define MMU_IRQ_TLBMISS   (1 << 0)

Definition at line 46 of file iommu2.c.

#define MMU_IRQ_TRANSLATIONFAULT   (1 << 1)

Definition at line 45 of file iommu2.c.

#define MMU_IRQ_TWL_MASK   (__MMU_IRQ_FAULT | MMU_IRQ_TABLEWALKFAULT)

Definition at line 52 of file iommu2.c.

#define MMU_SYS_AUTOIDLE   1

Definition at line 36 of file iommu2.c.

#define MMU_SYS_IDLE_FORCE   (0 << MMU_SYS_IDLE_SHIFT)

Definition at line 30 of file iommu2.c.

#define MMU_SYS_IDLE_MASK   (3 << MMU_SYS_IDLE_SHIFT)

Definition at line 33 of file iommu2.c.

#define MMU_SYS_IDLE_NONE   (1 << MMU_SYS_IDLE_SHIFT)

Definition at line 31 of file iommu2.c.

#define MMU_SYS_IDLE_SHIFT   3

Definition at line 29 of file iommu2.c.

#define MMU_SYS_IDLE_SMART   (2 << MMU_SYS_IDLE_SHIFT)

Definition at line 32 of file iommu2.c.

#define MMU_SYS_RESETDONE   1

Definition at line 39 of file iommu2.c.

#define MMU_SYS_SOFTRESET   (1 << 1)

Definition at line 35 of file iommu2.c.

#define pr_reg (   name)
Value:
do { \
const char *str = "%20s: %08x\n"; \
const int maxcol = 32; \
bytes = snprintf(p, maxcol, str, __stringify(name), \
iommu_read_reg(obj, MMU_##name)); \
p += bytes; \
len -= bytes; \
if (len < maxcol) \
goto out; \
} while (0)

Definition at line 246 of file iommu2.c.

Function Documentation

MODULE_AUTHOR ( "Hiroshi  DOYU,
Paul Mundt and Toshihiro Kobayashi"   
)
MODULE_DESCRIPTION ( "omap iommu: omap2/3 architecture specific functions"  )
module_exit ( omap2_iommu_exit  )
module_init ( omap2_iommu_init  )
MODULE_LICENSE ( "GPL v2 )