Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
gxt4500.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fb.h>
#include <linux/console.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/delay.h>
#include <linux/string.h>

Go to the source code of this file.

Data Structures

struct  gxt4500_par
 
struct  cardinfo
 

Macros

#define PCI_DEVICE_ID_IBM_GXT4500P   0x21c
 
#define PCI_DEVICE_ID_IBM_GXT6000P   0x170
 
#define CFG_ENDIAN0   0x40
 
#define STATUS   0x1000
 
#define CTRL_REG0   0x1004
 
#define CR0_HALT_DMA   0x4
 
#define CR0_RASTER_RESET   0x8
 
#define CR0_GEOM_RESET   0x10
 
#define CR0_MEM_CTRLER_RESET   0x20
 
#define FB_AB_CTRL   0x1100
 
#define FB_CD_CTRL   0x1104
 
#define FB_WID_CTRL   0x1108
 
#define FB_Z_CTRL   0x110c
 
#define FB_VGA_CTRL   0x1110
 
#define REFRESH_AB_CTRL   0x1114
 
#define REFRESH_CD_CTRL   0x1118
 
#define FB_OVL_CTRL   0x111c
 
#define FB_CTRL_TYPE   0x80000000
 
#define FB_CTRL_WIDTH_MASK   0x007f0000
 
#define FB_CTRL_WIDTH_SHIFT   16
 
#define FB_CTRL_START_SEG_MASK   0x00003fff
 
#define REFRESH_START   0x1098
 
#define REFRESH_SIZE   0x109c
 
#define DFA_FB_A   0x11e0
 
#define DFA_FB_B   0x11e4
 
#define DFA_FB_C   0x11e8
 
#define DFA_FB_D   0x11ec
 
#define DFA_FB_ENABLE   0x80000000
 
#define DFA_FB_BASE_MASK   0x03f00000
 
#define DFA_FB_STRIDE_1k   0x00000000
 
#define DFA_FB_STRIDE_2k   0x00000010
 
#define DFA_FB_STRIDE_4k   0x00000020
 
#define DFA_PIX_8BIT   0x00000000
 
#define DFA_PIX_16BIT_565   0x00000001
 
#define DFA_PIX_16BIT_1555   0x00000002
 
#define DFA_PIX_24BIT   0x00000004
 
#define DFA_PIX_32BIT   0x00000005
 
#define DTG_CONTROL   0x1900
 
#define DTG_CTL_SCREEN_REFRESH   2
 
#define DTG_CTL_ENABLE   1
 
#define DTG_HORIZ_EXTENT   0x1904
 
#define DTG_HORIZ_DISPLAY   0x1908
 
#define DTG_HSYNC_START   0x190c
 
#define DTG_HSYNC_END   0x1910
 
#define DTG_HSYNC_END_COMP   0x1914
 
#define DTG_VERT_EXTENT   0x1918
 
#define DTG_VERT_DISPLAY   0x191c
 
#define DTG_VSYNC_START   0x1920
 
#define DTG_VSYNC_END   0x1924
 
#define DTG_VERT_SHORT   0x1928
 
#define DISP_CTL   0x402c
 
#define DISP_CTL_OFF   2
 
#define SYNC_CTL   0x4034
 
#define SYNC_CTL_SYNC_ON_RGB   1
 
#define SYNC_CTL_SYNC_OFF   2
 
#define SYNC_CTL_HSYNC_INV   8
 
#define SYNC_CTL_VSYNC_INV   0x10
 
#define SYNC_CTL_HSYNC_OFF   0x20
 
#define SYNC_CTL_VSYNC_OFF   0x40
 
#define PLL_M   0x4040
 
#define PLL_N   0x4044
 
#define PLL_POSTDIV   0x4048
 
#define PLL_C   0x404c
 
#define CURSOR_X   0x4078
 
#define CURSOR_Y   0x407c
 
#define CURSOR_HOTSPOT   0x4080
 
