Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ffb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/fb.h>
#include <linux/mm.h>
#include <linux/timer.h>
#include <linux/of_device.h>
#include <asm/io.h>
#include <asm/upa.h>
#include <asm/fbio.h>
#include "sbuslib.h"

Go to the source code of this file.

Data Structures

struct  ffb_fbc
 
struct  ffb_dac
 
struct  ffb_par
 

Macros

#define FFB_SFB8R_VOFF   0x00000000
 
#define FFB_SFB8G_VOFF   0x00400000
 
#define FFB_SFB8B_VOFF   0x00800000
 
#define FFB_SFB8X_VOFF   0x00c00000
 
#define FFB_SFB32_VOFF   0x01000000
 
#define FFB_SFB64_VOFF   0x02000000
 
#define FFB_FBC_REGS_VOFF   0x04000000
 
#define FFB_BM_FBC_REGS_VOFF   0x04002000
 
#define FFB_DFB8R_VOFF   0x04004000
 
#define FFB_DFB8G_VOFF   0x04404000
 
#define FFB_DFB8B_VOFF   0x04804000
 
#define FFB_DFB8X_VOFF   0x04c04000
 
#define FFB_DFB24_VOFF   0x05004000
 
#define FFB_DFB32_VOFF   0x06004000
 
#define FFB_DFB422A_VOFF   0x07004000 /* DFB 422 mode write to A */
 
#define FFB_DFB422AD_VOFF   0x07804000 /* DFB 422 mode with line doubling */
 
#define FFB_DFB24B_VOFF   0x08004000 /* DFB 24bit mode write to B */
 
#define FFB_DFB422B_VOFF   0x09004000 /* DFB 422 mode write to B */
 
#define FFB_DFB422BD_VOFF   0x09804000 /* DFB 422 mode with line doubling */
 
#define FFB_SFB16Z_VOFF   0x0a004000 /* 16bit mode Z planes */
 
#define FFB_SFB8Z_VOFF   0x0a404000 /* 8bit mode Z planes */
 
#define FFB_SFB422_VOFF   0x0ac04000 /* SFB 422 mode write to A/B */
 
#define FFB_SFB422D_VOFF   0x0b404000 /* SFB 422 mode with line doubling */
 
#define FFB_FBC_KREGS_VOFF   0x0bc04000
 
#define FFB_DAC_VOFF   0x0bc06000
 
#define FFB_PROM_VOFF   0x0bc08000
 
#define FFB_EXP_VOFF   0x0bc18000
 
#define FFB_SFB8R_POFF   0x04000000UL
 
#define FFB_SFB8G_POFF   0x04400000UL
 
#define FFB_SFB8B_POFF   0x04800000UL
 
#define FFB_SFB8X_POFF   0x04c00000UL
 
#define FFB_SFB32_POFF   0x05000000UL
 
#define FFB_SFB64_POFF   0x06000000UL
 
#define FFB_FBC_REGS_POFF   0x00600000UL
 
#define FFB_BM_FBC_REGS_POFF   0x00600000UL
 
#define FFB_DFB8R_POFF   0x01000000UL
 
#define FFB_DFB8G_POFF   0x01400000UL
 
#define FFB_DFB8B_POFF   0x01800000UL
 
#define FFB_DFB8X_POFF   0x01c00000UL
 
#define FFB_DFB24_POFF   0x02000000UL
 
#define FFB_DFB32_POFF   0x03000000UL
 
#define FFB_FBC_KREGS_POFF   0x00610000UL
 
#define FFB_DAC_POFF   0x00400000UL
 
#define FFB_PROM_POFF   0x00000000UL
 
#define FFB_EXP_POFF   0x00200000UL
 
#define FFB_DFB422A_POFF   0x09000000UL
 
#define FFB_DFB422AD_POFF   0x09800000UL
 
#define FFB_DFB24B_POFF   0x0a000000UL
 
#define FFB_DFB422B_POFF   0x0b000000UL
 
#define FFB_DFB422BD_POFF   0x0b800000UL
 
#define FFB_SFB16Z_POFF   0x0c800000UL
 
#define FFB_SFB8Z_POFF   0x0c000000UL
 
#define FFB_SFB422_POFF   0x0d000000UL
 
#define FFB_SFB422D_POFF   0x0d800000UL
 
#define FFB_DRAWOP_DOT   0x00
 
#define FFB_DRAWOP_AADOT   0x01
 
#define FFB_DRAWOP_BRLINECAP   0x02
 
