Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
cg6.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/of_device.h>
#include <asm/io.h>
#include <asm/fbio.h>
#include "sbuslib.h"

Go to the source code of this file.

Data Structures

struct  cg6_tec
 
struct  cg6_thc
 
struct  cg6_fbc
 
struct  bt_regs
 
struct  cg6_par
 

Macros

#define CG6_ROM_OFFSET   0x0UL
 
#define CG6_BROOKTREE_OFFSET   0x200000UL
 
#define CG6_DHC_OFFSET   0x240000UL
 
#define CG6_ALT_OFFSET   0x280000UL
 
#define CG6_FHC_OFFSET   0x300000UL
 
#define CG6_THC_OFFSET   0x301000UL
 
#define CG6_FBC_OFFSET   0x700000UL
 
#define CG6_TEC_OFFSET   0x701000UL
 
#define CG6_RAM_OFFSET   0x800000UL
 
#define CG6_FHC_FBID_SHIFT   24
 
#define CG6_FHC_FBID_MASK   255
 
#define CG6_FHC_REV_SHIFT   20
 
#define CG6_FHC_REV_MASK   15
 
#define CG6_FHC_FROP_DISABLE   (1 << 19)
 
#define CG6_FHC_ROW_DISABLE   (1 << 18)
 
#define CG6_FHC_SRC_DISABLE   (1 << 17)
 
#define CG6_FHC_DST_DISABLE   (1 << 16)
 
#define CG6_FHC_RESET   (1 << 15)
 
#define CG6_FHC_LITTLE_ENDIAN   (1 << 13)
 
#define CG6_FHC_RES_MASK   (3 << 11)
 
#define CG6_FHC_1024   (0 << 11)
 
#define CG6_FHC_1152   (1 << 11)
 
#define CG6_FHC_1280   (2 << 11)
 
#define CG6_FHC_1600   (3 << 11)
 
#define CG6_FHC_CPU_MASK   (3 << 9)
 
#define CG6_FHC_CPU_SPARC   (0 << 9)
 
#define CG6_FHC_CPU_68020   (1 << 9)
 
#define CG6_FHC_CPU_386   (2 << 9)
 
#define CG6_FHC_TEST   (1 << 8)
 
#define CG6_FHC_TEST_X_SHIFT   4
 
#define CG6_FHC_TEST_X_MASK   15
 
#define CG6_FHC_TEST_Y_SHIFT   0
 
#define CG6_FHC_TEST_Y_MASK   15
 
#define CG6_FBC_BLIT_IGNORE   0x00000000
 
#define CG6_FBC_BLIT_NOSRC   0x00100000
 
#define CG6_FBC_BLIT_SRC   0x00200000
 
#define CG6_FBC_BLIT_ILLEGAL   0x00300000
 
#define CG6_FBC_BLIT_MASK   0x00300000
 
#define CG6_FBC_VBLANK   0x00080000
 
#define CG6_FBC_MODE_IGNORE   0x00000000
 
#define CG6_FBC_MODE_COLOR8   0x00020000
 
#define CG6_FBC_MODE_COLOR1   0x00040000
 
#define CG6_FBC_MODE_HRMONO   0x00060000
 
#define CG6_FBC_MODE_MASK   0x00060000
 
#define CG6_FBC_DRAW_IGNORE   0x00000000
 
#define CG6_FBC_DRAW_RENDER   0x00008000
 
#define CG6_FBC_DRAW_PICK   0x00010000
 
#define CG6_FBC_DRAW_ILLEGAL   0x00018000
 
#define CG6_FBC_DRAW_MASK   0x00018000
 
#define CG6_FBC_BWRITE0_IGNORE   0x00000000
 
#define CG6_FBC_BWRITE0_ENABLE   0x00002000
 
#define CG6_FBC_BWRITE0_DISABLE   0x00004000
 
#define CG6_FBC_BWRITE0_ILLEGAL   0x00006000
 
#define CG6_FBC_BWRITE0_MASK   0x00006000
 
