Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ipu-prv.h File Reference
#include <linux/types.h>
#include <linux/device.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include "imx-ipu-v3.h"

Go to the source code of this file.

Data Structures

struct  ipuv3_channel
 
struct  ipu_soc
 

Macros

#define IPUV3_CHANNEL_CSI0   0
 
#define IPUV3_CHANNEL_CSI1   1
 
#define IPUV3_CHANNEL_CSI2   2
 
#define IPUV3_CHANNEL_CSI3   3
 
#define IPUV3_CHANNEL_MEM_BG_SYNC   23
 
#define IPUV3_CHANNEL_MEM_FG_SYNC   27
 
#define IPUV3_CHANNEL_MEM_DC_SYNC   28
 
#define IPUV3_CHANNEL_MEM_FG_SYNC_ALPHA   31
 
#define IPUV3_CHANNEL_MEM_DC_ASYNC   41
 
#define IPUV3_CHANNEL_ROT_ENC_MEM   45
 
#define IPUV3_CHANNEL_ROT_VF_MEM   46
 
#define IPUV3_CHANNEL_ROT_PP_MEM   47
 
#define IPUV3_CHANNEL_ROT_ENC_MEM_OUT   48
 
#define IPUV3_CHANNEL_ROT_VF_MEM_OUT   49
 
#define IPUV3_CHANNEL_ROT_PP_MEM_OUT   50
 
#define IPUV3_CHANNEL_MEM_BG_SYNC_ALPHA   51
 
#define IPU_MCU_T_DEFAULT   8
 
#define IPU_CM_IDMAC_REG_OFS   0x00008000
 
#define IPU_CM_IC_REG_OFS   0x00020000
 
#define IPU_CM_IRT_REG_OFS   0x00028000
 
#define IPU_CM_CSI0_REG_OFS   0x00030000
 
#define IPU_CM_CSI1_REG_OFS   0x00038000
 
#define IPU_CM_SMFC_REG_OFS   0x00050000
 
#define IPU_CM_DC_REG_OFS   0x00058000
 
#define IPU_CM_DMFC_REG_OFS   0x00060000
 
#define IPU_CM_REG(offset)   (offset)
 
#define IPU_CONF   IPU_CM_REG(0)
 
#define IPU_SRM_PRI1   IPU_CM_REG(0x00a0)
 
#define IPU_SRM_PRI2   IPU_CM_REG(0x00a4)
 
#define IPU_FS_PROC_FLOW1   IPU_CM_REG(0x00a8)
 
#define IPU_FS_PROC_FLOW2   IPU_CM_REG(0x00ac)
 
#define IPU_FS_PROC_FLOW3   IPU_CM_REG(0x00b0)
 
#define IPU_FS_DISP_FLOW1   IPU_CM_REG(0x00b4)
 
#define IPU_FS_DISP_FLOW2   IPU_CM_REG(0x00b8)
 
#define IPU_SKIP   IPU_CM_REG(0x00bc)
 
#define IPU_DISP_ALT_CONF   IPU_CM_REG(0x00c0)
 
#define IPU_DISP_GEN   IPU_CM_REG(0x00c4)
 
#define IPU_DISP_ALT1   IPU_CM_REG(0x00c8)
 
#define IPU_DISP_ALT2   IPU_CM_REG(0x00cc)
 
#define IPU_DISP_ALT3   IPU_CM_REG(0x00d0)
 
#define IPU_DISP_ALT4   IPU_CM_REG(0x00d4)
 
#define IPU_SNOOP   IPU_CM_REG(0x00d8)
 
#define IPU_MEM_RST   IPU_CM_REG(0x00dc)
 
#define IPU_PM   IPU_CM_REG(0x00e0)
 
#define IPU_GPR   IPU_CM_REG(0x00e4)
 
#define IPU_CHA_DB_MODE_SEL(ch)   IPU_CM_REG(0x0150 + 4 * ((ch) / 32))
 
#define IPU_ALT_CHA_DB_MODE_SEL(ch)   IPU_CM_REG(0x0168 + 4 * ((ch) / 32))
 
#define IPU_CHA_CUR_BUF(ch)   IPU_CM_REG(0x023C + 4 * ((ch) / 32))
 
#define IPU_ALT_CUR_BUF0   IPU_CM_REG(0x0244)
 
#define IPU_ALT_CUR_BUF1   IPU_CM_REG(0x0248)
 
#define IPU_SRM_STAT   IPU_CM_REG(0x024C)
 
#define IPU_PROC_TASK_STAT   IPU_CM_REG(0x0250)
 