#define FFB_DRAWOP_BRLINEOPEN   0x03
 
#define FFB_DRAWOP_DDLINE   0x04
 
#define FFB_DRAWOP_AALINE   0x05
 
#define FFB_DRAWOP_TRIANGLE   0x06
 
#define FFB_DRAWOP_POLYGON   0x07
 
#define FFB_DRAWOP_RECTANGLE   0x08
 
#define FFB_DRAWOP_FASTFILL   0x09
 
#define FFB_DRAWOP_BCOPY   0x0a
 
#define FFB_DRAWOP_VSCROLL   0x0b
 
#define FFB_PPC_FW_DISABLE   0x800000
 
#define FFB_PPC_FW_ENABLE   0xc00000
 
#define FFB_PPC_ACE_DISABLE   0x040000
 
#define FFB_PPC_ACE_AUX_SUB   0x080000
 
#define FFB_PPC_ACE_AUX_ADD   0x0c0000
 
#define FFB_PPC_DCE_DISABLE   0x020000
 
#define FFB_PPC_DCE_ENABLE   0x030000
 
#define FFB_PPC_ABE_DISABLE   0x008000
 
#define FFB_PPC_ABE_ENABLE   0x00c000
 
#define FFB_PPC_VCE_DISABLE   0x001000
 
#define FFB_PPC_VCE_2D   0x002000
 
#define FFB_PPC_VCE_3D   0x003000
 
#define FFB_PPC_APE_DISABLE   0x000800
 
#define FFB_PPC_APE_ENABLE   0x000c00
 
#define FFB_PPC_TBE_OPAQUE   0x000200
 
#define FFB_PPC_TBE_TRANSPARENT   0x000300
 
#define FFB_PPC_ZS_VAR   0x000080
 
#define FFB_PPC_ZS_CONST   0x0000c0
 
#define FFB_PPC_YS_VAR   0x000020
 
#define FFB_PPC_YS_CONST   0x000030
 
#define FFB_PPC_XS_WID   0x000004
 
#define FFB_PPC_XS_VAR   0x000008
 
#define FFB_PPC_XS_CONST   0x00000c
 
#define FFB_PPC_CS_VAR   0x000002
 
#define FFB_PPC_CS_CONST   0x000003
 
#define FFB_ROP_NEW   0x83
 
#define FFB_ROP_OLD   0x85
 
#define FFB_ROP_NEW_XOR_OLD   0x86
 
#define FFB_UCSR_FIFO_MASK   0x00000fff
 
#define FFB_UCSR_FB_BUSY   0x01000000
 
#define FFB_UCSR_RP_BUSY   0x02000000
 
#define FFB_UCSR_ALL_BUSY   (FFB_UCSR_RP_BUSY|FFB_UCSR_FB_BUSY)
 
#define FFB_UCSR_READ_ERR   0x40000000
 
#define FFB_UCSR_FIFO_OVFL   0x80000000
 
#define FFB_UCSR_ALL_ERRORS   (FFB_UCSR_READ_ERR|FFB_UCSR_FIFO_OVFL)
 
#define FFB_DAC_UCTRL   0x1001 /* User Control */
 
#define FFB_DAC_UCTRL_MANREV   0x00000f00 /* 4-bit Manufacturing Revision */
 
#define FFB_DAC_UCTRL_MANREV_SHIFT   8
 
#define FFB_DAC_TGEN   0x6000 /* Timing Generator */
 
#define FFB_DAC_TGEN_VIDE   0x00000001 /* Video Enable */
 
#define FFB_DAC_DID   0x8000 /* Device Identification */
 
#define FFB_DAC_DID_PNUM   0x0ffff000 /* Device Part Number */
 
#define FFB_DAC_DID_PNUM_SHIFT   12
 
#define FFB_DAC_DID_REV   0xf0000000 /* Device Revision */
 
#define FFB_DAC_DID_REV_SHIFT   28
 
#define FFB_DAC_CUR_CTRL   0x100
 
#define FFB_DAC_CUR_CTRL_P0   0x00000001
 
#define FFB_DAC_CUR_CTRL_P1   0x00000002
 
#define FFB_FLAG_AFB   0x00000001 /* AFB m3 or m6 */
 
#define FFB_FLAG_BLANKED   0x00000002 /* screen is blanked */
 
#define FFB_FLAG_INVCURSOR   0x00000004 /* DAC has inverted cursor logic */
 