#define CG6_FBC_BWRITE1_IGNORE   0x00000000
 
#define CG6_FBC_BWRITE1_ENABLE   0x00000800
 
#define CG6_FBC_BWRITE1_DISABLE   0x00001000
 
#define CG6_FBC_BWRITE1_ILLEGAL   0x00001800
 
#define CG6_FBC_BWRITE1_MASK   0x00001800
 
#define CG6_FBC_BREAD_IGNORE   0x00000000
 
#define CG6_FBC_BREAD_0   0x00000200
 
#define CG6_FBC_BREAD_1   0x00000400
 
#define CG6_FBC_BREAD_ILLEGAL   0x00000600
 
#define CG6_FBC_BREAD_MASK   0x00000600
 
#define CG6_FBC_BDISP_IGNORE   0x00000000
 
#define CG6_FBC_BDISP_0   0x00000080
 
#define CG6_FBC_BDISP_1   0x00000100
 
#define CG6_FBC_BDISP_ILLEGAL   0x00000180
 
#define CG6_FBC_BDISP_MASK   0x00000180
 
#define CG6_FBC_INDEX_MOD   0x00000040
 
#define CG6_FBC_INDEX_MASK   0x00000030
 
#define CG6_THC_MISC_REV_SHIFT   16
 
#define CG6_THC_MISC_REV_MASK   15
 
#define CG6_THC_MISC_RESET   (1 << 12)
 
#define CG6_THC_MISC_VIDEO   (1 << 10)
 
#define CG6_THC_MISC_SYNC   (1 << 9)
 
#define CG6_THC_MISC_VSYNC   (1 << 8)
 
#define CG6_THC_MISC_SYNC_ENAB   (1 << 7)
 
#define CG6_THC_MISC_CURS_RES   (1 << 6)
 
#define CG6_THC_MISC_INT_ENAB   (1 << 5)
 
#define CG6_THC_MISC_INT   (1 << 4)
 
#define CG6_THC_MISC_INIT   0x9f
 
#define CG6_THC_CURSOFF   ((65536-32) | ((65536-32) << 16))
 
#define CG6_FLAG_BLANKED   0x00000001
 

Functions

 MODULE_DEVICE_TABLE (of, cg6_match)
 
 module_init (cg6_init)
 
 module_exit (cg6_exit)
 
 MODULE_DESCRIPTION ("framebuffer driver for CGsix chipsets")
 
 MODULE_AUTHOR ("David S. Miller <[email protected]>")
 
 MODULE_VERSION ("2.0")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CG6_ALT_OFFSET   0x280000UL

Definition at line 72 of file cg6.c.

#define CG6_BROOKTREE_OFFSET   0x200000UL

Definition at line 70 of file cg6.c.

#define CG6_DHC_OFFSET   0x240000UL

Definition at line 71 of file cg6.c.

#define CG6_FBC_BDISP_0   0x00000080

Definition at line 145 of file cg6.c.

#define CG6_FBC_BDISP_1   0x00000100

Definition at line 146 of file cg6.c.

#define CG6_FBC_BDISP_IGNORE   0x00000000

Definition at line 144 of file cg6.c.

#define CG6_FBC_BDISP_ILLEGAL   0x00000180

Definition at line 147 of file cg6.c.

#define CG6_FBC_BDISP_MASK   0x00000180

Definition at line 148 of file cg6.c.

#define CG6_FBC_BLIT_IGNORE   0x00000000

Definition at line 106 of file cg6.c.

#define CG6_FBC_BLIT_ILLEGAL   0x00300000

Definition at line 109 of file cg6.c.

#define CG6_FBC_BLIT_MASK   0x00300000

Definition at line 110 of file cg6.c.

#define CG6_FBC_BLIT_NOSRC   0x00100000

Definition at line 107 of file cg6.c.

#define CG6_FBC_BLIT_SRC   0x00200000

Definition at line 108 of file cg6.c.

