Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dss.c File Reference
#include <linux/kernel.h>
#include <linux/io.h>
#include <linux/export.h>
#include <linux/err.h>
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/gfp.h>
#include <video/omapdss.h>
#include <plat/cpu.h>
#include "dss.h"
#include "dss_features.h"

Go to the source code of this file.

Data Structures

struct  dss_reg
 
struct  dss_features
 

Macros

#define DSS_SUBSYS_NAME   "DSS"
 
#define DSS_SZ_REGS   SZ_512
 
#define DSS_REG(idx)   ((const struct dss_reg) { idx })
 
#define DSS_REVISION   DSS_REG(0x0000)
 
#define DSS_SYSCONFIG   DSS_REG(0x0010)
 
#define DSS_SYSSTATUS   DSS_REG(0x0014)
 
#define DSS_CONTROL   DSS_REG(0x0040)
 
#define DSS_SDI_CONTROL   DSS_REG(0x0044)
 
#define DSS_PLL_CONTROL   DSS_REG(0x0048)
 
#define DSS_SDI_STATUS   DSS_REG(0x005C)
 
#define REG_GET(idx, start, end)   FLD_GET(dss_read_reg(idx), start, end)
 
#define REG_FLD_MOD(idx, val, start, end)   dss_write_reg(idx, FLD_MOD(dss_read_reg(idx), val, start, end))
 
#define SR(reg)   dss.ctx[(DSS_##reg).idx / sizeof(u32)] = dss_read_reg(DSS_##reg)
 
#define RR(reg)   dss_write_reg(DSS_##reg, dss.ctx[(DSS_##reg).idx / sizeof(u32)])
 
#define DUMPREG(r)   seq_printf(s, "%-35s %08x\n", #r, dss_read_reg(r))
 

Functions

void dss_sdi_init (int datapairs)
 
int dss_sdi_enable (void)
 
void dss_sdi_disable (void)
 
const chardss_get_generic_clk_source_name (enum omap_dss_clk_source clk_src)
 
void dss_dump_clocks (struct seq_file *s)
 
void dss_select_dispc_clk_source (enum omap_dss_clk_source clk_src)
 
void dss_select_dsi_clk_source (int dsi_module, enum omap_dss_clk_source clk_src)
 
void dss_select_lcd_clk_source (enum omap_channel channel, enum omap_dss_clk_source clk_src)
 
enum omap_dss_clk_source dss_get_dispc_clk_source (void)
 
enum omap_dss_clk_source dss_get_dsi_clk_source (int dsi_module)
 
enum omap_dss_clk_source dss_get_lcd_clk_source (enum omap_channel channel)
 
int dss_set_clock_div (struct dss_clock_info *cinfo)
 
unsigned long dss_get_dpll4_rate (void)
 
int dss_calc_clock_div (unsigned long req_pck, struct dss_clock_info *dss_cinfo, struct dispc_clock_info *dispc_cinfo)
 
void dss_set_venc_output (enum omap_dss_venc_type type)
 
void dss_set_dac_pwrdn_bgz (bool enable)
 
void dss_select_hdmi_venc_clk_source (enum dss_hdmi_venc_clk_source_select src)
 
enum
dss_hdmi_venc_clk_source_select 
dss_get_hdmi_venc_clk_source (void)
 
int dss_dpi_select_source (enum omap_channel channel)
 
int __init dss_init_platform_driver (void)
 
void dss_uninit_platform_driver (void)
 

Macro Definition Documentation

#define DSS_CONTROL   DSS_REG(0x0040)

Definition at line 54 of file dss.c.

#define DSS_PLL_CONTROL   DSS_REG(0x0048)

Definition at line 56 of file dss.c.

#define DSS_REG (   idx)    ((const struct dss_reg) { idx })

Definition at line 49 of file dss.c.

#define DSS_REVISION   DSS_REG(0x0000)

Definition at line 51 of file dss.c.

#define DSS_SDI_CONTROL   DSS_REG(0x0044)

Definition at line 55 of file dss.c.

#define DSS_SDI_STATUS   DSS_REG(0x005C)

Definition at line 57 of file dss.c.

#define DSS_SUBSYS_NAME   "DSS"

Definition at line 23 of file dss.c.

#define DSS_SYSCONFIG   DSS_REG(0x0010)

Definition at line 52 of file dss.c.

