ANSIfy:
Add prototypes and fix printf format strings to compile cleanly with cc -Wall -Wmissing-prototypes.
This commit is contained in:
parent
aff8e70475
commit
7822ce0c03
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bt459.c,v 1.3 1996/03/03 17:16:03 thorpej Exp $ */
|
||||
/* $NetBSD: bt459.c,v 1.4 1996/04/08 00:57:41 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -81,6 +81,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/select.h>
|
||||
|
@ -291,12 +292,12 @@ bt459RestoreCursorColor(fi)
|
|||
bt459_select_reg(regs, BT459_REG_CCOLOR_1);
|
||||
for (i = 0; i < 3; i++) {
|
||||
regs->addr_reg = cursor_RGB[i];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
bt459_select_reg(regs, BT459_REG_CCOLOR_3);
|
||||
for (i = 3; i < 6; i++) {
|
||||
regs->addr_reg = cursor_RGB[i];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,7 +308,7 @@ bt459CursorColor(fi, color)
|
|||
unsigned int color[];
|
||||
struct fbinfo *fi;
|
||||
{
|
||||
register int i, j;
|
||||
register int i;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
cursor_RGB[i] = (u_char)(color[i] >> 8);
|
||||
|
@ -360,13 +361,13 @@ bt459PosCursor(fi, x, y)
|
|||
|
||||
bt459_select_reg(regs, BT459_REG_CXLO);
|
||||
regs->addr_reg = x;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_reg = x >> 8;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_reg = y;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_reg = y >> 8;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
|
||||
/* Initialize the colormap to the default state, which is that entry
|
||||
|
@ -382,22 +383,22 @@ bt459InitColorMap(fi)
|
|||
|
||||
bt459_select_reg(regs, 0);
|
||||
((u_char *)(fi -> fi_cmap_bits)) [0] = regs->addr_cmap = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
((u_char *)(fi -> fi_cmap_bits)) [1] = regs->addr_cmap = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
((u_char *)(fi -> fi_cmap_bits)) [2] = regs->addr_cmap = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
for (i = 0; i < 256; i++) {
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3]
|
||||
= regs->addr_cmap = 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3 + 1]
|
||||
= regs->addr_cmap = 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3 + 2]
|
||||
= regs -> addr_cmap = 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
|
@ -484,11 +485,11 @@ bt459_video_on(fi)
|
|||
/* restore old color map entry zero */
|
||||
bt459_select_reg(regs, 0);
|
||||
regs->addr_cmap = cmap_bits [0];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_cmap = cmap_bits [0];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_cmap = cmap_bits [0];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
/* enable normal display */
|
||||
bt459_write_reg(regs, BT459_REG_PRM, 0xff);
|
||||
|
@ -513,11 +514,11 @@ bt459_video_off(fi)
|
|||
/* set color map entry zero to zero */
|
||||
bt459_select_reg(regs, 0);
|
||||
regs->addr_cmap = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_cmap = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_cmap = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
/* disable display */
|
||||
bt459_write_reg(regs, BT459_REG_PRM, 0);
|
||||
|
@ -536,7 +537,7 @@ bt459_select_reg(regs, regno)
|
|||
{
|
||||
regs->addr_lo = regno;
|
||||
regs->addr_hi = regno >> 8;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -545,9 +546,9 @@ bt459_write_reg(regs, regno, val)
|
|||
{
|
||||
regs->addr_lo = regno;
|
||||
regs->addr_hi = regno >> 8;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
regs->addr_reg = val;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
|
||||
static u_char
|
||||
|
@ -556,7 +557,7 @@ bt459_read_reg(regs, regno)
|
|||
{
|
||||
regs->addr_lo = regno;
|
||||
regs->addr_hi = regno >> 8;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
return (regs->addr_reg);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bt478.c,v 1.3 1996/01/16 02:40:21 jonathan Exp $ */
|
||||
/* $NetBSD: bt478.c,v 1.4 1996/04/08 00:57:43 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -57,6 +57,7 @@
|
|||
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/select.h>
|
||||
|
@ -73,12 +74,22 @@
|
|||
/*
|
||||
* Forward references.
|
||||
*/
|
||||
void bt478RestoreCursorColor();
|
||||
void bt478CursorColor(); /* qvss ioctl interface uses this */
|
||||
/*static*/ void bt478InitColorMap();
|
||||
int bt478GetColorMap();
|
||||
static void bt478VDACInit();
|
||||
int bt478LoadColorMap();
|
||||
|
||||
|
||||
int bt478init __P((struct fbinfo *fi));
|
||||
|
||||
void bt478RestoreCursorColor __P((struct fbinfo *fi));
|
||||
/* qvss ioctl interface uses this */
|
||||
void bt478CursorColor __P((struct fbinfo *fi, unsigned int color[]));
|
||||
|
||||
void bt478BlankCursor __P((struct fbinfo *fi));
|
||||
/*static*/ void bt478InitColorMap __P((struct fbinfo *fi));
|
||||
int bt478GetColorMap __P((struct fbinfo *fi, caddr_t bits,
|
||||
int index, int count));
|
||||
int bt478LoadColorMap __P((struct fbinfo *fi, caddr_t bits,
|
||||
int index, int count));
|
||||
|
||||
|
||||
|
||||
extern int pmax_boardtype;
|
||||
extern u_short defCursor[32];
|
||||
|
@ -98,18 +109,18 @@ bt478init(fi)
|
|||
*
|
||||
* Initialize the VDAC
|
||||
*/
|
||||
vdac->overWA = 0x04; MachEmptyWriteBuffer();
|
||||
vdac->over = 0x00; MachEmptyWriteBuffer();
|
||||
vdac->over = 0x00; MachEmptyWriteBuffer();
|
||||
vdac->over = 0x00; MachEmptyWriteBuffer();
|
||||
vdac->overWA = 0x08; MachEmptyWriteBuffer();
|
||||
vdac->over = 0x00; MachEmptyWriteBuffer();
|
||||
vdac->over = 0x00; MachEmptyWriteBuffer();
|
||||
vdac->over = 0x7f; MachEmptyWriteBuffer();
|
||||
vdac->overWA = 0x0c; MachEmptyWriteBuffer();
|
||||
vdac->over = 0xff; MachEmptyWriteBuffer();
|
||||
vdac->over = 0xff; MachEmptyWriteBuffer();
|
||||
vdac->over = 0xff; MachEmptyWriteBuffer();
|
||||
vdac->overWA = 0x04; wbflush();
|
||||
vdac->over = 0x00; wbflush();
|
||||
vdac->over = 0x00; wbflush();
|
||||
vdac->over = 0x00; wbflush();
|
||||
vdac->overWA = 0x08; wbflush();
|
||||
vdac->over = 0x00; wbflush();
|
||||
vdac->over = 0x00; wbflush();
|
||||
vdac->over = 0x7f; wbflush();
|
||||
vdac->overWA = 0x0c; wbflush();
|
||||
vdac->over = 0xff; wbflush();
|
||||
vdac->over = 0xff; wbflush();
|
||||
vdac->over = 0xff; wbflush();
|
||||
|
||||
/* Initialize the cursor position... */
|
||||
fi -> fi_cursor.width = 16;
|
||||
|
@ -134,26 +145,26 @@ bt478RestoreCursorColor(fi)
|
|||
register int i;
|
||||
|
||||
vdac->overWA = 0x04;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
for (i = 0; i < 3; i++) {
|
||||
vdac->over = bg_RGB[i];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
|
||||
vdac->overWA = 0x08;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->over = 0x00;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->over = 0x00;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->over = 0x7f;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
vdac->overWA = 0x0c;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
for (i = 0; i < 3; i++) {
|
||||
vdac->over = fg_RGB[i];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,10 +197,10 @@ bt478BlankCursor(fi)
|
|||
register int i;
|
||||
|
||||
vdac->overWA = 0x0c;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
for (i = 0; i < 3; i++) {
|
||||
vdac->over = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,44 +216,44 @@ bt478InitColorMap (fi)
|
|||
|
||||
*(volatile char *)MACH_PHYS_TO_UNCACHED
|
||||
(KN01_PHYS_COLMASK_START) = 0xff; /* XXX */
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
if (fi -> fi_type.fb_depth == 1) {
|
||||
vdac->mapWA = 0; MachEmptyWriteBuffer();
|
||||
vdac->mapWA = 0; wbflush();
|
||||
for (i = 0; i < 256; i++) {
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3] = 0;
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3 + 1]
|
||||
= (i < 128) ? 0x00 : 0xff;
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3 + 2] = 0;
|
||||
vdac->map = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->map = (i < 128) ? 0x00 : 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->map = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
} else {
|
||||
vdac->mapWA = 0; MachEmptyWriteBuffer();
|
||||
vdac->mapWA = 0; wbflush();
|
||||
((u_char *)(fi -> fi_cmap_bits)) [0] = 0;
|
||||
((u_char *)(fi -> fi_cmap_bits)) [1] = 0;
|
||||
((u_char *)(fi -> fi_cmap_bits)) [2] = 0;
|
||||
vdac->map = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->map = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->map = 0;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
for (i = 1; i < 256; i++) {
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3] = 0xff;
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3 + 1] = 0xff;
|
||||
((u_char *)(fi -> fi_cmap_bits)) [i * 3 + 2] = 0xff;
|
||||
vdac->map = 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->map = 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
vdac->map = 0xff;
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -250,7 +261,7 @@ bt478InitColorMap (fi)
|
|||
bg_RGB[i] = 0x00;
|
||||
fg_RGB[i] = 0xff;
|
||||
}
|
||||
bt478RestoreCursorColor();
|
||||
bt478RestoreCursorColor(fi);
|
||||
}
|
||||
|
||||
/* Load the color map. */
|
||||
|
@ -273,19 +284,19 @@ bt478LoadColorMap(fi, bits, index, count)
|
|||
cmap = (u_char *)(fi -> fi_cmap_bits) + index * 3;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
vdac->mapWA = i + index; MachEmptyWriteBuffer();
|
||||
vdac->mapWA = i + index; wbflush();
|
||||
|
||||
cmap [i * 3] = cmap_bits [i * 3];
|
||||
vdac->map = cmap_bits [i * 3];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
cmap [i * 3 + 1] = cmap_bits [i * 3 + 1];
|
||||
vdac->map = cmap_bits [i * 3 + 1];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
|
||||
cmap [i * 3 + 2] = cmap_bits [i * 3 + 2];
|
||||
vdac -> map = cmap_bits [i * 3 + 2];
|
||||
MachEmptyWriteBuffer();
|
||||
wbflush();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cfb.c,v 1.17 1996/03/17 01:46:37 thorpej Exp $ */
|
||||
/* $NetBSD: cfb.c,v 1.18 1996/04/08 00:57:45 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -82,8 +82,10 @@
|
|||
|
||||
#include "fb.h"
|
||||
#include "cfb.h"
|
||||
|
||||
#if NCFB > 0
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h> /* printf() */
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/fcntl.h>
|
||||
|
@ -137,6 +139,7 @@ struct fbdriver cfb_driver = {
|
|||
bt459CursorColor
|
||||
};
|
||||
|
||||
int cfbinit __P((struct fbinfo *fi, caddr_t cfbaddr, int unit, int silent));
|
||||
extern void fbScreenInit __P((struct fbinfo *fi));
|
||||
|
||||
void genConfigMouse(), genDeconfigMouse();
|
||||
|
@ -171,13 +174,14 @@ struct cfdriver cfb_cd = {
|
|||
};
|
||||
|
||||
|
||||
|
||||
int
|
||||
cfbmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
void *match;
|
||||
void *aux;
|
||||
{
|
||||
struct cfdata *cf = match;
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
|
||||
#ifdef FBDRIVER_DOES_ATTACH
|
||||
|
@ -255,14 +259,14 @@ cfbinit(fi, cfbaddr, unit, silent)
|
|||
else {
|
||||
fi->fi_cmap_bits = malloc(CMAP_BITS, M_DEVBUF, M_NOWAIT);
|
||||
if (fi->fi_cmap_bits == NULL) {
|
||||
printf("cfb%d: no memory for cmap 0x%x\n", unit);
|
||||
printf("cfb%d: no memory for cmap\n", unit);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
||||
/* check for no frame buffer */
|
||||
if (badaddr(cfbaddr, 4)) {
|
||||
printf("cfb: bad address 0x%x\n", cfbaddr);
|
||||
printf("cfb: bad address 0x%p\n", cfbaddr);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -364,6 +368,8 @@ cfb_intr(sc)
|
|||
|
||||
/* reset vertical-retrace interrupt by writing a dont-care */
|
||||
*(int*) (slot_addr+CFB_OFFSET_IREQ) = 0;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif /* NCFB */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ims332.c,v 1.1 1995/09/11 08:11:24 jonathan Exp $ */
|
||||
/* $NetBSD: ims332.c,v 1.2 1996/04/08 00:57:37 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1995
|
||||
|
@ -40,6 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/errno.h>
|
||||
|
@ -50,19 +51,25 @@
|
|||
#include <machine/machConst.h>
|
||||
#include <pmax/dev/ims332.h>
|
||||
|
||||
static u_int ims332_read_register (struct fbinfo *, int);
|
||||
static void ims332_write_register (struct fbinfo *, int, unsigned int);
|
||||
|
||||
#define assert_ims332_reset_bit(r) *r &= ~0x40
|
||||
#define deassert_ims332_reset_bit(r) *r |= 0x40
|
||||
|
||||
int ims332init(fi)
|
||||
int
|
||||
ims332init(fi)
|
||||
struct fbinfo *fi;
|
||||
{
|
||||
register u_int *reset = (u_int *)fi -> fi_base;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Initialize the screen. (xcfb-specific)
|
||||
*/
|
||||
#ifdef notdef
|
||||
register u_int *reset = (u_int *)fi -> fi_base;
|
||||
|
||||
|
||||
assert_ims332_reset_bit(reset);
|
||||
DELAY(1); /* specs sez 50ns.. */
|
||||
deassert_ims332_reset_bit(reset);
|
||||
|
@ -95,7 +102,7 @@ int ims332init(fi)
|
|||
ims332_write_register (fi, IMS332_REG_XFER_DELAY, 0xa);
|
||||
|
||||
ims332_write_register (fi, IMS332_REG_COLOR_MASK, 0xffffff);
|
||||
#endif
|
||||
#endif /* notdef */
|
||||
|
||||
/* Zero out the cursor RAM... */
|
||||
for (i = 0; i < 512; i++)
|
||||
|
@ -212,7 +219,6 @@ ims332GetColorMap(fi, bits, index, count)
|
|||
{
|
||||
u_char *cmap_bits;
|
||||
u_char *cmap;
|
||||
int i;
|
||||
|
||||
if (index > 256 || index < 0 || index + count > 256)
|
||||
return EINVAL;
|
||||
|
@ -262,7 +268,6 @@ ims332_video_on (fi)
|
|||
struct fbinfo *fi;
|
||||
{
|
||||
u_char *cmap;
|
||||
int i;
|
||||
u_int csr;
|
||||
|
||||
if (!fi -> fi_blanked)
|
||||
|
@ -334,7 +339,7 @@ ims332CursorColor (fi, color)
|
|||
struct fbinfo *fi;
|
||||
unsigned int color[];
|
||||
{
|
||||
register int i, j;
|
||||
register int i;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
cursor_RGB[i] = (u_char)(color[i] >> 8);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ims332.h,v 1.1 1995/09/11 08:11:25 jonathan Exp $ */
|
||||
/* $NetBSD: ims332.h,v 1.2 1996/04/08 00:57:38 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -168,8 +168,6 @@
|
|||
#define IMS332_BOOT_xxx 0xffff80 /* reserved, mbz */
|
||||
|
||||
int ims332init (struct fbinfo *);
|
||||
static u_int ims332_read_register (struct fbinfo *, int);
|
||||
static void ims332_write_register (struct fbinfo *, int, unsigned int);
|
||||
void ims332InitColorMap (struct fbinfo *);
|
||||
int ims332LoadColorMap (struct fbinfo *, caddr_t, int, int);
|
||||
int ims332GetColorMap (struct fbinfo *, caddr_t, int, int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sfb.c,v 1.10 1996/03/17 22:02:59 jonathan Exp $ */
|
||||
/* $NetBSD: sfb.c,v 1.11 1996/04/08 00:57:44 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -84,6 +84,7 @@
|
|||
#include "sfb.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h> /* printf() */
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -118,7 +119,7 @@ extern int pmax_boardtype;
|
|||
* Forward references.
|
||||
*/
|
||||
|
||||
int sfbinit (char *, int, int);
|
||||
int sfbinit __P((struct fbinfo *fi, caddr_t cfbaddr, int unit, int silent));
|
||||
|
||||
#define CMAP_BITS (3 * 256) /* 256 entries, 3 bytes per. */
|
||||
static u_char cmap_bits [CMAP_BITS]; /* colormap for console... */
|
||||
|
@ -154,7 +155,7 @@ sfbmatch(parent, match, aux)
|
|||
void *match;
|
||||
void *aux;
|
||||
{
|
||||
struct cfdata *cf = match;
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
|
||||
/* make sure that we're looking for this type of device. */
|
||||
|
@ -185,6 +186,7 @@ sfbattach(parent, self, aux)
|
|||
struct confargs *ca = aux;
|
||||
caddr_t sfbaddr = (caddr_t)ca->ca_addr;
|
||||
int unit = self->dv_unit;
|
||||
struct fbinfo *fi = (struct fbinfo *) self;
|
||||
|
||||
#ifdef notyet
|
||||
/* if this is the console, it's already configured. */
|
||||
|
@ -192,7 +194,7 @@ sfbattach(parent, self, aux)
|
|||
return; /* XXX patch up f softc pointer */
|
||||
#endif
|
||||
|
||||
if (!sfbinit(sfbaddr, unit, 0))
|
||||
if (!sfbinit(fi, sfbaddr, unit, 0))
|
||||
return;
|
||||
|
||||
#if 0 /*XXX*/
|
||||
|
@ -200,27 +202,17 @@ sfbattach(parent, self, aux)
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Test to see if device is present.
|
||||
* Return true if found and initialized ok.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
sfbprobe(cp)
|
||||
struct pmax_ctlr *cp;
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialization
|
||||
*/
|
||||
int
|
||||
sfbinit(base, unit, silent)
|
||||
sfbinit(fi, base, unit, silent)
|
||||
struct fbinfo *fi;
|
||||
char *base;
|
||||
int unit;
|
||||
int silent;
|
||||
{
|
||||
struct fbinfo *fi;
|
||||
u_char foo;
|
||||
|
||||
/*
|
||||
* If this device is being intialized as the console, malloc()
|
||||
|
@ -233,7 +225,7 @@ sfbinit(base, unit, silent)
|
|||
else {
|
||||
fi->fi_cmap_bits = malloc(CMAP_BITS, M_DEVBUF, M_NOWAIT);
|
||||
if (fi->fi_cmap_bits == NULL) {
|
||||
printf("cfb%d: no memory for cmap 0x%x\n", unit);
|
||||
printf("cfb%d: no memory for cmap\n", unit);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xcfb.c,v 1.13 1996/03/17 01:46:54 thorpej Exp $ */
|
||||
/* $NetBSD: xcfb.c,v 1.14 1996/04/08 00:57:40 jonathan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -90,6 +90,7 @@ xcfb needs dtop device
|
|||
#else
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -113,9 +114,9 @@ xcfb needs dtop device
|
|||
#include <pmax/pmax/cons.h>
|
||||
|
||||
#include <pmax/dev/xcfbreg.h>
|
||||
#include <pmax/dev/xcfbvar.h>
|
||||
#include <pmax/dev/ims332.h>
|
||||
#include <pmax/pmax/maxine.h>
|
||||
#include <pmax/pmax/pmaxtype.h>
|
||||
|
||||
#include <pmax/dev/dtopreg.h>
|
||||
|
||||
|
@ -192,7 +193,7 @@ xcfbmatch(parent, match, aux)
|
|||
void *match;
|
||||
void *aux;
|
||||
{
|
||||
struct cfdata *cf = match;
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
|
||||
/* Make sure that it's an xcfb. */
|
||||
|
@ -211,7 +212,7 @@ xcfbattach(parent, self, aux)
|
|||
{
|
||||
struct confargs *ca = aux;
|
||||
|
||||
if (!xcfbinit(NULL, ca->ca_addr, self->dv_unit, 0));
|
||||
if (!xcfbinit(NULL, (caddr_t)ca->ca_addr, self->dv_unit, 0));
|
||||
return;
|
||||
|
||||
/* no interrupts for XCFB */
|
||||
|
@ -230,8 +231,6 @@ xcfbinit(fi, base, unit, silent)
|
|||
int unit;
|
||||
int silent;
|
||||
{
|
||||
register u_int *reset = (u_int *)IMS332_RESET_ADDRESS;
|
||||
|
||||
/*XXX*/
|
||||
/*
|
||||
* If this device is being intialized as the console, malloc()
|
||||
|
@ -243,7 +242,7 @@ xcfbinit(fi, base, unit, silent)
|
|||
} else {
|
||||
fi->fi_cmap_bits = malloc(CMAP_BITS, M_DEVBUF, M_NOWAIT);
|
||||
if (fi->fi_cmap_bits == NULL) {
|
||||
printf("cfb%d: no memory for cmap 0x%x\n", unit);
|
||||
printf("cfb%d: no memory for cmap\n", unit);
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue