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

Go to the source code of this file.

Data Structures

struct  ipu_di
 
struct  di_sync_config
 

Macros

#define SYNC_WAVE   0
 
#define DI_GENERAL   0x0000
 
#define DI_BS_CLKGEN0   0x0004
 
#define DI_BS_CLKGEN1   0x0008
 
#define DI_SW_GEN0(gen)   (0x000c + 4 * ((gen) - 1))
 
#define DI_SW_GEN1(gen)   (0x0030 + 4 * ((gen) - 1))
 
#define DI_STP_REP(gen)   (0x0148 + 4 * (((gen) - 1)/2))
 
#define DI_SYNC_AS_GEN   0x0054
 
#define DI_DW_GEN(gen)   (0x0058 + 4 * (gen))
 
#define DI_DW_SET(gen, set)   (0x0088 + 4 * ((gen) + 0xc * (set)))
 
#define DI_SER_CONF   0x015c
 
#define DI_SSC   0x0160
 
#define DI_POL   0x0164
 
#define DI_AW0   0x0168
 
#define DI_AW1   0x016c
 
#define DI_SCR_CONF   0x0170
 
#define DI_STAT   0x0174
 
#define DI_SW_GEN0_RUN_COUNT(x)   ((x) << 19)
 
#define DI_SW_GEN0_RUN_SRC(x)   ((x) << 16)
 
#define DI_SW_GEN0_OFFSET_COUNT(x)   ((x) << 3)
 
#define DI_SW_GEN0_OFFSET_SRC(x)   ((x) << 0)
 
#define DI_SW_GEN1_CNT_POL_GEN_EN(x)   ((x) << 29)
 
#define DI_SW_GEN1_CNT_CLR_SRC(x)   ((x) << 25)
 
#define DI_SW_GEN1_CNT_POL_TRIGGER_SRC(x)   ((x) << 12)
 
#define DI_SW_GEN1_CNT_POL_CLR_SRC(x)   ((x) << 9)
 
#define DI_SW_GEN1_CNT_DOWN(x)   ((x) << 16)
 
#define DI_SW_GEN1_CNT_UP(x)   (x)
 
#define DI_SW_GEN1_AUTO_RELOAD   (0x10000000)
 
#define DI_DW_GEN_ACCESS_SIZE_OFFSET   24
 
#define DI_DW_GEN_COMPONENT_SIZE_OFFSET   16
 
#define DI_GEN_POLARITY_1   (1 << 0)
 
#define DI_GEN_POLARITY_2   (1 << 1)
 
#define DI_GEN_POLARITY_3   (1 << 2)
 
#define DI_GEN_POLARITY_4   (1 << 3)
 
#define DI_GEN_POLARITY_5   (1 << 4)
 
#define DI_GEN_POLARITY_6   (1 << 5)
 
#define DI_GEN_POLARITY_7   (1 << 6)
 
#define DI_GEN_POLARITY_8   (1 << 7)
 
#define DI_GEN_POLARITY_DISP_CLK   (1 << 17)
 
#define DI_GEN_DI_CLK_EXT   (1 << 20)
 
#define DI_GEN_DI_VSYNC_EXT   (1 << 21)
 
#define DI_POL_DRDY_DATA_POLARITY   (1 << 7)
 
#define DI_POL_DRDY_POLARITY_15   (1 << 4)
 
#define DI_VSYNC_SEL_OFFSET   13
 

Enumerations

enum  di_pins {
  DI_PIN11 = 0, DI_PIN12 = 1, DI_PIN13 = 2, DI_PIN14 = 3,
  DI_PIN15 = 4, DI_PIN16 = 5, DI_PIN17 = 6, DI_PIN_CS = 7,
  DI_PIN_SER_CLK = 0, DI_PIN_SER_RS = 1
}
 
enum  di_sync_wave {
  DI_SYNC_NONE = 0, DI_SYNC_CLK = 1, DI_SYNC_INT_HSYNC = 2, DI_SYNC_HSYNC = 3,
  DI_SYNC_VSYNC = 4, DI_SYNC_DE = 6
}
 

Functions

int ipu_di_init_sync_panel (struct ipu_di *di, struct ipu_di_signal_cfg *sig)
 
 EXPORT_SYMBOL_GPL (ipu_di_init_sync_panel)
 
int ipu_di_enable (struct ipu_di *di)
 
 EXPORT_SYMBOL_GPL (ipu_di_enable)
 
int ipu_di_disable (struct ipu_di *di)
 
 EXPORT_SYMBOL_GPL (ipu_di_disable)
 
int ipu_di_get_num (struct ipu_di *di)
 
 EXPORT_SYMBOL_GPL (ipu_di_get_num)
 
struct ipu_diipu_di_get (struct ipu_soc *ipu, int disp)
 
 EXPORT_SYMBOL_GPL (ipu_di_get)
 
void ipu_di_put (struct ipu_di *di)
 
 EXPORT_SYMBOL_GPL (ipu_di_put)
 
int ipu_di_init (struct ipu_soc *ipu, struct device *dev, int id, unsigned long base, u32 module, struct clk *clk_ipu)
 
