Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
jz4740_fb.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/console.h>
#include <linux/fb.h>
#include <linux/dma-mapping.h>
#include <asm/mach-jz4740/jz4740_fb.h>
#include <asm/mach-jz4740/gpio.h>

Go to the source code of this file.

Data Structures

struct  jzfb_framedesc
 
struct  jzfb
 

Macros

#define JZ_REG_LCD_CFG   0x00
 
#define JZ_REG_LCD_VSYNC   0x04
 
#define JZ_REG_LCD_HSYNC   0x08
 
#define JZ_REG_LCD_VAT   0x0C
 
#define JZ_REG_LCD_DAH   0x10
 
#define JZ_REG_LCD_DAV   0x14
 
#define JZ_REG_LCD_PS   0x18
 
#define JZ_REG_LCD_CLS   0x1C
 
#define JZ_REG_LCD_SPL   0x20
 
#define JZ_REG_LCD_REV   0x24
 
#define JZ_REG_LCD_CTRL   0x30
 
#define JZ_REG_LCD_STATE   0x34
 
#define JZ_REG_LCD_IID   0x38
 
#define JZ_REG_LCD_DA0   0x40
 
#define JZ_REG_LCD_SA0   0x44
 
#define JZ_REG_LCD_FID0   0x48
 
#define JZ_REG_LCD_CMD0   0x4C
 
#define JZ_REG_LCD_DA1   0x50
 
#define JZ_REG_LCD_SA1   0x54
 
#define JZ_REG_LCD_FID1   0x58
 
#define JZ_REG_LCD_CMD1   0x5C
 
#define JZ_LCD_CFG_SLCD   BIT(31)
 
#define JZ_LCD_CFG_PS_DISABLE   BIT(23)
 
#define JZ_LCD_CFG_CLS_DISABLE   BIT(22)
 
#define JZ_LCD_CFG_SPL_DISABLE   BIT(21)
 
#define JZ_LCD_CFG_REV_DISABLE   BIT(20)
 
#define JZ_LCD_CFG_HSYNCM   BIT(19)
 
#define JZ_LCD_CFG_PCLKM   BIT(18)
 
#define JZ_LCD_CFG_INV   BIT(17)
 
#define JZ_LCD_CFG_SYNC_DIR   BIT(16)
 
#define JZ_LCD_CFG_PS_POLARITY   BIT(15)
 
#define JZ_LCD_CFG_CLS_POLARITY   BIT(14)
 
#define JZ_LCD_CFG_SPL_POLARITY   BIT(13)
 
#define JZ_LCD_CFG_REV_POLARITY   BIT(12)
 
#define JZ_LCD_CFG_HSYNC_ACTIVE_LOW   BIT(11)
 
#define JZ_LCD_CFG_PCLK_FALLING_EDGE   BIT(10)
 
#define JZ_LCD_CFG_DE_ACTIVE_LOW   BIT(9)
 
#define JZ_LCD_CFG_VSYNC_ACTIVE_LOW   BIT(8)
 
#define JZ_LCD_CFG_18_BIT   BIT(7)
 
#define JZ_LCD_CFG_PDW   (BIT(5) | BIT(4))
 
#define JZ_LCD_CFG_MODE_MASK   0xf
 
#define JZ_LCD_CTRL_BURST_4   (0x0 << 28)
 
#define JZ_LCD_CTRL_BURST_8   (0x1 << 28)
 
#define JZ_LCD_CTRL_BURST_16   (0x2 << 28)
 
#define JZ_LCD_CTRL_RGB555   BIT(27)
 
#define JZ_LCD_CTRL_OFUP   BIT(26)
 
#define JZ_LCD_CTRL_FRC_GRAYSCALE_16   (0x0 << 24)
 
#define JZ_LCD_CTRL_FRC_GRAYSCALE_4   (0x1 << 24)
 
#define JZ_LCD_CTRL_FRC_GRAYSCALE_2   (0x2 << 24)
 
#define JZ_LCD_CTRL_PDD_MASK   (0xff << 16)
 
#define JZ_LCD_CTRL_EOF_IRQ   BIT(13)
 
#define JZ_LCD_CTRL_SOF_IRQ   BIT(12)
 
#define JZ_LCD_CTRL_OFU_IRQ   BIT(11)
 
#define JZ_LCD_CTRL_IFU0_IRQ   BIT(10)
 
#define JZ_LCD_CTRL_IFU1_IRQ   BIT(9)
 
#define JZ_LCD_CTRL_DD_IRQ   BIT(8)
 
#define JZ_LCD_CTRL_QDD_IRQ   BIT(7)
 
#define JZ_LCD_CTRL_REVERSE_ENDIAN   BIT(6)
 
#define JZ_LCD_CTRL_LSB_FISRT   BIT(5)
 
#define JZ_LCD_CTRL_DISABLE   BIT(4)
 
#define JZ_LCD_CTRL_ENABLE   BIT(3)
 
#define JZ_LCD_CTRL_BPP_1   0x0
 