#define CG6_FBC_BREAD_0   0x00000200

Definition at line 139 of file cg6.c.

#define CG6_FBC_BREAD_1   0x00000400

Definition at line 140 of file cg6.c.

#define CG6_FBC_BREAD_IGNORE   0x00000000

Definition at line 138 of file cg6.c.

#define CG6_FBC_BREAD_ILLEGAL   0x00000600

Definition at line 141 of file cg6.c.

#define CG6_FBC_BREAD_MASK   0x00000600

Definition at line 142 of file cg6.c.

#define CG6_FBC_BWRITE0_DISABLE   0x00004000

Definition at line 128 of file cg6.c.

#define CG6_FBC_BWRITE0_ENABLE   0x00002000

Definition at line 127 of file cg6.c.

#define CG6_FBC_BWRITE0_IGNORE   0x00000000

Definition at line 126 of file cg6.c.

#define CG6_FBC_BWRITE0_ILLEGAL   0x00006000

Definition at line 129 of file cg6.c.

#define CG6_FBC_BWRITE0_MASK   0x00006000

Definition at line 130 of file cg6.c.

#define CG6_FBC_BWRITE1_DISABLE   0x00001000

Definition at line 134 of file cg6.c.

#define CG6_FBC_BWRITE1_ENABLE   0x00000800

Definition at line 133 of file cg6.c.

#define CG6_FBC_BWRITE1_IGNORE   0x00000000

Definition at line 132 of file cg6.c.

#define CG6_FBC_BWRITE1_ILLEGAL   0x00001800

Definition at line 135 of file cg6.c.

#define CG6_FBC_BWRITE1_MASK   0x00001800

Definition at line 136 of file cg6.c.

#define CG6_FBC_DRAW_IGNORE   0x00000000

Definition at line 120 of file cg6.c.

#define CG6_FBC_DRAW_ILLEGAL   0x00018000

Definition at line 123 of file cg6.c.

#define CG6_FBC_DRAW_MASK   0x00018000

Definition at line 124 of file cg6.c.

#define CG6_FBC_DRAW_PICK   0x00010000

Definition at line 122 of file cg6.c.

#define CG6_FBC_DRAW_RENDER   0x00008000

Definition at line 121 of file cg6.c.

#define CG6_FBC_INDEX_MASK   0x00000030

Definition at line 151 of file cg6.c.

#define CG6_FBC_INDEX_MOD   0x00000040

Definition at line 150 of file cg6.c.

#define CG6_FBC_MODE_COLOR1   0x00040000

Definition at line 116 of file cg6.c.

#define CG6_FBC_MODE_COLOR8   0x00020000

Definition at line 115 of file cg6.c.

#define CG6_FBC_MODE_HRMONO   0x00060000

Definition at line 117 of file cg6.c.

#define CG6_FBC_MODE_IGNORE   0x00000000

Definition at line 114 of file cg6.c.

#define CG6_FBC_MODE_MASK   0x00060000

Definition at line 118 of file cg6.c.

#define CG6_FBC_OFFSET   0x700000UL

Definition at line 75 of file cg6.c.

#define CG6_FBC_VBLANK   0x00080000

Definition at line 112 of file cg6.c.

#define CG6_FHC_1024   (0 << 11)

Definition at line 91 of file cg6.c.

#define CG6_FHC_1152   (1 << 11)

Definition at line 92 of file cg6.c.

#define CG6_FHC_1280   (2 << 11)

Definition at line 93 of file cg6.c.

#define CG6_FHC_1600   (3 << 11)

Definition at line 94 of file cg6.c.

#define CG6_FHC_CPU_386   (2 << 9)

Definition at line 98 of file cg6.c.

#define CG6_FHC_CPU_68020   (1 << 9)

Definition at line 97 of file cg6.c.

#define CG6_FHC_CPU_MASK   (3 << 9)

Definition at line 95 of file cg6.c.

#define CG6_FHC_CPU_SPARC   (0 << 9)

Definition at line 96 of file cg6.c.

