patch-2.3.25 linux/drivers/video/cyber2000fb.h

Next file: linux/drivers/video/fbcon-mac.c
Previous file: linux/drivers/video/cyber2000fb.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/drivers/video/cyber2000fb.h linux/drivers/video/cyber2000fb.h
@@ -5,13 +5,14 @@
  */
 
 #define arraysize(x)    (sizeof(x)/sizeof(*(x)))
-#define cyber2000_outb(dat,reg)	(CyberRegs[reg] = dat)
-#define cyber2000_outw(dat,reg)	(*(unsigned short *)&CyberRegs[reg] = dat)
-#define cyber2000_outl(dat,reg)	(*(unsigned long *)&CyberRegs[reg] = dat)
-
-#define cyber2000_inb(reg)	(CyberRegs[reg])
-#define cyber2000_inw(reg)	(*(unsigned short *)&CyberRegs[reg])
-#define cyber2000_inl(reg)	(*(unsigned long *)&CyberRegs[reg])
+
+#define cyber2000_outb(dat,reg)	writeb(dat, CyberRegs + reg)
+#define cyber2000_outw(dat,reg)	writew(dat, CyberRegs + reg)
+#define cyber2000_outl(dat,reg)	writel(dat, CyberRegs + reg)
+
+#define cyber2000_inb(reg)	readb(CyberRegs + reg)
+#define cyber2000_inw(reg)	readw(CyberRegs + reg)
+#define cyber2000_inl(reg)	readl(CyberRegs + reg)
 
 static inline void cyber2000_crtcw(int reg, int val)
 {
@@ -40,7 +41,7 @@
 }
 
 struct cyber2000fb_par {
-	unsigned long	screen_base;
+	char *		screen_base;
 	unsigned long	screen_base_p;
 	unsigned long	regs_base;
 	unsigned long	regs_base_p;
@@ -48,6 +49,9 @@
 	unsigned long	screen_size;
 	unsigned int	palette_size;
 	  signed int	currcon;
+	char		dev_name[32];
+	unsigned int	initialised;
+
 	/*
 	 * palette
 	 */
@@ -69,10 +73,32 @@
 	} c_table;
 };
 
-struct res {
-	int	xres;
-	int	yres;
-	unsigned char crtc_regs[18];
-	unsigned char crtc_ofl;
-	unsigned char clk_regs[4];
-};
+#define PIXFORMAT_8BPP		0
+#define PIXFORMAT_16BPP		1
+#define PIXFORMAT_24BPP		2
+
+#define VISUALID_256		1
+#define VISUALID_64K		2
+#define VISUALID_16M		4
+#define VISUALID_32K		6
+
+#define CO_CMD_L_PATTERN_FGCOL	0x8000
+#define CO_CMD_L_INC_LEFT	0x0004
+#define CO_CMD_L_INC_UP		0x0002
+
+#define CO_CMD_H_SRC_PIXMAP	0x2000
+#define CO_CMD_H_BLITTER	0x0800
+
+#define CO_REG_CONTROL		0xbf011
+#define CO_REG_SRC_WIDTH	0xbf018
+#define CO_REG_PIX_FORMAT	0xbf01c
+#define CO_REG_FORE_MIX		0xbf048
+#define CO_REG_FOREGROUND	0xbf058
+#define CO_REG_WIDTH		0xbf060
+#define CO_REG_HEIGHT		0xbf062
+#define CO_REG_X_PHASE		0xbf078
+#define CO_REG_CMD_L		0xbf07c
+#define CO_REG_CMD_H		0xbf07e
+#define CO_REG_SRC_PTR		0xbf170
+#define CO_REG_DEST_PTR		0xbf178
+#define CO_REG_DEST_WIDTH	0xbf218

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)