#define IPU_DISP_TASK_STAT   IPU_CM_REG(0x0254)
 
#define IPU_CHA_BUF0_RDY(ch)   IPU_CM_REG(0x0268 + 4 * ((ch) / 32))
 
#define IPU_CHA_BUF1_RDY(ch)   IPU_CM_REG(0x0270 + 4 * ((ch) / 32))
 
#define IPU_ALT_CHA_BUF0_RDY(ch)   IPU_CM_REG(0x0278 + 4 * ((ch) / 32))
 
#define IPU_ALT_CHA_BUF1_RDY(ch)   IPU_CM_REG(0x0280 + 4 * ((ch) / 32))
 
#define IPU_INT_CTRL(n)   IPU_CM_REG(0x003C + 4 * (n))
 
#define IPU_INT_STAT(n)   IPU_CM_REG(0x0200 + 4 * (n))
 
#define IPU_DI0_COUNTER_RELEASE   (1 << 24)
 
#define IPU_DI1_COUNTER_RELEASE   (1 << 25)
 
#define IPU_IDMAC_REG(offset)   (offset)
 
#define IDMAC_CONF   IPU_IDMAC_REG(0x0000)
 
#define IDMAC_CHA_EN(ch)   IPU_IDMAC_REG(0x0004 + 4 * ((ch) / 32))
 
#define IDMAC_SEP_ALPHA   IPU_IDMAC_REG(0x000c)
 
#define IDMAC_ALT_SEP_ALPHA   IPU_IDMAC_REG(0x0010)
 
#define IDMAC_CHA_PRI(ch)   IPU_IDMAC_REG(0x0014 + 4 * ((ch) / 32))
 
#define IDMAC_WM_EN(ch)   IPU_IDMAC_REG(0x001c + 4 * ((ch) / 32))
 
#define IDMAC_CH_LOCK_EN_1   IPU_IDMAC_REG(0x0024)
 
#define IDMAC_CH_LOCK_EN_2   IPU_IDMAC_REG(0x0028)
 
#define IDMAC_SUB_ADDR_0   IPU_IDMAC_REG(0x002c)
 
#define IDMAC_SUB_ADDR_1   IPU_IDMAC_REG(0x0030)
 
#define IDMAC_SUB_ADDR_2   IPU_IDMAC_REG(0x0034)
 
#define IDMAC_BAND_EN(ch)   IPU_IDMAC_REG(0x0040 + 4 * ((ch) / 32))
 
#define IDMAC_CHA_BUSY(ch)   IPU_IDMAC_REG(0x0100 + 4 * ((ch) / 32))
 
#define IPU_NUM_IRQS   (32 * 5)
 

Enumerations

enum  ipu_modules {
  IPU_CONF_CSI0_EN = (1 << 0), IPU_CONF_CSI1_EN = (1 << 1), IPU_CONF_IC_EN = (1 << 2), IPU_CONF_ROT_EN = (1 << 3),
  IPU_CONF_ISP_EN = (1 << 4), IPU_CONF_DP_EN = (1 << 5), IPU_CONF_DI0_EN = (1 << 6), IPU_CONF_DI1_EN = (1 << 7),
  IPU_CONF_SMFC_EN = (1 << 8), IPU_CONF_DC_EN = (1 << 9), IPU_CONF_DMFC_EN = (1 << 10), IPU_CONF_VDI_EN = (1 << 12),
  IPU_CONF_IDMAC_DIS = (1 << 22), IPU_CONF_IC_DMFC_SEL = (1 << 25), IPU_CONF_IC_DMFC_SYNC = (1 << 26), IPU_CONF_VDI_DMFC_SYNC = (1 << 27),
  IPU_CONF_CSI0_DATA_SOURCE = (1 << 28), IPU_CONF_CSI1_DATA_SOURCE = (1 << 29), IPU_CONF_IC_INPUT = (1 << 30), IPU_CONF_CSI_SEL = (1 << 31)
}
 

Functions

void ipu_srm_dp_sync_update (struct ipu_soc *ipu)
 
int ipu_module_enable (struct ipu_soc *ipu, u32 mask)
 
int ipu_module_disable (struct ipu_soc *ipu, u32 mask)
 
int ipu_di_init (struct ipu_soc *ipu, struct device *dev, int id, unsigned long base, u32 module, struct clk *ipu_clk)
 
void ipu_di_exit (struct ipu_soc *ipu, int id)
 
int ipu_dmfc_init (struct ipu_soc *ipu, struct device *dev, unsigned long base, struct clk *ipu_clk)
 
void ipu_dmfc_exit (struct ipu_soc *ipu)
 