#define CURSOR_MODE   0x4084
 
#define CURSOR_MODE_OFF   0
 
#define CURSOR_MODE_4BPP   1
 
#define CURSOR_PIXMAP   0x5000
 
#define CURSOR_CMAP   0x7400
 
#define WAT_FMT   0x4100
 
#define WAT_FMT_24BIT   0
 
#define WAT_FMT_16BIT_565   1
 
#define WAT_FMT_16BIT_1555   2
 
#define WAT_FMT_32BIT   3 /* 0 vs. 3 is a guess */
 
#define WAT_FMT_8BIT_332   9
 
#define WAT_FMT_8BIT   0xa
 
#define WAT_FMT_NO_CMAP   4 /* ORd in to other values */
 
#define WAT_CMAP_OFFSET   0x4104 /* 4-bit value gets << 6 */
 
#define WAT_CTRL   0x4108
 
#define WAT_CTRL_SEL_B   1 /* select B buffer if 1 */
 
#define WAT_CTRL_NO_INC   2
 
#define WAT_GAMMA_CTRL   0x410c
 
#define WAT_GAMMA_DISABLE   1 /* disables gamma cmap */
 
#define WAT_OVL_CTRL   0x430c /* controls overlay */
 
#define CMAP   0x6000
 
#define readreg(par, reg)   readl((par)->regs + (reg))
 
#define writereg(par, reg, val)   writel((val), (par)->regs + (reg))
 

Enumerations

enum  gxt_cards { GXT4500P, GXT6000P }
 

Functions

 MODULE_DEVICE_TABLE (pci, gxt4500_pci_tbl)
 
 module_init (gxt4500_init)
 
 module_exit (gxt4500_exit)
 
 MODULE_AUTHOR ("Paul Mackerras <[email protected]>")
 
 MODULE_DESCRIPTION ("FBDev driver for IBM GXT4500P/6000P")
 
 MODULE_LICENSE ("GPL")
 
 module_param (mode_option, charp, 0)
 
 MODULE_PARM_DESC (mode_option,"Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\"")
 

Macro Definition Documentation

#define CFG_ENDIAN0   0x40

Definition at line 22 of file gxt4500.c.

#define CMAP   0x6000

Definition at line 135 of file gxt4500.c.

#define CR0_GEOM_RESET   0x10

Definition at line 29 of file gxt4500.c.

#define CR0_HALT_DMA   0x4

Definition at line 27 of file gxt4500.c.

#define CR0_MEM_CTRLER_RESET   0x20

Definition at line 30 of file gxt4500.c.

#define CR0_RASTER_RESET   0x8

Definition at line 28 of file gxt4500.c.

#define CTRL_REG0   0x1004

Definition at line 26 of file gxt4500.c.

#define CURSOR_CMAP   0x7400

Definition at line 109 of file gxt4500.c.

#define CURSOR_HOTSPOT   0x4080

Definition at line 104 of file gxt4500.c.

#define CURSOR_MODE   0x4084

Definition at line 105 of file gxt4500.c.

#define CURSOR_MODE_4BPP   1

Definition at line 107 of file gxt4500.c.

#define CURSOR_MODE_OFF   0

Definition at line 106 of file gxt4500.c.

#define CURSOR_PIXMAP   0x5000

Definition at line 108 of file gxt4500.c.

#define CURSOR_X   0x4078

Definition at line 102 of file gxt4500.c.

#define CURSOR_Y   0x407c

Definition at line 103 of file gxt4500.c.

#define DFA_FB_A   0x11e0

Definition at line 50 of file gxt4500.c.

#define DFA_FB_B   0x11e4

Definition at line 51 of file gxt4500.c.

#define DFA_FB_BASE_MASK   0x03f00000

Definition at line 55 of file gxt4500.c.

#define DFA_FB_C   0x11e8

Definition at line 52 of file gxt4500.c.

#define DFA_FB_D   0x11ec

Definition at line 53 of file gxt4500.c.

