Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ipu-dc.c File Reference
#include <linux/export.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/io.h>
#include "imx-ipu-v3.h"
#include "ipu-prv.h"

Go to the source code of this file.

Data Structures

struct  ipu_dc
 
struct  ipu_dc_priv
 

Macros

#define DC_MAP_CONF_PTR(n)   (0x108 + ((n) & ~0x1) * 2)
 
#define DC_MAP_CONF_VAL(n)   (0x144 + ((n) & ~0x1) * 2)
 
#define DC_EVT_NF   0
 
#define DC_EVT_NL   1
 
#define DC_EVT_EOF   2
 
#define DC_EVT_NFIELD   3
 
#define DC_EVT_EOL   4
 
#define DC_EVT_EOFIELD   5
 
#define DC_EVT_NEW_ADDR   6
 
#define DC_EVT_NEW_CHAN   7
 
#define DC_EVT_NEW_DATA   8
 
#define DC_EVT_NEW_ADDR_W_0   0
 
#define DC_EVT_NEW_ADDR_W_1   1
 
#define DC_EVT_NEW_CHAN_W_0   2
 
#define DC_EVT_NEW_CHAN_W_1   3
 
#define DC_EVT_NEW_DATA_W_0   4
 
#define DC_EVT_NEW_DATA_W_1   5
 
#define DC_EVT_NEW_ADDR_R_0   6
 
#define DC_EVT_NEW_ADDR_R_1   7
 
#define DC_EVT_NEW_CHAN_R_0   8
 
#define DC_EVT_NEW_CHAN_R_1   9
 
#define DC_EVT_NEW_DATA_R_0   10
 
#define DC_EVT_NEW_DATA_R_1   11
 
#define DC_WR_CH_CONF   0x0
 
#define DC_WR_CH_ADDR   0x4
 
#define DC_RL_CH(evt)   (8 + ((evt) & ~0x1) * 2)
 
#define DC_GEN   0xd4
 
#define DC_DISP_CONF1(disp)   (0xd8 + (disp) * 4)
 
#define DC_DISP_CONF2(disp)   (0xe8 + (disp) * 4)
 
#define DC_STAT   0x1c8
 
#define WROD(lf)   (0x18 | ((lf) << 1))
 
#define WRG   0x01
 
#define SYNC_WAVE   0
 
#define DC_GEN_SYNC_1_6_SYNC   (2 << 1)
 
#define DC_GEN_SYNC_PRIORITY_1   (1 << 7)
 
#define DC_WR_CH_CONF_WORD_SIZE_8   (0 << 0)
 
#define DC_WR_CH_CONF_WORD_SIZE_16   (1 << 0)
 
#define DC_WR_CH_CONF_WORD_SIZE_24   (2 << 0)
 
#define DC_WR_CH_CONF_WORD_SIZE_32   (3 << 0)
 
#define DC_WR_CH_CONF_DISP_ID_PARALLEL(i)   (((i) & 0x1) << 3)
 
#define DC_WR_CH_CONF_DISP_ID_SERIAL   (2 << 3)
 
#define DC_WR_CH_CONF_DISP_ID_ASYNC   (3 << 4)
 
#define DC_WR_CH_CONF_FIELD_MODE   (1 << 9)
 
#define DC_WR_CH_CONF_PROG_TYPE_NORMAL   (4 << 5)
 
#define DC_WR_CH_CONF_PROG_TYPE_MASK   (7 << 5)
 
#define DC_WR_CH_CONF_PROG_DI_ID   (1 << 2)
 
#define DC_WR_CH_CONF_PROG_DISP_ID(i)   (((i) & 0x1) << 3)
 
#define IPU_DC_NUM_CHANNELS   10
 

Enumerations

enum  ipu_dc_map { IPU_DC_MAP_RGB24, IPU_DC_MAP_RGB565 }
 

Functions

int ipu_dc_init_sync (struct ipu_dc *dc, struct ipu_di *di, bool interlaced, u32 pixel_fmt, u32 width)
 
 EXPORT_SYMBOL_GPL (ipu_dc_init_sync)
 
void ipu_dc_enable_channel (struct ipu_dc *dc)
 
 EXPORT_SYMBOL_GPL (ipu_dc_enable_channel)
 
void ipu_dc_disable_channel (struct ipu_dc *dc)
 
 EXPORT_SYMBOL_GPL (ipu_dc_disable_channel)
 
struct ipu_dcipu_dc_get (struct ipu_soc *ipu, int channel)
 
 EXPORT_SYMBOL_GPL (ipu_dc_get)
 
void ipu_dc_put (struct ipu_dc *dc)
 
 EXPORT_SYMBOL_GPL (ipu_dc_put)
 
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)
 