int ipu_dp_init (struct ipu_soc *ipu, struct device *dev, unsigned long base)
 
void ipu_dp_exit (struct ipu_soc *ipu)
 
int ipu_dc_init (struct ipu_soc *ipu, struct device *dev, unsigned long base, unsigned long template_base)
 
void ipu_dc_exit (struct ipu_soc *ipu)
 
int ipu_cpmem_init (struct ipu_soc *ipu, struct device *dev, unsigned long base)
 
void ipu_cpmem_exit (struct ipu_soc *ipu)
 

Macro Definition Documentation

#define IDMAC_ALT_SEP_ALPHA   IPU_IDMAC_REG(0x0010)

Definition at line 102 of file ipu-prv.h.

#define IDMAC_BAND_EN (   ch)    IPU_IDMAC_REG(0x0040 + 4 * ((ch) / 32))

Definition at line 110 of file ipu-prv.h.

#define IDMAC_CH_LOCK_EN_1   IPU_IDMAC_REG(0x0024)

Definition at line 105 of file ipu-prv.h.

#define IDMAC_CH_LOCK_EN_2   IPU_IDMAC_REG(0x0028)

Definition at line 106 of file ipu-prv.h.

#define IDMAC_CHA_BUSY (   ch)    IPU_IDMAC_REG(0x0100 + 4 * ((ch) / 32))

Definition at line 111 of file ipu-prv.h.

#define IDMAC_CHA_EN (   ch)    IPU_IDMAC_REG(0x0004 + 4 * ((ch) / 32))

Definition at line 100 of file ipu-prv.h.

#define IDMAC_CHA_PRI (   ch)    IPU_IDMAC_REG(0x0014 + 4 * ((ch) / 32))

Definition at line 103 of file ipu-prv.h.

#define IDMAC_CONF   IPU_IDMAC_REG(0x0000)

Definition at line 99 of file ipu-prv.h.

#define IDMAC_SEP_ALPHA   IPU_IDMAC_REG(0x000c)

Definition at line 101 of file ipu-prv.h.

#define IDMAC_SUB_ADDR_0   IPU_IDMAC_REG(0x002c)

Definition at line 107 of file ipu-prv.h.

#define IDMAC_SUB_ADDR_1   IPU_IDMAC_REG(0x0030)

Definition at line 108 of file ipu-prv.h.

#define IDMAC_SUB_ADDR_2   IPU_IDMAC_REG(0x0034)

Definition at line 109 of file ipu-prv.h.

#define IDMAC_WM_EN (   ch)    IPU_IDMAC_REG(0x001c + 4 * ((ch) / 32))

Definition at line 104 of file ipu-prv.h.

#define IPU_ALT_CHA_BUF0_RDY (   ch)    IPU_CM_REG(0x0278 + 4 * ((ch) / 32))

Definition at line 88 of file ipu-prv.h.

#define IPU_ALT_CHA_BUF1_RDY (   ch)    IPU_CM_REG(0x0280 + 4 * ((ch) / 32))

Definition at line 89 of file ipu-prv.h.

#define IPU_ALT_CHA_DB_MODE_SEL (   ch)    IPU_CM_REG(0x0168 + 4 * ((ch) / 32))

Definition at line 79 of file ipu-prv.h.

#define IPU_ALT_CUR_BUF0   IPU_CM_REG(0x0244)

Definition at line 81 of file ipu-prv.h.

#define IPU_ALT_CUR_BUF1   IPU_CM_REG(0x0248)

Definition at line 82 of file ipu-prv.h.

#define IPU_CHA_BUF0_RDY (   ch)    IPU_CM_REG(0x0268 + 4 * ((ch) / 32))

Definition at line 86 of file ipu-prv.h.

#define IPU_CHA_BUF1_RDY (   ch)    IPU_CM_REG(0x0270 + 4 * ((ch) / 32))

Definition at line 87 of file ipu-prv.h.

#define IPU_CHA_CUR_BUF (   ch)    IPU_CM_REG(0x023C + 4 * ((ch) / 32))

Definition at line 80 of file ipu-prv.h.

#define IPU_CHA_DB_MODE_SEL (   ch)    IPU_CM_REG(0x0150 + 4 * ((ch) / 32))

Definition at line 78 of file ipu-prv.h.

#define IPU_CM_CSI0_REG_OFS   0x00030000

Definition at line 48 of file ipu-prv.h.

#define IPU_CM_CSI1_REG_OFS   0x00038000

Definition at line 49 of file ipu-prv.h.

#define IPU_CM_DC_REG_OFS   0x00058000

Definition at line 51 of file ipu-prv.h.

