Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
imxfb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/fb.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/cpufreq.h>
#include <linux/clk.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/math64.h>
#include <linux/platform_data/video-imxfb.h>
#include <mach/hardware.h>

Go to the source code of this file.

Data Structures

struct  imxfb_rgb
 
struct  imxfb_info
 

Macros

#define DEBUG_VAR   1
 
#define DRIVER_NAME   "imx-fb"
 
#define LCDC_SSA   0x00
 
#define LCDC_SIZE   0x04
 
#define SIZE_XMAX(x)   ((((x) >> 4) & 0x3f) << 20)
 
#define YMAX_MASK   (cpu_is_mx1() ? 0x1ff : 0x3ff)
 
#define SIZE_YMAX(y)   ((y) & YMAX_MASK)
 
#define LCDC_VPW   0x08
 
#define VPW_VPW(x)   ((x) & 0x3ff)
 
#define LCDC_CPOS   0x0C
 
#define CPOS_CC1   (1<<31)
 
#define CPOS_CC0   (1<<30)
 
#define CPOS_OP   (1<<28)
 
#define CPOS_CXP(x)   (((x) & 3ff) << 16)
 
#define LCDC_LCWHB   0x10
 
#define LCWHB_BK_EN   (1<<31)
 
#define LCWHB_CW(w)   (((w) & 0x1f) << 24)
 
#define LCWHB_CH(h)   (((h) & 0x1f) << 16)
 
#define LCWHB_BD(x)   ((x) & 0xff)
 
#define LCDC_LCHCC   0x14
 
#define LCDC_PCR   0x18
 
#define LCDC_HCR   0x1C
 
#define HCR_H_WIDTH(x)   (((x) & 0x3f) << 26)
 
#define HCR_H_WAIT_1(x)   (((x) & 0xff) << 8)
 
#define HCR_H_WAIT_2(x)   ((x) & 0xff)
 
#define LCDC_VCR   0x20
 
#define VCR_V_WIDTH(x)   (((x) & 0x3f) << 26)
 
#define VCR_V_WAIT_1(x)   (((x) & 0xff) << 8)
 
#define VCR_V_WAIT_2(x)   ((x) & 0xff)
 
#define LCDC_POS   0x24
 
#define POS_POS(x)   ((x) & 1f)
 
#define LCDC_LSCR1   0x28
 
#define LCDC_PWMR   0x2C
 
#define LCDC_DMACR   0x30
 
#define LCDC_RMCR   0x34
 
#define RMCR_LCDC_EN_MX1   (1<<1)
 
#define RMCR_SELF_REF   (1<<0)
 
#define LCDC_LCDICR   0x38
 
#define LCDICR_INT_SYN   (1<<2)
 
#define LCDICR_INT_CON   (1)
 
#define LCDC_LCDISR   0x40
 
#define LCDISR_UDR_ERR   (1<<3)
 
#define LCDISR_ERR_RES   (1<<2)
 
#define LCDISR_EOF   (1<<1)
 
#define LCDISR_BOF   (1<<0)
 
#define IMX_NAME   "IMX"
 
#define MIN_XRES   64
 
#define MIN_YRES   64
 
#define CNVT_TOHW(val, width)   ((((val)<<(width))+0x7FFF-(val))>>16)
 
#define imxfb_suspend   NULL
 
#define imxfb_resume   NULL
 

Functions

void imxfb_shutdown (struct platform_device *dev)
 
int __init imxfb_init (void)
 
 module_init (imxfb_init)
 
 module_exit (imxfb_cleanup)
 
 MODULE_DESCRIPTION ("Freescale i.MX framebuffer driver")
 
 MODULE_AUTHOR ("Sascha Hauer, Pengutronix")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

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

Definition at line 64 of file imxfb.c.

#define CPOS_CC1   (1<<31)

Definition at line 63 of file imxfb.c.

#define CPOS_CXP (   x)    (((x) & 3ff) << 16)

Definition at line 66 of file imxfb.c.

#define CPOS_OP   (1<<28)

Definition at line 65 of file imxfb.c.

#define DEBUG_VAR   1

Definition at line 41 of file imxfb.c.

#define DRIVER_NAME   "imx-fb"

Definition at line 49 of file imxfb.c.

#define HCR_H_WAIT_1 (   x)    (((x) & 0xff) << 8)

Definition at line 80 of file imxfb.c.

#define HCR_H_WAIT_2 (   x)    ((x) & 0xff)

Definition at line 81 of file imxfb.c.

#define HCR_H_WIDTH (   x)    (((x) & 0x3f) << 26)

