Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
sh_mobile_lcdcfb.c File Reference
#include <linux/atomic.h>
#include <linux/backlight.h>
#include <linux/clk.h>
#include <linux/console.h>
#include <linux/ctype.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/ioctl.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/videodev2.h>
#include <linux/vmalloc.h>
#include <video/sh_mobile_lcdc.h>
#include <video/sh_mobile_meram.h>
#include "sh_mobile_lcdcfb.h"

Go to the source code of this file.

Data Structures

struct  sh_mobile_lcdc_overlay
 
struct  sh_mobile_lcdc_priv
 
struct  sh_mobile_lcdc_format_info
 

Macros

#define LDBCR   0xb00
 
#define LDBCR_UPC(n)   (1 << ((n) + 16))
 
#define LDBCR_UPF(n)   (1 << ((n) + 8))
 
#define LDBCR_UPD(n)   (1 << ((n) + 0))
 
#define LDBnBSIFR(n)   (0xb20 + (n) * 0x20 + 0x00)
 
#define LDBBSIFR_EN   (1 << 31)
 
#define LDBBSIFR_VS   (1 << 29)
 
#define LDBBSIFR_BRSEL   (1 << 28)
 
#define LDBBSIFR_MX   (1 << 27)
 
#define LDBBSIFR_MY   (1 << 26)
 
#define LDBBSIFR_CV3   (3 << 24)
 
#define LDBBSIFR_CV2   (2 << 24)
 
#define LDBBSIFR_CV1   (1 << 24)
 
#define LDBBSIFR_CV0   (0 << 24)
 
#define LDBBSIFR_CV_MASK   (3 << 24)
 
#define LDBBSIFR_LAY_MASK   (0xff << 16)
 
#define LDBBSIFR_LAY_SHIFT   16
 
#define LDBBSIFR_ROP3_MASK   (0xff << 16)
 
#define LDBBSIFR_ROP3_SHIFT   16
 
#define LDBBSIFR_AL_PL8   (3 << 14)
 
#define LDBBSIFR_AL_PL1   (2 << 14)
 
#define LDBBSIFR_AL_PK   (1 << 14)
 
#define LDBBSIFR_AL_1   (0 << 14)
 
#define LDBBSIFR_AL_MASK   (3 << 14)
 
#define LDBBSIFR_SWPL   (1 << 10)
 
#define LDBBSIFR_SWPW   (1 << 9)
 
#define LDBBSIFR_SWPB   (1 << 8)
 
#define LDBBSIFR_RY   (1 << 7)
 
#define LDBBSIFR_CHRR_420   (2 << 0)
 
#define LDBBSIFR_CHRR_422   (1 << 0)
 
#define LDBBSIFR_CHRR_444   (0 << 0)
 
#define LDBBSIFR_RPKF_ARGB32   (0x00 << 0)
 
#define LDBBSIFR_RPKF_RGB16   (0x03 << 0)
 
#define LDBBSIFR_RPKF_RGB24   (0x0b << 0)
 
#define LDBBSIFR_RPKF_MASK   (0x1f << 0)
 
#define LDBnBSSZR(n)   (0xb20 + (n) * 0x20 + 0x04)
 
#define LDBBSSZR_BVSS_MASK   (0xfff << 16)
 
#define LDBBSSZR_BVSS_SHIFT   16
 
#define LDBBSSZR_BHSS_MASK   (0xfff << 0)
 
#define LDBBSSZR_BHSS_SHIFT   0
 
#define LDBnBLOCR(n)   (0xb20 + (n) * 0x20 + 0x08)
 
#define LDBBLOCR_CVLC_MASK   (0xfff << 16)
 
#define LDBBLOCR_CVLC_SHIFT   16
 
#define LDBBLOCR_CHLC_MASK   (0xfff << 0)
 
#define LDBBLOCR_CHLC_SHIFT   0
 
#define LDBnBSMWR(n)   (0xb20 + (n) * 0x20 + 0x0c)
 
#define LDBBSMWR_BSMWA_MASK   (0xffff << 16)
 
#define LDBBSMWR_BSMWA_SHIFT   16
 
#define LDBBSMWR_BSMW_MASK   (0xffff << 0)
 
#define LDBBSMWR_BSMW_SHIFT   0
 
#define LDBnBSAYR(n)   (0xb20 + (n) * 0x20 + 0x10)
 
#define LDBBSAYR_FG1A_MASK   (0xff << 24)
 