Functions

 MODULE_DEVICE_TABLE (of, ffb_match)
 
 module_init (ffb_init)
 
 module_exit (ffb_exit)
 
 MODULE_DESCRIPTION ("framebuffer driver for Creator/Elite3D chipsets")
 
 MODULE_AUTHOR ("David S. Miller <[email protected]>")
 
 MODULE_VERSION ("2.0")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define FFB_BM_FBC_REGS_POFF   0x00600000UL

Definition at line 98 of file ffb.c.

#define FFB_BM_FBC_REGS_VOFF   0x04002000

Definition at line 70 of file ffb.c.

#define FFB_DAC_CUR_CTRL   0x100

Definition at line 347 of file ffb.c.

#define FFB_DAC_CUR_CTRL_P0   0x00000001

Definition at line 348 of file ffb.c.

#define FFB_DAC_CUR_CTRL_P1   0x00000002

Definition at line 349 of file ffb.c.

#define FFB_DAC_DID   0x8000 /* Device Identification */

Definition at line 341 of file ffb.c.

#define FFB_DAC_DID_PNUM   0x0ffff000 /* Device Part Number */

Definition at line 342 of file ffb.c.

#define FFB_DAC_DID_PNUM_SHIFT   12

Definition at line 343 of file ffb.c.

#define FFB_DAC_DID_REV   0xf0000000 /* Device Revision */

Definition at line 344 of file ffb.c.

#define FFB_DAC_DID_REV_SHIFT   28

Definition at line 345 of file ffb.c.

#define FFB_DAC_POFF   0x00400000UL

Definition at line 106 of file ffb.c.

#define FFB_DAC_TGEN   0x6000 /* Timing Generator */

Definition at line 339 of file ffb.c.

#define FFB_DAC_TGEN_VIDE   0x00000001 /* Video Enable */

Definition at line 340 of file ffb.c.

#define FFB_DAC_UCTRL   0x1001 /* User Control */

Definition at line 336 of file ffb.c.

#define FFB_DAC_UCTRL_MANREV   0x00000f00 /* 4-bit Manufacturing Revision */

Definition at line 337 of file ffb.c.

#define FFB_DAC_UCTRL_MANREV_SHIFT   8

Definition at line 338 of file ffb.c.

#define FFB_DAC_VOFF   0x0bc06000

Definition at line 87 of file ffb.c.

#define FFB_DFB24_POFF   0x02000000UL

Definition at line 103 of file ffb.c.

#define FFB_DFB24_VOFF   0x05004000

Definition at line 75 of file ffb.c.

#define FFB_DFB24B_POFF   0x0a000000UL

Definition at line 111 of file ffb.c.

#define FFB_DFB24B_VOFF   0x08004000 /* DFB 24bit mode write to B */

Definition at line 79 of file ffb.c.

#define FFB_DFB32_POFF   0x03000000UL

Definition at line 104 of file ffb.c.

#define FFB_DFB32_VOFF   0x06004000

Definition at line 76 of file ffb.c.

#define FFB_DFB422A_POFF   0x09000000UL

Definition at line 109 of file ffb.c.

#define FFB_DFB422A_VOFF   0x07004000 /* DFB 422 mode write to A */

Definition at line 77 of file ffb.c.

#define FFB_DFB422AD_POFF   0x09800000UL

Definition at line 110 of file ffb.c.

#define FFB_DFB422AD_VOFF   0x07804000 /* DFB 422 mode with line doubling */

Definition at line 78 of file ffb.c.

#define FFB_DFB422B_POFF   0x0b000000UL

Definition at line 112 of file ffb.c.

#define FFB_DFB422B_VOFF   0x09004000 /* DFB 422 mode write to B */

Definition at line 80 of file ffb.c.

#define FFB_DFB422BD_POFF   0x0b800000UL

Definition at line 113 of file ffb.c.

#define FFB_DFB422BD_VOFF   0x09804000 /* DFB 422 mode with line doubling */

Definition at line 81 of file ffb.c.

#define FFB_DFB8B_POFF   0x01800000UL

Definition at line 101 of file ffb.c.

#define FFB_DFB8B_VOFF   0x04804000

Definition at line 73 of file ffb.c.

#define FFB_DFB8G_POFF   0x01400000UL

Definition at line 100 of file ffb.c.

#define FFB_DFB8G_VOFF   0x04404000

Definition at line 72 of file ffb.c.

#define FFB_DFB8R_POFF   0x01000000UL

Definition at line 99 of file ffb.c.

#define FFB_DFB8R_VOFF   0x04004000

Definition at line 71 of file ffb.c.

#define FFB_DFB8X_POFF   0x01c00000UL