#define DFA_FB_ENABLE   0x80000000

Definition at line 54 of file gxt4500.c.

#define DFA_FB_STRIDE_1k   0x00000000

Definition at line 56 of file gxt4500.c.

#define DFA_FB_STRIDE_2k   0x00000010

Definition at line 57 of file gxt4500.c.

#define DFA_FB_STRIDE_4k   0x00000020

Definition at line 58 of file gxt4500.c.

#define DFA_PIX_16BIT_1555   0x00000002

Definition at line 61 of file gxt4500.c.

#define DFA_PIX_16BIT_565   0x00000001

Definition at line 60 of file gxt4500.c.

#define DFA_PIX_24BIT   0x00000004

Definition at line 62 of file gxt4500.c.

#define DFA_PIX_32BIT   0x00000005

Definition at line 63 of file gxt4500.c.

#define DFA_PIX_8BIT   0x00000000

Definition at line 59 of file gxt4500.c.

#define DISP_CTL   0x402c

Definition at line 86 of file gxt4500.c.

#define DISP_CTL_OFF   2

Definition at line 87 of file gxt4500.c.

#define DTG_CONTROL   0x1900

Definition at line 71 of file gxt4500.c.

#define DTG_CTL_ENABLE   1

Definition at line 73 of file gxt4500.c.

#define DTG_CTL_SCREEN_REFRESH   2

Definition at line 72 of file gxt4500.c.

#define DTG_HORIZ_DISPLAY   0x1908

Definition at line 75 of file gxt4500.c.

#define DTG_HORIZ_EXTENT   0x1904

Definition at line 74 of file gxt4500.c.

#define DTG_HSYNC_END   0x1910

Definition at line 77 of file gxt4500.c.

#define DTG_HSYNC_END_COMP   0x1914

Definition at line 78 of file gxt4500.c.

#define DTG_HSYNC_START   0x190c

Definition at line 76 of file gxt4500.c.

#define DTG_VERT_DISPLAY   0x191c

Definition at line 80 of file gxt4500.c.

#define DTG_VERT_EXTENT   0x1918

Definition at line 79 of file gxt4500.c.

#define DTG_VERT_SHORT   0x1928

Definition at line 83 of file gxt4500.c.

#define DTG_VSYNC_END   0x1924

Definition at line 82 of file gxt4500.c.

#define DTG_VSYNC_START   0x1920

Definition at line 81 of file gxt4500.c.

#define FB_AB_CTRL   0x1100

Definition at line 33 of file gxt4500.c.

#define FB_CD_CTRL   0x1104

Definition at line 34 of file gxt4500.c.

#define FB_CTRL_START_SEG_MASK   0x00003fff

Definition at line 44 of file gxt4500.c.

#define FB_CTRL_TYPE   0x80000000

Definition at line 41 of file gxt4500.c.

#define FB_CTRL_WIDTH_MASK   0x007f0000

Definition at line 42 of file gxt4500.c.

#define FB_CTRL_WIDTH_SHIFT   16

Definition at line 43 of file gxt4500.c.

#define FB_OVL_CTRL   0x111c

Definition at line 40 of file gxt4500.c.

#define FB_VGA_CTRL   0x1110

Definition at line 37 of file gxt4500.c.

#define FB_WID_CTRL   0x1108

Definition at line 35 of file gxt4500.c.

#define FB_Z_CTRL   0x110c

Definition at line 36 of file gxt4500.c.

#define PCI_DEVICE_ID_IBM_GXT4500P   0x21c

Definition at line 16 of file gxt4500.c.

#define PCI_DEVICE_ID_IBM_GXT6000P   0x170

Definition at line 17 of file gxt4500.c.

#define PLL_C   0x404c

Definition at line 99 of file gxt4500.c.

#define PLL_M   0x4040

Definition at line 96 of file gxt4500.c.

#define PLL_N   0x4044

Definition at line 97 of file gxt4500.c.