#define LDBBSAYR_FG1A_SHIFT   24
 
#define LDBBSAYR_FG1R_MASK   (0xff << 16)
 
#define LDBBSAYR_FG1R_SHIFT   16
 
#define LDBBSAYR_FG1G_MASK   (0xff << 8)
 
#define LDBBSAYR_FG1G_SHIFT   8
 
#define LDBBSAYR_FG1B_MASK   (0xff << 0)
 
#define LDBBSAYR_FG1B_SHIFT   0
 
#define LDBnBSACR(n)   (0xb20 + (n) * 0x20 + 0x14)
 
#define LDBBSACR_FG2A_MASK   (0xff << 24)
 
#define LDBBSACR_FG2A_SHIFT   24
 
#define LDBBSACR_FG2R_MASK   (0xff << 16)
 
#define LDBBSACR_FG2R_SHIFT   16
 
#define LDBBSACR_FG2G_MASK   (0xff << 8)
 
#define LDBBSACR_FG2G_SHIFT   8
 
#define LDBBSACR_FG2B_MASK   (0xff << 0)
 
#define LDBBSACR_FG2B_SHIFT   0
 
#define LDBnBSAAR(n)   (0xb20 + (n) * 0x20 + 0x18)
 
#define LDBBSAAR_AP_MASK   (0xff << 24)
 
#define LDBBSAAR_AP_SHIFT   24
 
#define LDBBSAAR_R_MASK   (0xff << 16)
 
#define LDBBSAAR_R_SHIFT   16
 
#define LDBBSAAR_GY_MASK   (0xff << 8)
 
#define LDBBSAAR_GY_SHIFT   8
 
#define LDBBSAAR_B_MASK   (0xff << 0)
 
#define LDBBSAAR_B_SHIFT   0
 
#define LDBnBPPCR(n)   (0xb20 + (n) * 0x20 + 0x1c)
 
#define LDBBPPCR_AP_MASK   (0xff << 24)
 
#define LDBBPPCR_AP_SHIFT   24
 
#define LDBBPPCR_R_MASK   (0xff << 16)
 
#define LDBBPPCR_R_SHIFT   16
 
#define LDBBPPCR_GY_MASK   (0xff << 8)
 
#define LDBBPPCR_GY_SHIFT   8
 
#define LDBBPPCR_B_MASK   (0xff << 0)
 
#define LDBBPPCR_B_SHIFT   0
 
#define LDBnBBGCL(n)   (0xb10 + (n) * 0x04)
 
#define LDBBBGCL_BGA_MASK   (0xff << 24)
 
#define LDBBBGCL_BGA_SHIFT   24
 
#define LDBBBGCL_BGR_MASK   (0xff << 16)
 
#define LDBBBGCL_BGR_SHIFT   16
 
#define LDBBBGCL_BGG_MASK   (0xff << 8)
 
#define LDBBBGCL_BGG_SHIFT   8
 
#define LDBBBGCL_BGB_MASK   (0xff << 0)
 
#define LDBBBGCL_BGB_SHIFT   0
 
#define SIDE_B_OFFSET   0x1000
 
#define MIRROR_OFFSET   0x2000
 
#define MAX_XRES   1920
 
#define MAX_YRES   1080
 

Enumerations

enum  sh_mobile_lcdc_overlay_mode { LCDC_OVERLAY_BLEND, LCDC_OVERLAY_ROP3 }
 

