Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
rfbi.c File Reference
#include <linux/kernel.h>
#include <linux/dma-mapping.h>
#include <linux/export.h>
#include <linux/vmalloc.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/kfifo.h>
#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/seq_file.h>
#include <linux/semaphore.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <video/omapdss.h>
#include "dss.h"

Go to the source code of this file.

Data Structures

struct  rfbi_reg
 

Macros

#define DSS_SUBSYS_NAME   "RFBI"
 
#define RFBI_REG(idx)   ((const struct rfbi_reg) { idx })
 
#define RFBI_REVISION   RFBI_REG(0x0000)
 
#define RFBI_SYSCONFIG   RFBI_REG(0x0010)
 
#define RFBI_SYSSTATUS   RFBI_REG(0x0014)
 
#define RFBI_CONTROL   RFBI_REG(0x0040)
 
#define RFBI_PIXEL_CNT   RFBI_REG(0x0044)
 
#define RFBI_LINE_NUMBER   RFBI_REG(0x0048)
 
#define RFBI_CMD   RFBI_REG(0x004c)
 
#define RFBI_PARAM   RFBI_REG(0x0050)
 
#define RFBI_DATA   RFBI_REG(0x0054)
 
#define RFBI_READ   RFBI_REG(0x0058)
 
#define RFBI_STATUS   RFBI_REG(0x005c)
 
#define RFBI_CONFIG(n)   RFBI_REG(0x0060 + (n)*0x18)
 
#define RFBI_ONOFF_TIME(n)   RFBI_REG(0x0064 + (n)*0x18)
 
#define RFBI_CYCLE_TIME(n)   RFBI_REG(0x0068 + (n)*0x18)
 
#define RFBI_DATA_CYCLE1(n)   RFBI_REG(0x006c + (n)*0x18)
 
#define RFBI_DATA_CYCLE2(n)   RFBI_REG(0x0070 + (n)*0x18)
 
#define RFBI_DATA_CYCLE3(n)   RFBI_REG(0x0074 + (n)*0x18)
 
#define RFBI_VSYNC_WIDTH   RFBI_REG(0x0090)
 
#define RFBI_HSYNC_WIDTH   RFBI_REG(0x0094)
 
#define REG_FLD_MOD(idx, val, start, end)   rfbi_write_reg(idx, FLD_MOD(rfbi_read_reg(idx), val, start, end))
 
#define DUMPREG(r)   seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r))
 

Enumerations

enum  omap_rfbi_cycleformat { OMAP_DSS_RFBI_CYCLEFORMAT_1_1 = 0, OMAP_DSS_RFBI_CYCLEFORMAT_2_1 = 1, OMAP_DSS_RFBI_CYCLEFORMAT_3_1 = 2, OMAP_DSS_RFBI_CYCLEFORMAT_3_2 = 3 }
 
enum  omap_rfbi_datatype { OMAP_DSS_RFBI_DATATYPE_12 = 0, OMAP_DSS_RFBI_DATATYPE_16 = 1, OMAP_DSS_RFBI_DATATYPE_18 = 2, OMAP_DSS_RFBI_DATATYPE_24 = 3 }
 
enum  omap_rfbi_parallelmode { OMAP_DSS_RFBI_PARALLELMODE_8 = 0, OMAP_DSS_RFBI_PARALLELMODE_9 = 1, OMAP_DSS_RFBI_PARALLELMODE_12 = 2, OMAP_DSS_RFBI_PARALLELMODE_16 = 3 }
 

Functions

void rfbi_bus_lock (void)
 
 EXPORT_SYMBOL (rfbi_bus_lock)
 
void rfbi_bus_unlock (void)
 
 EXPORT_SYMBOL (rfbi_bus_unlock)
 
void omap_rfbi_write_command (const void *buf, u32 len)
 
 EXPORT_SYMBOL (omap_rfbi_write_command)
 
void omap_rfbi_read_data (void *buf, u32 len)
 
 EXPORT_SYMBOL (omap_rfbi_read_data)
 
void omap_rfbi_write_data (const void *buf, u32 len)
 
 EXPORT_SYMBOL (omap_rfbi_write_data)
 
void omap_rfbi_write_pixels (const void __iomem *buf, int scr_width, u16 x, u16 y, u16 w, u16 h)
 
 EXPORT_SYMBOL (omap_rfbi_write_pixels)
 
int omap_rfbi_setup_te (enum omap_rfbi_te_mode mode, unsigned hs_pulse_time, unsigned vs_pulse_time, int hs_pol_inv, int vs_pol_inv, int extif_div)
 
 EXPORT_SYMBOL (omap_rfbi_setup_te)
 
int omap_rfbi_enable_te (bool enable, unsigned line)
 
 EXPORT_SYMBOL (omap_rfbi_enable_te)
 
int omap_rfbi_configure (struct omap_dss_device *dssdev)
 
 EXPORT_SYMBOL (omap_rfbi_configure)
 
int omap_rfbi_update (struct omap_dss_device *dssdev, void(*callback)(void *), void *data)
 
 EXPORT_SYMBOL (omap_rfbi_update)
 