#define IPU_CM_DMFC_REG_OFS   0x00060000

Definition at line 52 of file ipu-prv.h.

#define IPU_CM_IC_REG_OFS   0x00020000

Definition at line 46 of file ipu-prv.h.

#define IPU_CM_IDMAC_REG_OFS   0x00008000

Definition at line 45 of file ipu-prv.h.

#define IPU_CM_IRT_REG_OFS   0x00028000

Definition at line 47 of file ipu-prv.h.

#define IPU_CM_REG (   offset)    (offset)

Definition at line 56 of file ipu-prv.h.

#define IPU_CM_SMFC_REG_OFS   0x00050000

Definition at line 50 of file ipu-prv.h.

#define IPU_CONF   IPU_CM_REG(0)

Definition at line 58 of file ipu-prv.h.

#define IPU_DI0_COUNTER_RELEASE   (1 << 24)

Definition at line 94 of file ipu-prv.h.

#define IPU_DI1_COUNTER_RELEASE   (1 << 25)

Definition at line 95 of file ipu-prv.h.

#define IPU_DISP_ALT1   IPU_CM_REG(0x00c8)

Definition at line 70 of file ipu-prv.h.

#define IPU_DISP_ALT2   IPU_CM_REG(0x00cc)

Definition at line 71 of file ipu-prv.h.

#define IPU_DISP_ALT3   IPU_CM_REG(0x00d0)

Definition at line 72 of file ipu-prv.h.

#define IPU_DISP_ALT4   IPU_CM_REG(0x00d4)

Definition at line 73 of file ipu-prv.h.

#define IPU_DISP_ALT_CONF   IPU_CM_REG(0x00c0)

Definition at line 68 of file ipu-prv.h.

#define IPU_DISP_GEN   IPU_CM_REG(0x00c4)

Definition at line 69 of file ipu-prv.h.

#define IPU_DISP_TASK_STAT   IPU_CM_REG(0x0254)

Definition at line 85 of file ipu-prv.h.

#define IPU_FS_DISP_FLOW1   IPU_CM_REG(0x00b4)

Definition at line 65 of file ipu-prv.h.

#define IPU_FS_DISP_FLOW2   IPU_CM_REG(0x00b8)

Definition at line 66 of file ipu-prv.h.

#define IPU_FS_PROC_FLOW1   IPU_CM_REG(0x00a8)

Definition at line 62 of file ipu-prv.h.

#define IPU_FS_PROC_FLOW2   IPU_CM_REG(0x00ac)

Definition at line 63 of file ipu-prv.h.

#define IPU_FS_PROC_FLOW3   IPU_CM_REG(0x00b0)

Definition at line 64 of file ipu-prv.h.

#define IPU_GPR   IPU_CM_REG(0x00e4)

Definition at line 77 of file ipu-prv.h.

#define IPU_IDMAC_REG (   offset)    (offset)

Definition at line 97 of file ipu-prv.h.

#define IPU_INT_CTRL (   n)    IPU_CM_REG(0x003C + 4 * (n))

Definition at line 91 of file ipu-prv.h.

#define IPU_INT_STAT (   n)    IPU_CM_REG(0x0200 + 4 * (n))

Definition at line 92 of file ipu-prv.h.

#define IPU_MCU_T_DEFAULT   8

Definition at line 44 of file ipu-prv.h.

#define IPU_MEM_RST   IPU_CM_REG(0x00dc)

Definition at line 75 of file ipu-prv.h.

#define IPU_NUM_IRQS   (32 * 5)

Definition at line 113 of file ipu-prv.h.

#define IPU_PM   IPU_CM_REG(0x00e0)

Definition at line 76 of file ipu-prv.h.

#define IPU_PROC_TASK_STAT   IPU_CM_REG(0x0250)

Definition at line 84 of file ipu-prv.h.

#define IPU_SKIP   IPU_CM_REG(0x00bc)

Definition at line 67 of file ipu-prv.h.

#define IPU_SNOOP   IPU_CM_REG(0x00d8)

Definition at line 74 of file ipu-prv.h.

#define IPU_SRM_PRI1   IPU_CM_REG(0x00a0)

Definition at line 60 of file ipu-prv.h.

#define IPU_SRM_PRI2   IPU_CM_REG(0x00a4)

Definition at line 61 of file ipu-prv.h.

#define IPU_SRM_STAT   IPU_CM_REG(0x024C)

Definition at line 83 of file ipu-prv.h.

#define IPUV3_CHANNEL_CSI0   0

Definition at line 27 of file ipu-prv.h.

#define IPUV3_CHANNEL_CSI1   1