Functions

 module_platform_driver (sh_mobile_lcdc_driver)
 
 MODULE_DESCRIPTION ("SuperH Mobile LCDC Framebuffer driver")
 
 MODULE_AUTHOR ("Magnus Damm <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 

Variables

struct sh_mobile_lcdc_sys_bus_ops sh_mobile_lcdc_sys_bus_ops
 

Macro Definition Documentation

#define LDBBBGCL_BGA_MASK   (0xff << 24)

Definition at line 127 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGA_SHIFT   24

Definition at line 128 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGB_MASK   (0xff << 0)

Definition at line 133 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGB_SHIFT   0

Definition at line 134 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGG_MASK   (0xff << 8)

Definition at line 131 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGG_SHIFT   8

Definition at line 132 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGR_MASK   (0xff << 16)

Definition at line 129 of file sh_mobile_lcdcfb.c.

#define LDBBBGCL_BGR_SHIFT   16

Definition at line 130 of file sh_mobile_lcdcfb.c.

#define LDBBLOCR_CHLC_MASK   (0xfff << 0)

Definition at line 83 of file sh_mobile_lcdcfb.c.

#define LDBBLOCR_CHLC_SHIFT   0

Definition at line 84 of file sh_mobile_lcdcfb.c.

#define LDBBLOCR_CVLC_MASK   (0xfff << 16)

Definition at line 81 of file sh_mobile_lcdcfb.c.

#define LDBBLOCR_CVLC_SHIFT   16

Definition at line 82 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_AP_MASK   (0xff << 24)

Definition at line 118 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_AP_SHIFT   24

Definition at line 119 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_B_MASK   (0xff << 0)

Definition at line 124 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_B_SHIFT   0

Definition at line 125 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_GY_MASK   (0xff << 8)

Definition at line 122 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_GY_SHIFT   8

Definition at line 123 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_R_MASK   (0xff << 16)

Definition at line 120 of file sh_mobile_lcdcfb.c.

#define LDBBPPCR_R_SHIFT   16

Definition at line 121 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_AP_MASK   (0xff << 24)

Definition at line 109 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_AP_SHIFT   24

Definition at line 110 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_B_MASK   (0xff << 0)

Definition at line 115 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_B_SHIFT   0

Definition at line 116 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_GY_MASK   (0xff << 8)

Definition at line 113 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_GY_SHIFT   8

Definition at line 114 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_R_MASK   (0xff << 16)

Definition at line 111 of file sh_mobile_lcdcfb.c.

#define LDBBSAAR_R_SHIFT   16

Definition at line 112 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2A_MASK   (0xff << 24)

Definition at line 100 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2A_SHIFT   24

Definition at line 101 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2B_MASK   (0xff << 0)

Definition at line 106 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2B_SHIFT   0

Definition at line 107 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2G_MASK   (0xff << 8)

Definition at line 104 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2G_SHIFT   8

Definition at line 105 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2R_MASK   (0xff << 16)

Definition at line 102 of file sh_mobile_lcdcfb.c.

#define LDBBSACR_FG2R_SHIFT   16

Definition at line 103 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1A_MASK   (0xff << 24)

Definition at line 91 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1A_SHIFT   24

Definition at line 92 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1B_MASK   (0xff << 0)

Definition at line 97 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1B_SHIFT   0

Definition at line 98 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1G_MASK   (0xff << 8)

Definition at line 95 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1G_SHIFT   8

Definition at line 96 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1R_MASK   (0xff << 16)

Definition at line 93 of file sh_mobile_lcdcfb.c.

#define LDBBSAYR_FG1R_SHIFT   16

Definition at line 94 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_AL_1   (0 << 14)

Definition at line 62 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_AL_MASK   (3 << 14)

Definition at line 63 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_AL_PK   (1 << 14)

Definition at line 61 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_AL_PL1   (2 << 14)

Definition at line 60 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_AL_PL8   (3 << 14)

Definition at line 59 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_BRSEL   (1 << 28)

Definition at line 47 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CHRR_420   (2 << 0)

Definition at line 68 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CHRR_422   (1 << 0)

Definition at line 69 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CHRR_444   (0 << 0)

Definition at line 70 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CV0   (0 << 24)

Definition at line 53 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CV1   (1 << 24)

Definition at line 52 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CV2   (2 << 24)

Definition at line 51 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CV3   (3 << 24)

Definition at line 50 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_CV_MASK   (3 << 24)

Definition at line 54 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_EN   (1 << 31)

Definition at line 45 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_LAY_MASK   (0xff << 16)

Definition at line 55 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_LAY_SHIFT   16

Definition at line 56 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_MX   (1 << 27)

Definition at line 48 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_MY   (1 << 26)

Definition at line 49 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_ROP3_MASK   (0xff << 16)

Definition at line 57 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_ROP3_SHIFT   16

Definition at line 58 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_RPKF_ARGB32   (0x00 << 0)

Definition at line 71 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_RPKF_MASK   (0x1f << 0)

Definition at line 74 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_RPKF_RGB16   (0x03 << 0)

Definition at line 72 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_RPKF_RGB24   (0x0b << 0)

Definition at line 73 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_RY   (1 << 7)

Definition at line 67 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_SWPB   (1 << 8)

Definition at line 66 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_SWPL   (1 << 10)

Definition at line 64 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_SWPW   (1 << 9)

Definition at line 65 of file sh_mobile_lcdcfb.c.

#define LDBBSIFR_VS   (1 << 29)

Definition at line 46 of file sh_mobile_lcdcfb.c.

#define LDBBSMWR_BSMW_MASK   (0xffff << 0)

Definition at line 88 of file sh_mobile_lcdcfb.c.

#define LDBBSMWR_BSMW_SHIFT   0

Definition at line 89 of file sh_mobile_lcdcfb.c.

#define LDBBSMWR_BSMWA_MASK   (0xffff << 16)

Definition at line 86 of file sh_mobile_lcdcfb.c.

#define LDBBSMWR_BSMWA_SHIFT   16

Definition at line 87 of file sh_mobile_lcdcfb.c.

#define LDBBSSZR_BHSS_MASK   (0xfff << 0)

Definition at line 78 of file sh_mobile_lcdcfb.c.

#define LDBBSSZR_BHSS_SHIFT   0

Definition at line 79 of file sh_mobile_lcdcfb.c.

#define LDBBSSZR_BVSS_MASK   (0xfff << 16)

Definition at line 76 of file sh_mobile_lcdcfb.c.

#define LDBBSSZR_BVSS_SHIFT   16

Definition at line 77 of file sh_mobile_lcdcfb.c.

#define LDBCR   0xb00

Definition at line 40 of file sh_mobile_lcdcfb.c.

#define LDBCR_UPC (   n)    (1 << ((n) + 16))

Definition at line 41 of file sh_mobile_lcdcfb.c.

#define LDBCR_UPD (   n)    (1 << ((n) + 0))

Definition at line 43 of file sh_mobile_lcdcfb.c.

#define LDBCR_UPF (   n)    (1 << ((n) + 8))

Definition at line 42 of file sh_mobile_lcdcfb.c.

#define LDBnBBGCL (   n)    (0xb10 + (n) * 0x04)

Definition at line 126 of file sh_mobile_lcdcfb.c.

#define LDBnBLOCR (   n)    (0xb20 + (n) * 0x20 + 0x08)

Definition at line 80 of file sh_mobile_lcdcfb.c.

#define LDBnBPPCR (   n)    (0xb20 + (n) * 0x20 + 0x1c)

Definition at line 117 of file sh_mobile_lcdcfb.c.

#define LDBnBSAAR (   n)    (0xb20 + (n) * 0x20 + 0x18)

Definition at line 108 of file sh_mobile_lcdcfb.c.

#define LDBnBSACR (   n)    (0xb20 + (n) * 0x20 + 0x14)

Definition at line 99 of file sh_mobile_lcdcfb.c.

#define LDBnBSAYR (   n)    (0xb20 + (n) * 0x20 + 0x10)

Definition at line 90 of file sh_mobile_lcdcfb.c.

#define LDBnBSIFR (   n)    (0xb20 + (n) * 0x20 + 0x00)

Definition at line 44 of file sh_mobile_lcdcfb.c.

#define LDBnBSMWR (   n)    (0xb20 + (n) * 0x20 + 0x0c)

Definition at line 85 of file sh_mobile_lcdcfb.c.

#define LDBnBSSZR (   n)    (0xb20 + (n) * 0x20 + 0x04)

Definition at line 75 of file sh_mobile_lcdcfb.c.

#define MAX_XRES   1920

Definition at line 139 of file sh_mobile_lcdcfb.c.

#define MAX_YRES   1080

Definition at line 140 of file sh_mobile_lcdcfb.c.

#define MIRROR_OFFSET   0x2000

Definition at line 137 of file sh_mobile_lcdcfb.c.

#define SIDE_B_OFFSET   0x1000

Definition at line 136 of file sh_mobile_lcdcfb.c.

Enumeration Type Documentation

Enumerator:
LCDC_OVERLAY_BLEND 
LCDC_OVERLAY_ROP3 

Definition at line 142 of file sh_mobile_lcdcfb.c.

Function Documentation

MODULE_AUTHOR ( "Magnus Damm <[email protected]>"  )
MODULE_DESCRIPTION ( "SuperH Mobile LCDC Framebuffer driver )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( sh_mobile_lcdc_driver  )

Variable Documentation

Initial value:
= {
lcdc_sys_write_index,
lcdc_sys_write_data,
lcdc_sys_read_data,
}

Definition at line 441 of file sh_mobile_lcdcfb.c.