void omapdss_rfbi_set_size (struct omap_dss_device *dssdev, u16 w, u16 h)
 
 EXPORT_SYMBOL (omapdss_rfbi_set_size)
 
void omapdss_rfbi_set_pixel_size (struct omap_dss_device *dssdev, int pixel_size)
 
 EXPORT_SYMBOL (omapdss_rfbi_set_pixel_size)
 
void omapdss_rfbi_set_data_lines (struct omap_dss_device *dssdev, int data_lines)
 
 EXPORT_SYMBOL (omapdss_rfbi_set_data_lines)
 
void omapdss_rfbi_set_interface_timings (struct omap_dss_device *dssdev, struct rfbi_timings *timings)
 
 EXPORT_SYMBOL (omapdss_rfbi_set_interface_timings)
 
int omapdss_rfbi_display_enable (struct omap_dss_device *dssdev)
 
 EXPORT_SYMBOL (omapdss_rfbi_display_enable)
 
void omapdss_rfbi_display_disable (struct omap_dss_device *dssdev)
 
 EXPORT_SYMBOL (omapdss_rfbi_display_disable)
 
int __init rfbi_init_platform_driver (void)
 
void __exit rfbi_uninit_platform_driver (void)
 

Macro Definition Documentation

#define DSS_SUBSYS_NAME   "RFBI"

Definition at line 23 of file rfbi.c.

#define DUMPREG (   r)    seq_printf(s, "%-35s %08x\n", #r, rfbi_read_reg(r))
#define REG_FLD_MOD (   idx,
  val,
  start,
  end 
)    rfbi_write_reg(idx, FLD_MOD(rfbi_read_reg(idx), val, start, end))

Definition at line 69 of file rfbi.c.

#define RFBI_CMD   RFBI_REG(0x004c)

Definition at line 53 of file rfbi.c.

#define RFBI_CONFIG (   n)    RFBI_REG(0x0060 + (n)*0x18)

Definition at line 59 of file rfbi.c.

#define RFBI_CONTROL   RFBI_REG(0x0040)

Definition at line 50 of file rfbi.c.

#define RFBI_CYCLE_TIME (   n)    RFBI_REG(0x0068 + (n)*0x18)

Definition at line 61 of file rfbi.c.

#define RFBI_DATA   RFBI_REG(0x0054)

Definition at line 55 of file rfbi.c.

#define RFBI_DATA_CYCLE1 (   n)    RFBI_REG(0x006c + (n)*0x18)

Definition at line 62 of file rfbi.c.

#define RFBI_DATA_CYCLE2 (   n)    RFBI_REG(0x0070 + (n)*0x18)

Definition at line 63 of file rfbi.c.

#define RFBI_DATA_CYCLE3 (   n)    RFBI_REG(0x0074 + (n)*0x18)

Definition at line 64 of file rfbi.c.

#define RFBI_HSYNC_WIDTH   RFBI_REG(0x0094)

Definition at line 67 of file rfbi.c.

#define RFBI_LINE_NUMBER   RFBI_REG(0x0048)

Definition at line 52 of file rfbi.c.

#define RFBI_ONOFF_TIME (   n)    RFBI_REG(0x0064 + (n)*0x18)

Definition at line 60 of file rfbi.c.

#define RFBI_PARAM   RFBI_REG(0x0050)

Definition at line 54 of file rfbi.c.

#define RFBI_PIXEL_CNT   RFBI_REG(0x0044)

Definition at line 51 of file rfbi.c.

#define RFBI_READ   RFBI_REG(0x0058)

Definition at line 56 of file rfbi.c.

#define RFBI_REG (   idx)    ((const struct rfbi_reg) { idx })

Definition at line 45 of file rfbi.c.

#define RFBI_REVISION   RFBI_REG(0x0000)

Definition at line 47 of file rfbi.c.

#define RFBI_STATUS   RFBI_REG(0x005c)

Definition at line 57 of file rfbi.c.

#define RFBI_SYSCONFIG   RFBI_REG(0x0010)

Definition at line 48 of file rfbi.c.

#define RFBI_SYSSTATUS   RFBI_REG(0x0014)

Definition at line 49 of file rfbi.c.

#define RFBI_VSYNC_WIDTH   RFBI_REG(0x0090)

Definition at line 66 of file rfbi.c.

Enumeration Type Documentation

Enumerator:
OMAP_DSS_RFBI_CYCLEFORMAT_1_1 
OMAP_DSS_RFBI_CYCLEFORMAT_2_1 
OMAP_DSS_RFBI_CYCLEFORMAT_3_1 
OMAP_DSS_RFBI_CYCLEFORMAT_3_2 

Definition at line 72 of file rfbi.c.

Enumerator:
OMAP_DSS_RFBI_DATATYPE_12 
OMAP_DSS_RFBI_DATATYPE_16 
OMAP_DSS_RFBI_DATATYPE_18 
OMAP_DSS_RFBI_DATATYPE_24 

Definition at line 79 of file rfbi.c.