Definition at line 102 of file ffb.c.

#define FFB_DFB8X_VOFF   0x04c04000

Definition at line 74 of file ffb.c.

#define FFB_DRAWOP_AADOT   0x01

Definition at line 121 of file ffb.c.

#define FFB_DRAWOP_AALINE   0x05

Definition at line 125 of file ffb.c.

#define FFB_DRAWOP_BCOPY   0x0a

Definition at line 130 of file ffb.c.

#define FFB_DRAWOP_BRLINECAP   0x02

Definition at line 122 of file ffb.c.

#define FFB_DRAWOP_BRLINEOPEN   0x03

Definition at line 123 of file ffb.c.

#define FFB_DRAWOP_DDLINE   0x04

Definition at line 124 of file ffb.c.

#define FFB_DRAWOP_DOT   0x00

Definition at line 120 of file ffb.c.

#define FFB_DRAWOP_FASTFILL   0x09

Definition at line 129 of file ffb.c.

#define FFB_DRAWOP_POLYGON   0x07

Definition at line 127 of file ffb.c.

#define FFB_DRAWOP_RECTANGLE   0x08

Definition at line 128 of file ffb.c.

#define FFB_DRAWOP_TRIANGLE   0x06

Definition at line 126 of file ffb.c.

#define FFB_DRAWOP_VSCROLL   0x0b

Definition at line 131 of file ffb.c.

#define FFB_EXP_POFF   0x00200000UL

Definition at line 108 of file ffb.c.

#define FFB_EXP_VOFF   0x0bc18000

Definition at line 89 of file ffb.c.

#define FFB_FBC_KREGS_POFF   0x00610000UL

Definition at line 105 of file ffb.c.

#define FFB_FBC_KREGS_VOFF   0x0bc04000

Definition at line 86 of file ffb.c.

#define FFB_FBC_REGS_POFF   0x00600000UL

Definition at line 97 of file ffb.c.

#define FFB_FBC_REGS_VOFF   0x04000000

Definition at line 69 of file ffb.c.

#define FFB_FLAG_AFB   0x00000001 /* AFB m3 or m6 */

Definition at line 357 of file ffb.c.

#define FFB_FLAG_BLANKED   0x00000002 /* screen is blanked */

Definition at line 358 of file ffb.c.

#define FFB_FLAG_INVCURSOR   0x00000004 /* DAC has inverted cursor logic */

Definition at line 359 of file ffb.c.

#define FFB_PPC_ABE_DISABLE   0x008000

Definition at line 145 of file ffb.c.

#define FFB_PPC_ABE_ENABLE   0x00c000

Definition at line 146 of file ffb.c.

#define FFB_PPC_ACE_AUX_ADD   0x0c0000

Definition at line 140 of file ffb.c.

#define FFB_PPC_ACE_AUX_SUB   0x080000

Definition at line 139 of file ffb.c.

#define FFB_PPC_ACE_DISABLE   0x040000

Definition at line 138 of file ffb.c.

#define FFB_PPC_APE_DISABLE   0x000800

Definition at line 152 of file ffb.c.

#define FFB_PPC_APE_ENABLE   0x000c00

Definition at line 153 of file ffb.c.

#define FFB_PPC_CS_CONST   0x000003

Definition at line 169 of file ffb.c.

#define FFB_PPC_CS_VAR   0x000002

Definition at line 168 of file ffb.c.

#define FFB_PPC_DCE_DISABLE   0x020000

Definition at line 142 of file ffb.c.

#define FFB_PPC_DCE_ENABLE   0x030000

Definition at line 143 of file ffb.c.

#define FFB_PPC_FW_DISABLE   0x800000

Definition at line 135 of file ffb.c.

#define FFB_PPC_FW_ENABLE   0xc00000

Definition at line 136 of file ffb.c.

#define FFB_PPC_TBE_OPAQUE   0x000200

Definition at line 155 of file ffb.c.

#define FFB_PPC_TBE_TRANSPARENT   0x000300

Definition at line 156 of file ffb.c.

#define FFB_PPC_VCE_2D   0x002000

Definition at line 149 of file ffb.c.

#define FFB_PPC_VCE_3D   0x003000

Definition at line 150 of file ffb.c.

#define FFB_PPC_VCE_DISABLE   0x001000

Definition at line 148 of file ffb.c.

#define FFB_PPC_XS_CONST   0x00000c

Definition at line 166 of file ffb.c.

#define FFB_PPC_XS_VAR   0x000008