Macro Definition Documentation

#define DC_DISP_CONF1 (   disp)    (0xd8 + (disp) * 4)

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

#define DC_DISP_CONF2 (   disp)    (0xe8 + (disp) * 4)

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

#define DC_EVT_EOF   2

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

#define DC_EVT_EOFIELD   5

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

#define DC_EVT_EOL   4

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

#define DC_EVT_NEW_ADDR   6

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

#define DC_EVT_NEW_ADDR_R_0   6

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

#define DC_EVT_NEW_ADDR_R_1   7

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

#define DC_EVT_NEW_ADDR_W_0   0

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

#define DC_EVT_NEW_ADDR_W_1   1

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

#define DC_EVT_NEW_CHAN   7

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

#define DC_EVT_NEW_CHAN_R_0   8

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

#define DC_EVT_NEW_CHAN_R_1   9

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

#define DC_EVT_NEW_CHAN_W_0   2

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

#define DC_EVT_NEW_CHAN_W_1   3

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

#define DC_EVT_NEW_DATA   8

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

#define DC_EVT_NEW_DATA_R_0   10

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

#define DC_EVT_NEW_DATA_R_1   11

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

#define DC_EVT_NEW_DATA_W_0   4

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

#define DC_EVT_NEW_DATA_W_1   5

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

#define DC_EVT_NF   0

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

#define DC_EVT_NFIELD   3

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

#define DC_EVT_NL   1

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

#define DC_GEN   0xd4

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

#define DC_GEN_SYNC_1_6_SYNC   (2 << 1)

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

#define DC_GEN_SYNC_PRIORITY_1   (1 << 7)

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

#define DC_MAP_CONF_PTR (   n)    (0x108 + ((n) & ~0x1) * 2)

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

#define DC_MAP_CONF_VAL (   n)    (0x144 + ((n) & ~0x1) * 2)

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

#define DC_RL_CH (   evt)    (8 + ((evt) & ~0x1) * 2)

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

#define DC_STAT   0x1c8

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

#define DC_WR_CH_ADDR   0x4

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

#define DC_WR_CH_CONF   0x0

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

#define DC_WR_CH_CONF_DISP_ID_ASYNC   (3 << 4)

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

#define DC_WR_CH_CONF_DISP_ID_PARALLEL (   i)    (((i) & 0x1) << 3)

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

#define DC_WR_CH_CONF_DISP_ID_SERIAL   (2 << 3)

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

#define DC_WR_CH_CONF_FIELD_MODE   (1 << 9)

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

#define DC_WR_CH_CONF_PROG_DI_ID   (1 << 2)

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

#define DC_WR_CH_CONF_PROG_DISP_ID (   i)    (((i) & 0x1) << 3)

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

#define DC_WR_CH_CONF_PROG_TYPE_MASK   (7 << 5)

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

#define DC_WR_CH_CONF_PROG_TYPE_NORMAL   (4 << 5)

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

#define DC_WR_CH_CONF_WORD_SIZE_16   (1 << 0)

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

#define DC_WR_CH_CONF_WORD_SIZE_24   (2 << 0)

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

#define DC_WR_CH_CONF_WORD_SIZE_32   (3 << 0)

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

#define DC_WR_CH_CONF_WORD_SIZE_8   (0 << 0)

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

#define IPU_DC_NUM_CHANNELS   10

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

#define SYNC_WAVE   0

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

#define WRG   0x01

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

#define WROD (   lf)    (0x18 | ((lf) << 1))

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

Enumeration Type Documentation

enum ipu_dc_map
Enumerator:
IPU_DC_MAP_RGB24 
IPU_DC_MAP_RGB565 

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

Function Documentation

EXPORT_SYMBOL_GPL ( ipu_dc_init_sync  )
EXPORT_SYMBOL_GPL ( ipu_dc_enable_channel  )
EXPORT_SYMBOL_GPL ( ipu_dc_disable_channel  )
EXPORT_SYMBOL_GPL ( ipu_dc_get  )
EXPORT_SYMBOL_GPL ( ipu_dc_put  )
void ipu_dc_disable_channel ( struct ipu_dc dc)

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

void ipu_dc_enable_channel ( struct ipu_dc dc)

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

void ipu_dc_exit ( struct ipu_soc ipu)

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

struct ipu_dc* ipu_dc_get ( struct ipu_soc ipu,
int  channel 
)
read

Definition at line 280 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.

int ipu_dc_init_sync ( struct ipu_dc dc,
struct ipu_di di,
bool  interlaced,
u32  pixel_fmt,
u32  width 
)

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

void ipu_dc_put ( struct ipu_dc dc)

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