Definition at line 28 of file ipu-prv.h.

#define IPUV3_CHANNEL_CSI2   2

Definition at line 29 of file ipu-prv.h.

#define IPUV3_CHANNEL_CSI3   3

Definition at line 30 of file ipu-prv.h.

#define IPUV3_CHANNEL_MEM_BG_SYNC   23

Definition at line 31 of file ipu-prv.h.

#define IPUV3_CHANNEL_MEM_BG_SYNC_ALPHA   51

Definition at line 42 of file ipu-prv.h.

#define IPUV3_CHANNEL_MEM_DC_ASYNC   41

Definition at line 35 of file ipu-prv.h.

#define IPUV3_CHANNEL_MEM_DC_SYNC   28

Definition at line 33 of file ipu-prv.h.

#define IPUV3_CHANNEL_MEM_FG_SYNC   27

Definition at line 32 of file ipu-prv.h.

#define IPUV3_CHANNEL_MEM_FG_SYNC_ALPHA   31

Definition at line 34 of file ipu-prv.h.

#define IPUV3_CHANNEL_ROT_ENC_MEM   45

Definition at line 36 of file ipu-prv.h.

#define IPUV3_CHANNEL_ROT_ENC_MEM_OUT   48

Definition at line 39 of file ipu-prv.h.

#define IPUV3_CHANNEL_ROT_PP_MEM   47

Definition at line 38 of file ipu-prv.h.

#define IPUV3_CHANNEL_ROT_PP_MEM_OUT   50

Definition at line 41 of file ipu-prv.h.

#define IPUV3_CHANNEL_ROT_VF_MEM   46

Definition at line 37 of file ipu-prv.h.

#define IPUV3_CHANNEL_ROT_VF_MEM_OUT   49

Definition at line 40 of file ipu-prv.h.

Enumeration Type Documentation

Enumerator:
IPU_CONF_CSI0_EN 
IPU_CONF_CSI1_EN 
IPU_CONF_IC_EN 
IPU_CONF_ROT_EN 
IPU_CONF_ISP_EN 
IPU_CONF_DP_EN 
IPU_CONF_DI0_EN 
IPU_CONF_DI1_EN 
IPU_CONF_SMFC_EN 
IPU_CONF_DC_EN 
IPU_CONF_DMFC_EN 
IPU_CONF_VDI_EN 
IPU_CONF_IDMAC_DIS 
IPU_CONF_IC_DMFC_SEL 
IPU_CONF_IC_DMFC_SYNC 
IPU_CONF_VDI_DMFC_SYNC 
IPU_CONF_CSI0_DATA_SOURCE 
IPU_CONF_CSI1_DATA_SOURCE 
IPU_CONF_IC_INPUT 
IPU_CONF_CSI_SEL 

Definition at line 115 of file ipu-prv.h.

Function Documentation

void ipu_cpmem_exit ( struct ipu_soc ipu)
int ipu_cpmem_init ( struct ipu_soc ipu,
struct device dev,
unsigned long  base 
)
void ipu_dc_exit ( struct ipu_soc ipu)

Definition at line 370 of file ipu-dc.c.

int ipu_dc_init ( struct ipu_soc ipu,
struct device dev,
unsigned long  base,
unsigned long  template_base 
)

Definition at line 315 of file ipu-dc.c.

void ipu_di_exit ( struct ipu_soc ipu,
int  id 
)

Definition at line 694 of file ipu-di.c.

int ipu_di_init ( struct ipu_soc ipu,
struct device dev,
int  id,
unsigned long  base,
u32  module,
struct clk ipu_clk 
)

Definition at line 626 of file ipu-di.c.

void ipu_dmfc_exit ( struct ipu_soc ipu)

Definition at line 406 of file ipu-dmfc.c.

int ipu_dmfc_init ( struct ipu_soc ipu,
struct device dev,
unsigned long  base,
struct clk ipu_clk 
)

Definition at line 361 of file ipu-dmfc.c.

void ipu_dp_exit ( struct ipu_soc ipu)

Definition at line 334 of file ipu-dp.c.

int ipu_dp_init ( struct ipu_soc ipu,
struct device dev,
unsigned long  base 
)

Definition at line 306 of file ipu-dp.c.

int ipu_module_disable ( struct ipu_soc ipu,
u32  mask 
)

Definition at line 521 of file ipu-common.c.

int ipu_module_enable ( struct ipu_soc ipu,
u32  mask 
)

Definition at line 495 of file ipu-common.c.

void ipu_srm_dp_sync_update ( struct ipu_soc ipu)

Definition at line 55 of file ipu-common.c.