#define JZ_LCD_CTRL_BPP_2   0x1
 
#define JZ_LCD_CTRL_BPP_4   0x2
 
#define JZ_LCD_CTRL_BPP_8   0x3
 
#define JZ_LCD_CTRL_BPP_15_16   0x4
 
#define JZ_LCD_CTRL_BPP_18_24   0x5
 
#define JZ_LCD_CMD_SOF_IRQ   BIT(15)
 
#define JZ_LCD_CMD_EOF_IRQ   BIT(16)
 
#define JZ_LCD_CMD_ENABLE_PAL   BIT(12)
 
#define JZ_LCD_SYNC_MASK   0x3ff
 
#define JZ_LCD_STATE_DISABLED   BIT(0)
 
#define JZFB_PM_OPS   NULL
 

Functions

 module_init (jzfb_init)
 
 module_exit (jzfb_exit)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Lars-Peter Clausen <[email protected]>")
 
 MODULE_DESCRIPTION ("JZ4740 SoC LCD framebuffer driver")
 
 MODULE_ALIAS ("platform:jz4740-fb")
 

Variables

struct jzfb_framedesc __packed
 

Macro Definition Documentation

#define JZ_LCD_CFG_18_BIT   BIT(7)

Definition at line 71 of file jz4740_fb.c.

#define JZ_LCD_CFG_CLS_DISABLE   BIT(22)

Definition at line 56 of file jz4740_fb.c.

#define JZ_LCD_CFG_CLS_POLARITY   BIT(14)

Definition at line 64 of file jz4740_fb.c.

#define JZ_LCD_CFG_DE_ACTIVE_LOW   BIT(9)

Definition at line 69 of file jz4740_fb.c.

#define JZ_LCD_CFG_HSYNC_ACTIVE_LOW   BIT(11)

Definition at line 67 of file jz4740_fb.c.

#define JZ_LCD_CFG_HSYNCM   BIT(19)

Definition at line 59 of file jz4740_fb.c.

#define JZ_LCD_CFG_INV   BIT(17)

Definition at line 61 of file jz4740_fb.c.

#define JZ_LCD_CFG_MODE_MASK   0xf

Definition at line 73 of file jz4740_fb.c.

#define JZ_LCD_CFG_PCLK_FALLING_EDGE   BIT(10)

Definition at line 68 of file jz4740_fb.c.

#define JZ_LCD_CFG_PCLKM   BIT(18)

Definition at line 60 of file jz4740_fb.c.

#define JZ_LCD_CFG_PDW   (BIT(5) | BIT(4))

Definition at line 72 of file jz4740_fb.c.

#define JZ_LCD_CFG_PS_DISABLE   BIT(23)

Definition at line 55 of file jz4740_fb.c.

#define JZ_LCD_CFG_PS_POLARITY   BIT(15)

Definition at line 63 of file jz4740_fb.c.

#define JZ_LCD_CFG_REV_DISABLE   BIT(20)

Definition at line 58 of file jz4740_fb.c.

#define JZ_LCD_CFG_REV_POLARITY   BIT(12)

Definition at line 66 of file jz4740_fb.c.

#define JZ_LCD_CFG_SLCD   BIT(31)

Definition at line 54 of file jz4740_fb.c.

#define JZ_LCD_CFG_SPL_DISABLE   BIT(21)

Definition at line 57 of file jz4740_fb.c.

#define JZ_LCD_CFG_SPL_POLARITY   BIT(13)

Definition at line 65 of file jz4740_fb.c.

#define JZ_LCD_CFG_SYNC_DIR   BIT(16)

Definition at line 62 of file jz4740_fb.c.

#define JZ_LCD_CFG_VSYNC_ACTIVE_LOW   BIT(8)

Definition at line 70 of file jz4740_fb.c.

#define JZ_LCD_CMD_ENABLE_PAL   BIT(12)

Definition at line 104 of file jz4740_fb.c.

#define JZ_LCD_CMD_EOF_IRQ   BIT(16)

Definition at line 103 of file jz4740_fb.c.

#define JZ_LCD_CMD_SOF_IRQ   BIT(15)

Definition at line 102 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BPP_1   0x0

Definition at line 95 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BPP_15_16   0x4

Definition at line 99 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BPP_18_24   0x5

Definition at line 100 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BPP_2   0x1

Definition at line 96 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BPP_4   0x2

Definition at line 97 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BPP_8   0x3

Definition at line 98 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BURST_16   (0x2 << 28)

Definition at line 77 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BURST_4   (0x0 << 28)

Definition at line 75 of file jz4740_fb.c.

#define JZ_LCD_CTRL_BURST_8   (0x1 << 28)

Definition at line 76 of file jz4740_fb.c.

#define JZ_LCD_CTRL_DD_IRQ   BIT(8)

Definition at line 89 of file jz4740_fb.c.

#define JZ_LCD_CTRL_DISABLE   BIT(4)

Definition at line 93 of file jz4740_fb.c.