#define CG6_FHC_DST_DISABLE   (1 << 16)

Definition at line 87 of file cg6.c.

#define CG6_FHC_FBID_MASK   255

Definition at line 81 of file cg6.c.

#define CG6_FHC_FBID_SHIFT   24

Definition at line 80 of file cg6.c.

#define CG6_FHC_FROP_DISABLE   (1 << 19)

Definition at line 84 of file cg6.c.

#define CG6_FHC_LITTLE_ENDIAN   (1 << 13)

Definition at line 89 of file cg6.c.

#define CG6_FHC_OFFSET   0x300000UL

Definition at line 73 of file cg6.c.

#define CG6_FHC_RES_MASK   (3 << 11)

Definition at line 90 of file cg6.c.

#define CG6_FHC_RESET   (1 << 15)

Definition at line 88 of file cg6.c.

#define CG6_FHC_REV_MASK   15

Definition at line 83 of file cg6.c.

#define CG6_FHC_REV_SHIFT   20

Definition at line 82 of file cg6.c.

#define CG6_FHC_ROW_DISABLE   (1 << 18)

Definition at line 85 of file cg6.c.

#define CG6_FHC_SRC_DISABLE   (1 << 17)

Definition at line 86 of file cg6.c.

#define CG6_FHC_TEST   (1 << 8)

Definition at line 99 of file cg6.c.

#define CG6_FHC_TEST_X_MASK   15

Definition at line 101 of file cg6.c.

#define CG6_FHC_TEST_X_SHIFT   4

Definition at line 100 of file cg6.c.

#define CG6_FHC_TEST_Y_MASK   15

Definition at line 103 of file cg6.c.

#define CG6_FHC_TEST_Y_SHIFT   0

Definition at line 102 of file cg6.c.

#define CG6_FLAG_BLANKED   0x00000001

Definition at line 263 of file cg6.c.

#define CG6_RAM_OFFSET   0x800000UL

Definition at line 77 of file cg6.c.

#define CG6_ROM_OFFSET   0x0UL

Definition at line 69 of file cg6.c.

#define CG6_TEC_OFFSET   0x701000UL

Definition at line 76 of file cg6.c.

#define CG6_THC_CURSOFF   ((65536-32) | ((65536-32) << 16))

Definition at line 165 of file cg6.c.

#define CG6_THC_MISC_CURS_RES   (1 << 6)

Definition at line 161 of file cg6.c.

#define CG6_THC_MISC_INIT   0x9f

Definition at line 164 of file cg6.c.

#define CG6_THC_MISC_INT   (1 << 4)

Definition at line 163 of file cg6.c.

#define CG6_THC_MISC_INT_ENAB   (1 << 5)

Definition at line 162 of file cg6.c.

#define CG6_THC_MISC_RESET   (1 << 12)

Definition at line 156 of file cg6.c.

#define CG6_THC_MISC_REV_MASK   15

Definition at line 155 of file cg6.c.

#define CG6_THC_MISC_REV_SHIFT   16

Definition at line 154 of file cg6.c.

#define CG6_THC_MISC_SYNC   (1 << 9)

Definition at line 158 of file cg6.c.

#define CG6_THC_MISC_SYNC_ENAB   (1 << 7)

Definition at line 160 of file cg6.c.

#define CG6_THC_MISC_VIDEO   (1 << 10)

Definition at line 157 of file cg6.c.

#define CG6_THC_MISC_VSYNC   (1 << 8)

Definition at line 159 of file cg6.c.

#define CG6_THC_OFFSET   0x301000UL

Definition at line 74 of file cg6.c.

Function Documentation

MODULE_AUTHOR ( "David S. Miller <[email protected]>"  )
MODULE_DESCRIPTION ( "framebuffer driver for CGsix chipsets"  )
MODULE_DEVICE_TABLE ( of  ,
cg6_match   
)
module_exit ( cg6_exit  )
module_init ( cg6_init  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( "2.0"  )