Enumerator:
OMAP_DSS_RFBI_PARALLELMODE_8 
OMAP_DSS_RFBI_PARALLELMODE_9 
OMAP_DSS_RFBI_PARALLELMODE_12 
OMAP_DSS_RFBI_PARALLELMODE_16 

Definition at line 86 of file rfbi.c.

Function Documentation

EXPORT_SYMBOL ( rfbi_bus_lock  )
EXPORT_SYMBOL ( rfbi_bus_unlock  )
EXPORT_SYMBOL ( omap_rfbi_write_command  )
EXPORT_SYMBOL ( omap_rfbi_read_data  )
EXPORT_SYMBOL ( omap_rfbi_write_data  )
EXPORT_SYMBOL ( omap_rfbi_write_pixels  )
EXPORT_SYMBOL ( omap_rfbi_setup_te  )
EXPORT_SYMBOL ( omap_rfbi_enable_te  )
EXPORT_SYMBOL ( omap_rfbi_configure  )
EXPORT_SYMBOL ( omap_rfbi_update  )
EXPORT_SYMBOL ( omapdss_rfbi_set_size  )
EXPORT_SYMBOL ( omapdss_rfbi_set_pixel_size  )
EXPORT_SYMBOL ( omapdss_rfbi_set_data_lines  )
EXPORT_SYMBOL ( omapdss_rfbi_display_enable  )
EXPORT_SYMBOL ( omapdss_rfbi_display_disable  )
int omap_rfbi_configure ( struct omap_dss_device dssdev)

Definition at line 773 of file rfbi.c.

int omap_rfbi_enable_te ( bool  enable,
unsigned  line 
)

Definition at line 619 of file rfbi.c.

void omap_rfbi_read_data ( void buf,
u32  len 
)

Definition at line 194 of file rfbi.c.

int omap_rfbi_setup_te ( enum omap_rfbi_te_mode  mode,
unsigned  hs_pulse_time,
unsigned  vs_pulse_time,
int  hs_pol_inv,
int  vs_pol_inv,
int  extif_div 
)

Definition at line 577 of file rfbi.c.

int omap_rfbi_update ( struct omap_dss_device dssdev,
void(*)(void *)  callback,
void data 
)

Definition at line 780 of file rfbi.c.

void omap_rfbi_write_command ( const void buf,
u32  len 
)

Definition at line 166 of file rfbi.c.

void omap_rfbi_write_data ( const void buf,
u32  len 
)

Definition at line 226 of file rfbi.c.

void omap_rfbi_write_pixels ( const void __iomem buf,
int  scr_width,
u16  x,
u16  y,
u16  w,
u16  h 
)

Definition at line 255 of file rfbi.c.

void omapdss_rfbi_display_disable ( struct omap_dss_device dssdev)

Definition at line 934 of file rfbi.c.

int omapdss_rfbi_display_enable ( struct omap_dss_device dssdev)

Definition at line 891 of file rfbi.c.

void omapdss_rfbi_set_data_lines ( struct omap_dss_device dssdev,
int  data_lines 
)

Definition at line 800 of file rfbi.c.

void omapdss_rfbi_set_interface_timings ( struct omap_dss_device dssdev,
struct rfbi_timings timings 
)

Definition at line 806 of file rfbi.c.

void omapdss_rfbi_set_pixel_size ( struct omap_dss_device dssdev,
int  pixel_size 
)

Definition at line 794 of file rfbi.c.

void omapdss_rfbi_set_size ( struct omap_dss_device dssdev,
u16  w,
u16  h 
)

Definition at line 787 of file rfbi.c.

void rfbi_bus_lock ( void  )

Definition at line 154 of file rfbi.c.

void rfbi_bus_unlock ( void  )

Definition at line 160 of file rfbi.c.

int __init rfbi_init_platform_driver ( void  )

Definition at line 1133 of file rfbi.c.

void __exit rfbi_uninit_platform_driver ( void  )

Definition at line 1138 of file rfbi.c.

Variable Documentation

void __iomem* base

Definition at line 98 of file rfbi.c.

struct semaphore bus_lock

Definition at line 113 of file rfbi.c.

int data_lines

Definition at line 117 of file rfbi.c.

enum omap_rfbi_datatype datatype

Definition at line 102 of file rfbi.c.

struct omap_dss_device* dssdev[2]

Definition at line 111 of file rfbi.c.

void(* framedone_callback)(void *data)

Definition at line 108 of file rfbi.c.

void* framedone_callback_data

Definition at line 109 of file rfbi.c.

struct rfbi_timings intf_timings

Definition at line 118 of file rfbi.c.

unsigned long l4_khz

Definition at line 100 of file rfbi.c.

Definition at line 120 of file rfbi.c.

enum omap_rfbi_parallelmode parallelmode

Definition at line 103 of file rfbi.c.

Definition at line 97 of file rfbi.c.

int pixel_size

Definition at line 116 of file rfbi.c.

int te_enabled

Definition at line 106 of file rfbi.c.

enum omap_rfbi_te_mode te_mode

Definition at line 105 of file rfbi.c.

Definition at line 115 of file rfbi.c.