Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
da8xx-fb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fb.h>
#include <linux/dma-mapping.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <linux/pm_runtime.h>
#include <linux/interrupt.h>
#include <linux/wait.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/console.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/lcm.h>
#include <video/da8xx-fb.h>
#include <asm/div64.h>

Go to the source code of this file.

Data Structures

struct  da8xx_fb_par
 
struct  da8xx_panel
 

Macros

#define DRIVER_NAME   "da8xx_lcdc"
 
#define LCD_VERSION_1   1
 
#define LCD_VERSION_2   2
 
#define LCD_END_OF_FRAME1   BIT(9)
 
#define LCD_END_OF_FRAME0   BIT(8)
 
#define LCD_PL_LOAD_DONE   BIT(6)
 
#define LCD_FIFO_UNDERFLOW   BIT(5)
 
#define LCD_SYNC_LOST   BIT(2)
 
#define LCD_FRAME_DONE   BIT(0)
 
#define LCD_DMA_BURST_SIZE(x)   ((x) << 4)
 
#define LCD_DMA_BURST_1   0x0
 
#define LCD_DMA_BURST_2   0x1
 
#define LCD_DMA_BURST_4   0x2
 
#define LCD_DMA_BURST_8   0x3
 
#define LCD_DMA_BURST_16   0x4
 
#define LCD_V1_END_OF_FRAME_INT_ENA   BIT(2)
 
#define LCD_V2_END_OF_FRAME0_INT_ENA   BIT(8)
 
#define LCD_V2_END_OF_FRAME1_INT_ENA   BIT(9)
 
#define LCD_DUAL_FRAME_BUFFER_ENABLE   BIT(0)
 
#define LCD_CLK_DIVISOR(x)   ((x) << 8)
 
#define LCD_RASTER_MODE   0x01
 
#define LCD_PALETTE_LOAD_MODE(x)   ((x) << 20)
 
#define PALETTE_AND_DATA   0x00
 
#define PALETTE_ONLY   0x01
 
#define DATA_ONLY   0x02
 
#define LCD_MONO_8BIT_MODE   BIT(9)
 
#define LCD_RASTER_ORDER   BIT(8)
 
#define LCD_TFT_MODE   BIT(7)
 
#define LCD_V1_UNDERFLOW_INT_ENA   BIT(6)
 
#define LCD_V2_UNDERFLOW_INT_ENA   BIT(5)
 
#define LCD_V1_PL_INT_ENA   BIT(4)
 
#define LCD_V2_PL_INT_ENA   BIT(6)
 
#define LCD_MONOCHROME_MODE   BIT(1)
 
#define LCD_RASTER_ENABLE   BIT(0)
 
#define LCD_TFT_ALT_ENABLE   BIT(23)
 
#define LCD_STN_565_ENABLE   BIT(24)
 
#define LCD_V2_DMA_CLK_EN   BIT(2)
 
#define LCD_V2_LIDD_CLK_EN   BIT(1)
 
#define LCD_V2_CORE_CLK_EN   BIT(0)
 
#define LCD_V2_LPP_B10   26
 
#define LCD_V2_TFT_24BPP_MODE   BIT(25)
 
#define LCD_V2_TFT_24BPP_UNPACK   BIT(26)
 
#define LCD_AC_BIAS_TRANSITIONS_PER_INT(x)   ((x) << 16)
 
#define LCD_AC_BIAS_FREQUENCY(x)   ((x) << 8)
 
#define LCD_SYNC_CTRL   BIT(25)
 
#define LCD_SYNC_EDGE   BIT(24)
 
#define LCD_INVERT_PIXEL_CLOCK   BIT(22)
 
#define LCD_INVERT_LINE_CLOCK   BIT(21)
 
#define LCD_INVERT_FRAME_CLOCK   BIT(20)
 
#define LCD_PID_REG   0x0
 
#define LCD_CTRL_REG   0x4
 
#define LCD_STAT_REG   0x8
 
#define LCD_RASTER_CTRL_REG   0x28
 
#define LCD_RASTER_TIMING_0_REG   0x2C
 
#define LCD_RASTER_TIMING_1_REG   0x30
 
#define LCD_RASTER_TIMING_2_REG   0x34
 
#define LCD_DMA_CTRL_REG   0x40
 
#define LCD_DMA_FRM_BUF_BASE_ADDR_0_REG   0x44
 
#define LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG   0x48
 
#define LCD_DMA_FRM_BUF_BASE_ADDR_1_REG   0x4C
 
#define LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG   0x50
 
#define LCD_RAW_STAT_REG   0x58
 
#define LCD_MASKED_STAT_REG   0x5c
 
#define LCD_INT_ENABLE_SET_REG   0x60
 
#define LCD_INT_ENABLE_CLR_REG   0x64
 
#define LCD_END_OF_INT_IND_REG   0x68
 
#define LCD_CLK_ENABLE_REG   0x6c
 
#define LCD_CLK_RESET_REG   0x70
 
#define LCD_CLK_MAIN_RESET   BIT(3)
 
#define LCD_NUM_BUFFERS   2
 
#define WSI_TIMEOUT   50
 
#define PALETTE_SIZE   256
 
#define LEFT_MARGIN   64
 
#define RIGHT_MARGIN   64
 
#define UPPER_MARGIN   32
 
#define LOWER_MARGIN   32
 
#define CNVT_TOHW(val, width)   ((((val) << (width)) + 0x7FFF - (val)) >> 16)
 
#define fb_suspend   NULL
 
#define fb_resume   NULL
 

Functions

 module_init (da8xx_fb_init)
 
 module_exit (da8xx_fb_cleanup)
 
 MODULE_DESCRIPTION ("Framebuffer driver for TI da8xx/omap-l1xx")
 
 MODULE_AUTHOR ("Texas Instruments")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CNVT_TOHW (   val,
  width 
)    ((((val) << (width)) + 0x7FFF - (val)) >> 16)

Definition at line 597 of file da8xx-fb.c.

#define DATA_ONLY   0x02

Definition at line 75 of file da8xx-fb.c.

#define DRIVER_NAME   "da8xx_lcdc"

Definition at line 42 of file da8xx-fb.c.

#define fb_resume   NULL

Definition at line 1596 of file da8xx-fb.c.

#define fb_suspend   NULL

Definition at line 1595 of file da8xx-fb.c.

#define LCD_AC_BIAS_FREQUENCY (   x)    ((x) << 8)

Definition at line 97 of file da8xx-fb.c.

#define LCD_AC_BIAS_TRANSITIONS_PER_INT (   x)    ((x) << 16)

Definition at line 96 of file da8xx-fb.c.

#define LCD_CLK_DIVISOR (   x)    ((x) << 8)

Definition at line 68 of file da8xx-fb.c.

#define LCD_CLK_ENABLE_REG   0x6c

Definition at line 126 of file da8xx-fb.c.

#define LCD_CLK_MAIN_RESET   BIT(3)

Definition at line 128 of file da8xx-fb.c.

#define LCD_CLK_RESET_REG   0x70

Definition at line 127 of file da8xx-fb.c.

#define LCD_CTRL_REG   0x4

Definition at line 106 of file da8xx-fb.c.

#define LCD_DMA_BURST_1   0x0

Definition at line 57 of file da8xx-fb.c.

#define LCD_DMA_BURST_16   0x4

Definition at line 61 of file da8xx-fb.c.

#define LCD_DMA_BURST_2   0x1

Definition at line 58 of file da8xx-fb.c.

#define LCD_DMA_BURST_4   0x2

Definition at line 59 of file da8xx-fb.c.

#define LCD_DMA_BURST_8   0x3

Definition at line 60 of file da8xx-fb.c.

#define LCD_DMA_BURST_SIZE (   x)    ((x) << 4)

Definition at line 56 of file da8xx-fb.c.

#define LCD_DMA_CTRL_REG   0x40

Definition at line 112 of file da8xx-fb.c.

#define LCD_DMA_FRM_BUF_BASE_ADDR_0_REG   0x44

Definition at line 113 of file da8xx-fb.c.

#define LCD_DMA_FRM_BUF_BASE_ADDR_1_REG   0x4C

Definition at line 115 of file da8xx-fb.c.

#define LCD_DMA_FRM_BUF_CEILING_ADDR_0_REG   0x48

Definition at line 114 of file da8xx-fb.c.

#define LCD_DMA_FRM_BUF_CEILING_ADDR_1_REG   0x50

Definition at line 116 of file da8xx-fb.c.

#define LCD_DUAL_FRAME_BUFFER_ENABLE   BIT(0)

Definition at line 65 of file da8xx-fb.c.

#define LCD_END_OF_FRAME0   BIT(8)

Definition at line 49 of file da8xx-fb.c.

#define LCD_END_OF_FRAME1   BIT(9)

Definition at line 48 of file da8xx-fb.c.

#define LCD_END_OF_INT_IND_REG   0x68

Definition at line 123 of file da8xx-fb.c.

#define LCD_FIFO_UNDERFLOW   BIT(5)

Definition at line 51 of file da8xx-fb.c.

#define LCD_FRAME_DONE   BIT(0)

Definition at line 53 of file da8xx-fb.c.

#define LCD_INT_ENABLE_CLR_REG   0x64

Definition at line 122 of file da8xx-fb.c.

#define LCD_INT_ENABLE_SET_REG   0x60

Definition at line 121 of file da8xx-fb.c.

#define LCD_INVERT_FRAME_CLOCK   BIT(20)

Definition at line 102 of file da8xx-fb.c.

#define LCD_INVERT_LINE_CLOCK   BIT(21)

Definition at line 101 of file da8xx-fb.c.

#define LCD_INVERT_PIXEL_CLOCK   BIT(22)

Definition at line 100 of file da8xx-fb.c.

#define LCD_MASKED_STAT_REG   0x5c

Definition at line 120 of file da8xx-fb.c.

#define LCD_MONO_8BIT_MODE   BIT(9)

Definition at line 77 of file da8xx-fb.c.

#define LCD_MONOCHROME_MODE   BIT(1)

Definition at line 84 of file da8xx-fb.c.

#define LCD_NUM_BUFFERS   2

Definition at line 130 of file da8xx-fb.c.

#define LCD_PALETTE_LOAD_MODE (   x)    ((x) << 20)

Definition at line 72 of file da8xx-fb.c.

#define LCD_PID_REG   0x0

Definition at line 105 of file da8xx-fb.c.

#define LCD_PL_LOAD_DONE   BIT(6)

Definition at line 50 of file da8xx-fb.c.

#define LCD_RASTER_CTRL_REG   0x28

Definition at line 108 of file da8xx-fb.c.

#define LCD_RASTER_ENABLE   BIT(0)

Definition at line 85 of file da8xx-fb.c.

#define LCD_RASTER_MODE   0x01

Definition at line 69 of file da8xx-fb.c.

#define LCD_RASTER_ORDER   BIT(8)

Definition at line 78 of file da8xx-fb.c.

#define LCD_RASTER_TIMING_0_REG   0x2C

Definition at line 109 of file da8xx-fb.c.

#define LCD_RASTER_TIMING_1_REG   0x30

Definition at line 110 of file da8xx-fb.c.

#define LCD_RASTER_TIMING_2_REG   0x34

Definition at line 111 of file da8xx-fb.c.

#define LCD_RAW_STAT_REG   0x58

Definition at line 119 of file da8xx-fb.c.

#define LCD_STAT_REG   0x8

Definition at line 107 of file da8xx-fb.c.

#define LCD_STN_565_ENABLE   BIT(24)

Definition at line 87 of file da8xx-fb.c.

#define LCD_SYNC_CTRL   BIT(25)

Definition at line 98 of file da8xx-fb.c.

#define LCD_SYNC_EDGE   BIT(24)

Definition at line 99 of file da8xx-fb.c.

#define LCD_SYNC_LOST   BIT(2)

Definition at line 52 of file da8xx-fb.c.

#define LCD_TFT_ALT_ENABLE   BIT(23)

Definition at line 86 of file da8xx-fb.c.

#define LCD_TFT_MODE   BIT(7)

Definition at line 79 of file da8xx-fb.c.

#define LCD_V1_END_OF_FRAME_INT_ENA   BIT(2)

Definition at line 62 of file da8xx-fb.c.

#define LCD_V1_PL_INT_ENA   BIT(4)

Definition at line 82 of file da8xx-fb.c.

#define LCD_V1_UNDERFLOW_INT_ENA   BIT(6)

Definition at line 80 of file da8xx-fb.c.

#define LCD_V2_CORE_CLK_EN   BIT(0)

Definition at line 90 of file da8xx-fb.c.

#define LCD_V2_DMA_CLK_EN   BIT(2)

Definition at line 88 of file da8xx-fb.c.

#define LCD_V2_END_OF_FRAME0_INT_ENA   BIT(8)

Definition at line 63 of file da8xx-fb.c.

#define LCD_V2_END_OF_FRAME1_INT_ENA   BIT(9)

Definition at line 64 of file da8xx-fb.c.

#define LCD_V2_LIDD_CLK_EN   BIT(1)

Definition at line 89 of file da8xx-fb.c.

#define LCD_V2_LPP_B10   26

Definition at line 91 of file da8xx-fb.c.

#define LCD_V2_PL_INT_ENA   BIT(6)

Definition at line 83 of file da8xx-fb.c.

#define LCD_V2_TFT_24BPP_MODE   BIT(25)

Definition at line 92 of file da8xx-fb.c.

#define LCD_V2_TFT_24BPP_UNPACK   BIT(26)

Definition at line 93 of file da8xx-fb.c.

#define LCD_V2_UNDERFLOW_INT_ENA   BIT(5)

Definition at line 81 of file da8xx-fb.c.

#define LCD_VERSION_1   1

Definition at line 44 of file da8xx-fb.c.

#define LCD_VERSION_2   2

Definition at line 45 of file da8xx-fb.c.

#define LEFT_MARGIN   64

Definition at line 134 of file da8xx-fb.c.

#define LOWER_MARGIN   32

Definition at line 137 of file da8xx-fb.c.

#define PALETTE_AND_DATA   0x00

Definition at line 73 of file da8xx-fb.c.

#define PALETTE_ONLY   0x01

Definition at line 74 of file da8xx-fb.c.

#define PALETTE_SIZE   256

Definition at line 133 of file da8xx-fb.c.

#define RIGHT_MARGIN   64

Definition at line 135 of file da8xx-fb.c.

#define UPPER_MARGIN   32

Definition at line 136 of file da8xx-fb.c.

#define WSI_TIMEOUT   50

Definition at line 132 of file da8xx-fb.c.

Function Documentation

MODULE_AUTHOR ( "Texas Instruments"  )
MODULE_DESCRIPTION ( "Framebuffer driver for TI da8xx/omap-l1xx"  )
module_exit ( da8xx_fb_cleanup  )
module_init ( da8xx_fb_init  )
MODULE_LICENSE ( "GPL"  )