Definition at line 165 of file ffb.c.

#define FFB_PPC_XS_WID   0x000004

Definition at line 164 of file ffb.c.

#define FFB_PPC_YS_CONST   0x000030

Definition at line 162 of file ffb.c.

#define FFB_PPC_YS_VAR   0x000020

Definition at line 161 of file ffb.c.

#define FFB_PPC_ZS_CONST   0x0000c0

Definition at line 159 of file ffb.c.

#define FFB_PPC_ZS_VAR   0x000080

Definition at line 158 of file ffb.c.

#define FFB_PROM_POFF   0x00000000UL

Definition at line 107 of file ffb.c.

#define FFB_PROM_VOFF   0x0bc08000

Definition at line 88 of file ffb.c.

#define FFB_ROP_NEW   0x83

Definition at line 171 of file ffb.c.

#define FFB_ROP_NEW_XOR_OLD   0x86

Definition at line 173 of file ffb.c.

#define FFB_ROP_OLD   0x85

Definition at line 172 of file ffb.c.

#define FFB_SFB16Z_POFF   0x0c800000UL

Definition at line 114 of file ffb.c.

#define FFB_SFB16Z_VOFF   0x0a004000 /* 16bit mode Z planes */

Definition at line 82 of file ffb.c.

#define FFB_SFB32_POFF   0x05000000UL

Definition at line 95 of file ffb.c.

#define FFB_SFB32_VOFF   0x01000000

Definition at line 67 of file ffb.c.

#define FFB_SFB422_POFF   0x0d000000UL

Definition at line 116 of file ffb.c.

#define FFB_SFB422_VOFF   0x0ac04000 /* SFB 422 mode write to A/B */

Definition at line 84 of file ffb.c.

#define FFB_SFB422D_POFF   0x0d800000UL

Definition at line 117 of file ffb.c.

#define FFB_SFB422D_VOFF   0x0b404000 /* SFB 422 mode with line doubling */

Definition at line 85 of file ffb.c.

#define FFB_SFB64_POFF   0x06000000UL

Definition at line 96 of file ffb.c.

#define FFB_SFB64_VOFF   0x02000000

Definition at line 68 of file ffb.c.

#define FFB_SFB8B_POFF   0x04800000UL

Definition at line 93 of file ffb.c.

#define FFB_SFB8B_VOFF   0x00800000

Definition at line 65 of file ffb.c.

#define FFB_SFB8G_POFF   0x04400000UL

Definition at line 92 of file ffb.c.

#define FFB_SFB8G_VOFF   0x00400000

Definition at line 64 of file ffb.c.

#define FFB_SFB8R_POFF   0x04000000UL

Definition at line 91 of file ffb.c.

#define FFB_SFB8R_VOFF   0x00000000

Definition at line 63 of file ffb.c.

#define FFB_SFB8X_POFF   0x04c00000UL

Definition at line 94 of file ffb.c.

#define FFB_SFB8X_VOFF   0x00c00000

Definition at line 66 of file ffb.c.

#define FFB_SFB8Z_POFF   0x0c000000UL

Definition at line 115 of file ffb.c.

#define FFB_SFB8Z_VOFF   0x0a404000 /* 8bit mode Z planes */

Definition at line 83 of file ffb.c.

#define FFB_UCSR_ALL_BUSY   (FFB_UCSR_RP_BUSY|FFB_UCSR_FB_BUSY)

Definition at line 178 of file ffb.c.

#define FFB_UCSR_ALL_ERRORS   (FFB_UCSR_READ_ERR|FFB_UCSR_FIFO_OVFL)

Definition at line 181 of file ffb.c.

#define FFB_UCSR_FB_BUSY   0x01000000

Definition at line 176 of file ffb.c.

#define FFB_UCSR_FIFO_MASK   0x00000fff

Definition at line 175 of file ffb.c.

#define FFB_UCSR_FIFO_OVFL   0x80000000

Definition at line 180 of file ffb.c.

#define FFB_UCSR_READ_ERR   0x40000000

Definition at line 179 of file ffb.c.

#define FFB_UCSR_RP_BUSY   0x02000000

Definition at line 177 of file ffb.c.

Function Documentation

MODULE_AUTHOR ( "David S. Miller <[email protected]>"  )
MODULE_DESCRIPTION ( "framebuffer driver for Creator/Elite3D chipsets"  )
MODULE_DEVICE_TABLE ( of  ,
ffb_match   
)
module_exit ( ffb_exit  )
module_init ( ffb_init  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( "2.0"  )