void ipu_di_exit (struct ipu_soc *ipu, int id)
 

Macro Definition Documentation

#define DI_AW0   0x0168

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

#define DI_AW1   0x016c

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

#define DI_BS_CLKGEN0   0x0004

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

#define DI_BS_CLKGEN1   0x0008

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

#define DI_DW_GEN (   gen)    (0x0058 + 4 * (gen))

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

#define DI_DW_GEN_ACCESS_SIZE_OFFSET   24

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

#define DI_DW_GEN_COMPONENT_SIZE_OFFSET   16

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

#define DI_DW_SET (   gen,
  set 
)    (0x0088 + 4 * ((gen) + 0xc * (set)))

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

#define DI_GEN_DI_CLK_EXT   (1 << 20)

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

#define DI_GEN_DI_VSYNC_EXT   (1 << 21)

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

#define DI_GEN_POLARITY_1   (1 << 0)

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

#define DI_GEN_POLARITY_2   (1 << 1)

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

#define DI_GEN_POLARITY_3   (1 << 2)

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

#define DI_GEN_POLARITY_4   (1 << 3)

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

#define DI_GEN_POLARITY_5   (1 << 4)

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

#define DI_GEN_POLARITY_6   (1 << 5)

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

#define DI_GEN_POLARITY_7   (1 << 6)

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

#define DI_GEN_POLARITY_8   (1 << 7)

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

#define DI_GEN_POLARITY_DISP_CLK   (1 << 17)

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

#define DI_GENERAL   0x0000

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

#define DI_POL   0x0164

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

#define DI_POL_DRDY_DATA_POLARITY   (1 << 7)

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

#define DI_POL_DRDY_POLARITY_15   (1 << 4)

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

#define DI_SCR_CONF   0x0170

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

#define DI_SER_CONF   0x015c

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

#define DI_SSC   0x0160

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

#define DI_STAT   0x0174

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

#define DI_STP_REP (   gen)    (0x0148 + 4 * (((gen) - 1)/2))

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

#define DI_SW_GEN0 (   gen)    (0x000c + 4 * ((gen) - 1))

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

#define DI_SW_GEN0_OFFSET_COUNT (   x)    ((x) << 3)

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

#define DI_SW_GEN0_OFFSET_SRC (   x)    ((x) << 0)

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

#define DI_SW_GEN0_RUN_COUNT (   x)    ((x) << 19)

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

#define DI_SW_GEN0_RUN_SRC (   x)    ((x) << 16)

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

#define DI_SW_GEN1 (   gen)    (0x0030 + 4 * ((gen) - 1))

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

#define DI_SW_GEN1_AUTO_RELOAD   (0x10000000)

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

#define DI_SW_GEN1_CNT_CLR_SRC (   x)    ((x) << 25)

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

#define DI_SW_GEN1_CNT_DOWN (   x)    ((x) << 16)

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

#define DI_SW_GEN1_CNT_POL_CLR_SRC (   x)    ((x) << 9)

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

#define DI_SW_GEN1_CNT_POL_GEN_EN (   x)    ((x) << 29)

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

#define DI_SW_GEN1_CNT_POL_TRIGGER_SRC (   x)    ((x) << 12)

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

#define DI_SW_GEN1_CNT_UP (   x)    (x)

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

#define DI_SYNC_AS_GEN   0x0054

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

#define DI_VSYNC_SEL_OFFSET   13

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

#define SYNC_WAVE   0

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

Enumeration Type Documentation

enum di_pins
Enumerator:
DI_PIN11 
DI_PIN12 
DI_PIN13 
DI_PIN14 
DI_PIN15 
DI_PIN16 
DI_PIN17 
DI_PIN_CS 
DI_PIN_SER_CLK 
DI_PIN_SER_RS 

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

Enumerator:
DI_SYNC_NONE 
DI_SYNC_CLK 
DI_SYNC_INT_HSYNC 
DI_SYNC_HSYNC 
DI_SYNC_VSYNC 
DI_SYNC_DE 

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

Function Documentation

EXPORT_SYMBOL_GPL ( ipu_di_init_sync_panel  )
EXPORT_SYMBOL_GPL ( ipu_di_enable  )
EXPORT_SYMBOL_GPL ( ipu_di_disable  )
EXPORT_SYMBOL_GPL ( ipu_di_get_num  )
EXPORT_SYMBOL_GPL ( ipu_di_get  )
EXPORT_SYMBOL_GPL ( ipu_di_put  )
int ipu_di_disable ( struct ipu_di di)

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

int ipu_di_enable ( struct ipu_di di)

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

void ipu_di_exit ( struct ipu_soc ipu,
int  id 
)

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

struct ipu_di* ipu_di_get ( struct ipu_soc ipu,
int  disp 
)
read

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

int ipu_di_get_num ( struct ipu_di di)

Definition at line 584 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 clk_ipu 
)

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

int ipu_di_init_sync_panel ( struct ipu_di di,
struct ipu_di_signal_cfg sig 
)

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

void ipu_di_put ( struct ipu_di di)

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