#define JZ_LCD_CTRL_ENABLE   BIT(3)

Definition at line 94 of file jz4740_fb.c.

#define JZ_LCD_CTRL_EOF_IRQ   BIT(13)

Definition at line 84 of file jz4740_fb.c.

#define JZ_LCD_CTRL_FRC_GRAYSCALE_16   (0x0 << 24)

Definition at line 80 of file jz4740_fb.c.

#define JZ_LCD_CTRL_FRC_GRAYSCALE_2   (0x2 << 24)

Definition at line 82 of file jz4740_fb.c.

#define JZ_LCD_CTRL_FRC_GRAYSCALE_4   (0x1 << 24)

Definition at line 81 of file jz4740_fb.c.

#define JZ_LCD_CTRL_IFU0_IRQ   BIT(10)

Definition at line 87 of file jz4740_fb.c.

#define JZ_LCD_CTRL_IFU1_IRQ   BIT(9)

Definition at line 88 of file jz4740_fb.c.

#define JZ_LCD_CTRL_LSB_FISRT   BIT(5)

Definition at line 92 of file jz4740_fb.c.

#define JZ_LCD_CTRL_OFU_IRQ   BIT(11)

Definition at line 86 of file jz4740_fb.c.

#define JZ_LCD_CTRL_OFUP   BIT(26)

Definition at line 79 of file jz4740_fb.c.

#define JZ_LCD_CTRL_PDD_MASK   (0xff << 16)

Definition at line 83 of file jz4740_fb.c.

#define JZ_LCD_CTRL_QDD_IRQ   BIT(7)

Definition at line 90 of file jz4740_fb.c.

#define JZ_LCD_CTRL_REVERSE_ENDIAN   BIT(6)

Definition at line 91 of file jz4740_fb.c.

#define JZ_LCD_CTRL_RGB555   BIT(27)

Definition at line 78 of file jz4740_fb.c.

#define JZ_LCD_CTRL_SOF_IRQ   BIT(12)

Definition at line 85 of file jz4740_fb.c.

#define JZ_LCD_STATE_DISABLED   BIT(0)

Definition at line 108 of file jz4740_fb.c.

#define JZ_LCD_SYNC_MASK   0x3ff

Definition at line 106 of file jz4740_fb.c.

#define JZ_REG_LCD_CFG   0x00

Definition at line 32 of file jz4740_fb.c.

#define JZ_REG_LCD_CLS   0x1C

Definition at line 39 of file jz4740_fb.c.

#define JZ_REG_LCD_CMD0   0x4C

Definition at line 48 of file jz4740_fb.c.

#define JZ_REG_LCD_CMD1   0x5C

Definition at line 52 of file jz4740_fb.c.

#define JZ_REG_LCD_CTRL   0x30

Definition at line 42 of file jz4740_fb.c.

#define JZ_REG_LCD_DA0   0x40

Definition at line 45 of file jz4740_fb.c.

#define JZ_REG_LCD_DA1   0x50

Definition at line 49 of file jz4740_fb.c.

#define JZ_REG_LCD_DAH   0x10

Definition at line 36 of file jz4740_fb.c.

#define JZ_REG_LCD_DAV   0x14

Definition at line 37 of file jz4740_fb.c.

#define JZ_REG_LCD_FID0   0x48

Definition at line 47 of file jz4740_fb.c.

#define JZ_REG_LCD_FID1   0x58

Definition at line 51 of file jz4740_fb.c.

#define JZ_REG_LCD_HSYNC   0x08

Definition at line 34 of file jz4740_fb.c.

#define JZ_REG_LCD_IID   0x38

Definition at line 44 of file jz4740_fb.c.

#define JZ_REG_LCD_PS   0x18

Definition at line 38 of file jz4740_fb.c.

#define JZ_REG_LCD_REV   0x24

Definition at line 41 of file jz4740_fb.c.

#define JZ_REG_LCD_SA0   0x44

Definition at line 46 of file jz4740_fb.c.

#define JZ_REG_LCD_SA1   0x54

Definition at line 50 of file jz4740_fb.c.

#define JZ_REG_LCD_SPL   0x20

Definition at line 40 of file jz4740_fb.c.

#define JZ_REG_LCD_STATE   0x34

Definition at line 43 of file jz4740_fb.c.

#define JZ_REG_LCD_VAT   0x0C

Definition at line 35 of file jz4740_fb.c.

#define JZ_REG_LCD_VSYNC   0x04

Definition at line 33 of file jz4740_fb.c.

#define JZFB_PM_OPS   NULL

Definition at line 792 of file jz4740_fb.c.

Function Documentation

MODULE_ALIAS ( "platform:jz4740-fb )
MODULE_AUTHOR ( "Lars-Peter Clausen <[email protected]>"  )
MODULE_DESCRIPTION ( "JZ4740 SoC LCD framebuffer driver )
module_exit ( jzfb_exit  )
module_init ( jzfb_init  )
MODULE_LICENSE ( "GPL"  )

Variable Documentation