#define PLL_POSTDIV   0x4048

Definition at line 98 of file gxt4500.c.

#define readreg (   par,
  reg 
)    readl((par)->regs + (reg))

Definition at line 137 of file gxt4500.c.

#define REFRESH_AB_CTRL   0x1114

Definition at line 38 of file gxt4500.c.

#define REFRESH_CD_CTRL   0x1118

Definition at line 39 of file gxt4500.c.

#define REFRESH_SIZE   0x109c

Definition at line 47 of file gxt4500.c.

#define REFRESH_START   0x1098

Definition at line 46 of file gxt4500.c.

#define STATUS   0x1000

Definition at line 25 of file gxt4500.c.

#define SYNC_CTL   0x4034

Definition at line 88 of file gxt4500.c.

#define SYNC_CTL_HSYNC_INV   8

Definition at line 91 of file gxt4500.c.

#define SYNC_CTL_HSYNC_OFF   0x20

Definition at line 93 of file gxt4500.c.

#define SYNC_CTL_SYNC_OFF   2

Definition at line 90 of file gxt4500.c.

#define SYNC_CTL_SYNC_ON_RGB   1

Definition at line 89 of file gxt4500.c.

#define SYNC_CTL_VSYNC_INV   0x10

Definition at line 92 of file gxt4500.c.

#define SYNC_CTL_VSYNC_OFF   0x40

Definition at line 94 of file gxt4500.c.

#define WAT_CMAP_OFFSET   0x4104 /* 4-bit value gets << 6 */

Definition at line 120 of file gxt4500.c.

#define WAT_CTRL   0x4108

Definition at line 121 of file gxt4500.c.

#define WAT_CTRL_NO_INC   2

Definition at line 123 of file gxt4500.c.

#define WAT_CTRL_SEL_B   1 /* select B buffer if 1 */

Definition at line 122 of file gxt4500.c.

#define WAT_FMT   0x4100

Definition at line 112 of file gxt4500.c.

#define WAT_FMT_16BIT_1555   2

Definition at line 115 of file gxt4500.c.

#define WAT_FMT_16BIT_565   1

Definition at line 114 of file gxt4500.c.

#define WAT_FMT_24BIT   0

Definition at line 113 of file gxt4500.c.

#define WAT_FMT_32BIT   3 /* 0 vs. 3 is a guess */

Definition at line 116 of file gxt4500.c.

#define WAT_FMT_8BIT   0xa

Definition at line 118 of file gxt4500.c.

#define WAT_FMT_8BIT_332   9

Definition at line 117 of file gxt4500.c.

#define WAT_FMT_NO_CMAP   4 /* ORd in to other values */

Definition at line 119 of file gxt4500.c.

#define WAT_GAMMA_CTRL   0x410c

Definition at line 124 of file gxt4500.c.

#define WAT_GAMMA_DISABLE   1 /* disables gamma cmap */

Definition at line 125 of file gxt4500.c.

#define WAT_OVL_CTRL   0x430c /* controls overlay */

Definition at line 126 of file gxt4500.c.

#define writereg (   par,
  reg,
  val 
)    writel((val), (par)->regs + (reg))

Definition at line 138 of file gxt4500.c.

Enumeration Type Documentation

enum gxt_cards
Enumerator:
GXT4500P 
GXT6000P 

Definition at line 174 of file gxt4500.c.

Function Documentation

MODULE_AUTHOR ( "Paul Mackerras <[email protected]>"  )
MODULE_DESCRIPTION ( "FBDev driver for IBM GXT4500P/6000P"  )
MODULE_DEVICE_TABLE ( pci  ,
gxt4500_pci_tbl   
)
module_exit ( gxt4500_exit  )
module_init ( gxt4500_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( mode_option  ,
charp  ,
 
)
MODULE_PARM_DESC ( mode_option  ,
"Specify resolution as \"<xres>x<yres>\""  [-< bpp >][@< refresh >] 
)