#define DSS_SYSSTATUS   DSS_REG(0x0014)

Definition at line 53 of file dss.c.

#define DSS_SZ_REGS   SZ_512

Definition at line 43 of file dss.c.

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

Definition at line 62 of file dss.c.

#define REG_GET (   idx,
  start,
  end 
)    FLD_GET(dss_read_reg(idx), start, end)

Definition at line 59 of file dss.c.

#define RR (   reg)    dss_write_reg(DSS_##reg, dss.ctx[(DSS_##reg).idx / sizeof(u32)])

Definition at line 115 of file dss.c.

#define SR (   reg)    dss.ctx[(DSS_##reg).idx / sizeof(u32)] = dss_read_reg(DSS_##reg)

Definition at line 113 of file dss.c.

Function Documentation

int dss_calc_clock_div ( unsigned long  req_pck,
struct dss_clock_info dss_cinfo,
struct dispc_clock_info dispc_cinfo 
)

Definition at line 464 of file dss.c.

int dss_dpi_select_source ( enum omap_channel  channel)

Definition at line 681 of file dss.c.

void dss_dump_clocks ( struct seq_file s)

Definition at line 248 of file dss.c.

enum omap_dss_clk_source dss_get_dispc_clk_source ( void  )

Definition at line 411 of file dss.c.

unsigned long dss_get_dpll4_rate ( void  )

Definition at line 456 of file dss.c.

enum omap_dss_clk_source dss_get_dsi_clk_source ( int  dsi_module)

Definition at line 416 of file dss.c.

const char* dss_get_generic_clk_source_name ( enum omap_dss_clk_source  clk_src)

Definition at line 243 of file dss.c.

enum dss_hdmi_venc_clk_source_select dss_get_hdmi_venc_clk_source ( void  )

Definition at line 613 of file dss.c.

enum omap_dss_clk_source dss_get_lcd_clk_source ( enum omap_channel  channel)

Definition at line 421 of file dss.c.

int __init dss_init_platform_driver ( void  )

Definition at line 943 of file dss.c.

void dss_sdi_disable ( void  )

Definition at line 233 of file dss.c.

int dss_sdi_enable ( void  )

Definition at line 175 of file dss.c.

void dss_sdi_init ( int  datapairs)

Definition at line 156 of file dss.c.

void dss_select_dispc_clk_source ( enum omap_dss_clk_source  clk_src)

Definition at line 306 of file dss.c.

void dss_select_dsi_clk_source ( int  dsi_module,
enum omap_dss_clk_source  clk_src 
)

Definition at line 338 of file dss.c.

void dss_select_hdmi_venc_clk_source ( enum dss_hdmi_venc_clk_source_select  src)

Definition at line 599 of file dss.c.

void dss_select_lcd_clk_source ( enum omap_channel  channel,
enum omap_dss_clk_source  clk_src 
)

Definition at line 371 of file dss.c.

int dss_set_clock_div ( struct dss_clock_info cinfo)

Definition at line 434 of file dss.c.

void dss_set_dac_pwrdn_bgz ( bool  enable)

Definition at line 594 of file dss.c.

void dss_set_venc_output ( enum omap_dss_venc_type  type)

Definition at line 579 of file dss.c.

void dss_uninit_platform_driver ( void  )

Definition at line 948 of file dss.c.

Variable Documentation

void __iomem* base

Definition at line 77 of file dss.c.

struct dispc_clock_info cache_dispc_cinfo

Definition at line 85 of file dss.c.

struct dss_clock_info cache_dss_cinfo

Definition at line 84 of file dss.c.

unsigned long cache_prate

Definition at line 83 of file dss.c.

unsigned long cache_req_pck

Definition at line 82 of file dss.c.

Definition at line 92 of file dss.c.

bool ctx_valid

Definition at line 91 of file dss.c.

enum omap_dss_clk_source dispc_clk_source

Definition at line 88 of file dss.c.

struct clk* dpll4_m4_ck

Definition at line 79 of file dss.c.

enum omap_dss_clk_source dsi_clk_source[MAX_NUM_DSI]

Definition at line 87 of file dss.c.

struct clk* dss_clk

Definition at line 80 of file dss.c.

Definition at line 94 of file dss.c.

Definition at line 89 of file dss.c.

Definition at line 76 of file dss.c.