Definition at line 79 of file imxfb.c.

#define IMX_NAME   "IMX"

Definition at line 171 of file imxfb.c.

#define imxfb_resume   NULL

Definition at line 689 of file imxfb.c.

#define imxfb_suspend   NULL

Definition at line 688 of file imxfb.c.

#define LCDC_CPOS   0x0C

Definition at line 62 of file imxfb.c.

#define LCDC_DMACR   0x30

Definition at line 97 of file imxfb.c.

#define LCDC_HCR   0x1C

Definition at line 78 of file imxfb.c.

#define LCDC_LCDICR   0x38

Definition at line 106 of file imxfb.c.

#define LCDC_LCDISR   0x40

Definition at line 110 of file imxfb.c.

#define LCDC_LCHCC   0x14

Definition at line 74 of file imxfb.c.

#define LCDC_LCWHB   0x10

Definition at line 68 of file imxfb.c.

#define LCDC_LSCR1   0x28

Definition at line 91 of file imxfb.c.

#define LCDC_PCR   0x18

Definition at line 76 of file imxfb.c.

#define LCDC_POS   0x24

Definition at line 88 of file imxfb.c.

#define LCDC_PWMR   0x2C

Definition at line 94 of file imxfb.c.

#define LCDC_RMCR   0x34

Definition at line 100 of file imxfb.c.

#define LCDC_SIZE   0x04

Definition at line 53 of file imxfb.c.

#define LCDC_SSA   0x00

Definition at line 51 of file imxfb.c.

#define LCDC_VCR   0x20

Definition at line 83 of file imxfb.c.

#define LCDC_VPW   0x08

Definition at line 59 of file imxfb.c.

#define LCDICR_INT_CON   (1)

Definition at line 108 of file imxfb.c.

#define LCDICR_INT_SYN   (1<<2)

Definition at line 107 of file imxfb.c.

#define LCDISR_BOF   (1<<0)

Definition at line 114 of file imxfb.c.

#define LCDISR_EOF   (1<<1)

Definition at line 113 of file imxfb.c.

#define LCDISR_ERR_RES   (1<<2)

Definition at line 112 of file imxfb.c.

#define LCDISR_UDR_ERR   (1<<3)

Definition at line 111 of file imxfb.c.

#define LCWHB_BD (   x)    ((x) & 0xff)

Definition at line 72 of file imxfb.c.

#define LCWHB_BK_EN   (1<<31)

Definition at line 69 of file imxfb.c.

#define LCWHB_CH (   h)    (((h) & 0x1f) << 16)

Definition at line 71 of file imxfb.c.

#define LCWHB_CW (   w)    (((w) & 0x1f) << 24)

Definition at line 70 of file imxfb.c.

#define MIN_XRES   64

Definition at line 176 of file imxfb.c.

#define MIN_YRES   64

Definition at line 177 of file imxfb.c.

#define POS_POS (   x)    ((x) & 1f)

Definition at line 89 of file imxfb.c.

#define RMCR_LCDC_EN_MX1   (1<<1)

Definition at line 102 of file imxfb.c.

#define RMCR_SELF_REF   (1<<0)

Definition at line 104 of file imxfb.c.

#define SIZE_XMAX (   x)    ((((x) >> 4) & 0x3f) << 20)

Definition at line 54 of file imxfb.c.

#define SIZE_YMAX (   y)    ((y) & YMAX_MASK)

Definition at line 57 of file imxfb.c.

#define VCR_V_WAIT_1 (   x)    (((x) & 0xff) << 8)

Definition at line 85 of file imxfb.c.

#define VCR_V_WAIT_2 (   x)    ((x) & 0xff)

Definition at line 86 of file imxfb.c.

#define VCR_V_WIDTH (   x)    (((x) & 0x3f) << 26)

Definition at line 84 of file imxfb.c.

#define VPW_VPW (   x)    ((x) & 0x3ff)

Definition at line 60 of file imxfb.c.

#define YMAX_MASK   (cpu_is_mx1() ? 0x1ff : 0x3ff)

Definition at line 56 of file imxfb.c.

Function Documentation

int __init imxfb_init ( void  )

Definition at line 965 of file imxfb.c.

void imxfb_shutdown ( struct platform_device dev)

Definition at line 927 of file imxfb.c.

MODULE_AUTHOR ( "Sascha  Hauer,
Pengutronix"   
)
MODULE_DESCRIPTION ( "Freescale i.MX framebuffer driver )
module_exit ( imxfb_cleanup  )
module_init ( imxfb_init  )
MODULE_LICENSE ( "GPL"  )