diff --git a/configure.ac b/configure.ac index 5091e50..f74b912 100644 --- a/configure.ac +++ b/configure.ac @@ -20,45 +20,45 @@ # # Process this file with autoconf to produce a configure script -AC_PREREQ(2.57) +# Initialize Autoconf +AC_PREREQ([2.60]) AC_INIT([xf86-video-rendition], - 4.2.4, + [4.2.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], - xf86-video-rendition) - + [xf86-video-rendition]) AC_CONFIG_SRCDIR([Makefile.am]) -AM_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) +# Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) - AM_MAINTAINER_MODE -# Require xorg-macros: XORG_DEFAULT_OPTIONS +# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.3) + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -# Checks for programs. +# Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL -AC_PROG_CC AH_TOP([#include "xorg-server.h"]) +# Define a configure option for an alternate module directory AC_ARG_WITH(xorg-module-dir, - AC_HELP_STRING([--with-xorg-module-dir=DIR], + AS_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) -# Checks for extensions +# Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) -# Checks for pkg-config packages +# Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES]) # Checks for libraries. @@ -78,17 +78,16 @@ fi AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) # Checks for header files. -AC_HEADER_STDC AC_CHECK_HEADERS([elf.h] [elf_abi.h]) -AC_SUBST([XORG_CFLAGS]) AC_SUBST([moduledir]) DRIVER_NAME=rendition AC_SUBST([DRIVER_NAME]) -AC_OUTPUT([ - Makefile - src/Makefile - man/Makefile +AC_CONFIG_FILES([ + Makefile + src/Makefile + man/Makefile ]) +AC_OUTPUT diff --git a/man/Makefile.am b/man/Makefile.am index 8f2454b..b3688ce 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -31,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME@.man CLEANFILES = $(driverman_DATA) -SED = sed - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ - XORGMANNAME = X Version 11 - -MAN_SUBSTS = \ - -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__projectroot__|$(prefix)|g' \ - -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ - -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure + SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man .man.$(DRIVER_MAN_SUFFIX): - sed $(MAN_SUBSTS) < $< > $@ + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ diff --git a/man/rendition.man b/man/rendition.man index 3658ab0..afeee91 100644 --- a/man/rendition.man +++ b/man/rendition.man @@ -1,4 +1,3 @@ -.\" $__xservername__: xc/programs/Xserver/hw/xfree86/drivers/rendition/rendition.man,v 1.3 2003/06/18 16:17:39 eich Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH RENDITION __drivermansuffix__ __vendorversion__ diff --git a/src/accelX.c b/src/accelX.c index a499c56..ed4964e 100644 --- a/src/accelX.c +++ b/src/accelX.c @@ -289,7 +289,7 @@ int RENDITIONInitUcode(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; if (0 == verite_getstride(pScreenInfo, NULL, &pRendition->board.mode.stride0, @@ -367,7 +367,7 @@ void RENDITIONRestoreUcode(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; vu8 memend; @@ -410,7 +410,7 @@ void RENDITIONSaveUcode(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; vu8 memend; #ifdef DEBUG @@ -445,7 +445,7 @@ void RENDITIONSyncV1000(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; int c; @@ -555,7 +555,7 @@ RENDITIONSubsequentScreenToScreenCopy(ScrnInfoPtr pScreenInfo, int w, int h) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; #ifdef DEBUG @@ -607,7 +607,7 @@ RENDITIONSubsequentSolidFillRect(ScrnInfoPtr pScreenInfo, int x, int y, int w, int h) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; #ifdef DEBUG @@ -639,7 +639,7 @@ RENDITIONSubsequentTwoPointLine(ScrnInfoPtr pScreenInfo, int bias) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob = pRendition->board.io_base; + unsigned long iob = pRendition->board.io_base; #ifdef DEBUG diff --git a/src/rendition.c b/src/rendition.c index 7a9e18b..3202b49 100644 --- a/src/rendition.c +++ b/src/rendition.c @@ -330,7 +330,7 @@ renditionProbe(DriverPtr drv, int flags) renditionChipsets, renditionPCIchipsets, devSections, numDevSections, drv, &usedChips); - xfree(devSections); + free(devSections); if (numUsed <= 0) return FALSE; @@ -359,7 +359,7 @@ renditionProbe(DriverPtr drv, int flags) foundScreen=TRUE; } } - xfree(usedChips); + free(usedChips); } return foundScreen; } @@ -400,7 +400,7 @@ renditionGetRec(ScrnInfoPtr pScreenInfo) sleep(1); #endif if (!pScreenInfo->driverPrivate) - pScreenInfo->driverPrivate=xcalloc(sizeof(renditionRec), 1); + pScreenInfo->driverPrivate=calloc(sizeof(renditionRec), 1); /* perhaps some initialization? */ @@ -421,7 +421,7 @@ renditionFreeRec(ScrnInfoPtr pScreenInfo) #endif if (xf86LoaderCheckSymbol("vgaHWFreeHWRec")) vgaHWFreeHWRec(pScreenInfo); - xfree(pScreenInfo->driverPrivate); + free(pScreenInfo->driverPrivate); pScreenInfo->driverPrivate=NULL; #ifdef DEBUG @@ -596,7 +596,7 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags) /* collect all of the options flags and process them */ xf86CollectOptions(pScreenInfo, NULL); - if (!(pRendition->Options = xalloc(sizeof(renditionOptions)))) + if (!(pRendition->Options = malloc(sizeof(renditionOptions)))) return FALSE; memcpy(pRendition->Options, renditionOptions, sizeof(renditionOptions)); xf86ProcessOptions(pScreenInfo->scrnIndex, pScreenInfo->options, @@ -663,7 +663,11 @@ renditionPreInit(ScrnInfoPtr pScreenInfo, int flags) vgaHWGetIOBase(pvgaHW); /* Get VGA I/O base */ pRendition->board.accel=0; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 pRendition->board.vgaio_base = pvgaHW->PIOOffset; +#else + pRendition->board.vgaio_base = 0; +#endif pRendition->board.io_base = pRendition->board.vgaio_base #ifdef XSERVER_LIBPCIACCESS + pRendition->PciInfo->regions[1].base_addr; @@ -1167,7 +1171,7 @@ renditionScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pRendition->board.shadowPitch = BitmapBytePad(pScreenInfo->bitsPerPixel * width); pRendition->board.shadowPtr - = xalloc(pRendition->board.shadowPitch * height); + = malloc(pRendition->board.shadowPitch * height); displayWidth = pRendition->board.shadowPitch / (pScreenInfo->bitsPerPixel >> 3); FBBase = pRendition->board.shadowPtr; @@ -1484,7 +1488,7 @@ static xf86MonPtr renditionDDC (ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base; + unsigned long iob=pRendition->board.io_base; vu32 temp; xf86MonPtr MonInfo = NULL; @@ -1517,7 +1521,7 @@ static unsigned int renditionDDC1Read (ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base; + unsigned long iob=pRendition->board.io_base; vu32 value = 0; /* wait for Vsync */ diff --git a/src/v1krisc.c b/src/v1krisc.c index 2554263..9b7b4e2 100644 --- a/src/v1krisc.c +++ b/src/v1krisc.c @@ -83,20 +83,20 @@ * local function prototypes */ -static void verite_iopoll(IOADDRESS port, vu32 data, vu32 mask); -static void verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask); +static void verite_iopoll(unsigned long port, vu32 data, vu32 mask); +static void verite_iopoll8(unsigned long port, vu8 data, vu8 mask); -static vu32 readRF(IOADDRESS io_base, vu8 index); -static void writeRF(IOADDRESS io_base, vu8 index, vu32 data); +static vu32 readRF(unsigned long io_base, vu8 index); +static void writeRF(unsigned long io_base, vu8 index, vu32 data); -static vu32 risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type); -static void risc_writemem(IOADDRESS io_base, vu32 addr, vu32 data, vu8 write_type); +static vu32 risc_readmem(unsigned long io_base, vu32 addr, vu8 read_type); +static void risc_writemem(unsigned long io_base, vu32 addr, vu32 data, vu8 write_type); #if 0 -static void risc_step(IOADDRESS io_base, vu32 count); +static void risc_step(unsigned long io_base, vu32 count); #endif -static void risc_forcestep(IOADDRESS io_base, vu32 instruction); -static void risc_continue(IOADDRESS io_base); +static void risc_forcestep(unsigned long io_base, vu32 instruction); +static void risc_continue(unsigned long io_base); @@ -113,7 +113,7 @@ void v1k_start(ScrnInfoPtr pScreenInfo, vu32 pc) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS io_base=pRendition->board.io_base; + unsigned long io_base=pRendition->board.io_base; v1k_stop(pScreenInfo); risc_forcestep(io_base, NOP_INSTR); @@ -152,7 +152,7 @@ v1k_stop(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); vu8 debugreg, statusreg; - IOADDRESS io_base=pRendition->board.io_base; + unsigned long io_base=pRendition->board.io_base; vu16 STATUS = 0x4A; /* v2x00 io register offset */ int c; @@ -207,7 +207,7 @@ v1k_flushicache(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); vu32 c, p1, p2; - IOADDRESS io_base=pRendition->board.io_base; + unsigned long io_base=pRendition->board.io_base; /* first flush store accumulation buffers so data is all in memory */ p1=risc_readmem(io_base, 0, READ_WORD); @@ -255,7 +255,7 @@ void v1k_softreset(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS io_base=pRendition->board.io_base; + unsigned long io_base=pRendition->board.io_base; verite_out8(io_base+DEBUGREG, SOFTRESET|HOLDRISC); verite_out8(io_base+STATEINDEX, STATEINDEX_PC); @@ -300,12 +300,12 @@ v1k_getriscprocs(verite_board_desc *boardDesc) */ /* - * static void verite_iopoll(IOADDRESS port, vu32 data, vu32 mask) + * static void verite_iopoll(unsigned long port, vu32 data, vu32 mask) * * Loop on IO read until expected data is read or VERITE_MAX_POLLS is reached. */ static void -verite_iopoll(IOADDRESS port, vu32 data, vu32 mask) +verite_iopoll(unsigned long port, vu32 data, vu32 mask) { vu32 c; @@ -320,12 +320,12 @@ verite_iopoll(IOADDRESS port, vu32 data, vu32 mask) /* - * static void verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask) + * static void verite_iopoll8(unsigned long port, vu8 data, vu8 mask) * * Loop on IO read until expected data is read or VERITE_MAX_POLLS is reached. */ static void -verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask) +verite_iopoll8(unsigned long port, vu8 data, vu8 mask) { vu32 c; @@ -340,12 +340,12 @@ verite_iopoll8(IOADDRESS port, vu8 data, vu8 mask) /* - * static vu32 readRF(IOADDRESS io_base, vu8 index) + * static vu32 readRF(unsigned long io_base, vu8 index) * * Reads data from register file. */ static vu32 -readRF(IOADDRESS io_base, vu8 index) +readRF(unsigned long io_base, vu8 index) { vu32 data, instr; vu8 debug, stateindex; @@ -378,12 +378,12 @@ readRF(IOADDRESS io_base, vu8 index) /* - * static void writeRF(IOADDRESS io_base, vu8 index, vu32 data) + * static void writeRF(unsigned long io_base, vu8 index, vu32 data) * * Set RF register, being careful on how to set regs below 64. */ static void -writeRF(IOADDRESS io_base, vu8 index, vu32 data) +writeRF(unsigned long io_base, vu8 index, vu32 data) { vu8 special=0; @@ -417,12 +417,12 @@ writeRF(IOADDRESS io_base, vu8 index, vu32 data) /* - * static vu32 risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type) + * static vu32 risc_readmem(unsigned long io_base, vu32 addr, vu8 read_type) * * NOTE: Assumes RISC is in hold mode. */ static vu32 -risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type) +risc_readmem(unsigned long io_base, vu32 addr, vu8 read_type) { vu32 data; @@ -445,12 +445,12 @@ risc_readmem(IOADDRESS io_base, vu32 addr, vu8 read_type) /* - * static vu32 risc_writemem(IOADDRESS io_base, vu32 addr, vu32 data, vu8 write_type) + * static vu32 risc_writemem(unsigned long io_base, vu32 addr, vu32 data, vu8 write_type) * * NOTE: Assumes RISC is in hold mode. */ static void -risc_writemem(IOADDRESS io_base, vu32 addr, vu32 data, vu8 write_type) +risc_writemem(unsigned long io_base, vu32 addr, vu32 data, vu8 write_type) { writeRF(io_base, RISC_RA, addr); /* point to memory */ writeRF(io_base, RISC_FP, data); /* set data */ @@ -466,12 +466,12 @@ risc_writemem(IOADDRESS io_base, vu32 addr, vu32 data, vu8 write_type) #if 0 /* - * static void risc_step(IOADDRESS io_base, vu32 count) + * static void risc_step(unsigned long io_base, vu32 count) * * Single step the RISC. NOTE: Do not force instruction into RISCIR! */ static void -risc_step(IOADDRESS io_base, vu32 count) +risc_step(unsigned long io_base, vu32 count) { vu32 c, d; vu8 debugreg; @@ -494,12 +494,12 @@ risc_step(IOADDRESS io_base, vu32 count) /* - * static void risc_forcestep(IOADDRESS io_base, vu32 instruction) + * static void risc_forcestep(unsigned long io_base, vu32 instruction) * * Single step RISC; force instruction; assumes RISC held. */ static void -risc_forcestep(IOADDRESS io_base, vu32 instruction) +risc_forcestep(unsigned long io_base, vu32 instruction) { vu32 c; vu8 debugreg, stateindex; @@ -525,12 +525,12 @@ risc_forcestep(IOADDRESS io_base, vu32 instruction) /* - * static void risc_continue(IOADDRESS io_base) + * static void risc_continue(unsigned long io_base) * * Turn off hold bit. */ static void -risc_continue(IOADDRESS io_base) +risc_continue(unsigned long io_base) { vu8 debugreg; diff --git a/src/vboard.c b/src/vboard.c index 49499e2..622715f 100644 --- a/src/vboard.c +++ b/src/vboard.c @@ -38,7 +38,7 @@ verite_initboard(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base; + unsigned long iob=pRendition->board.io_base; vu8 *vmb; vu32 offset; vu8 memendian; @@ -207,7 +207,7 @@ void verite_check_csucode(ScrnInfoPtr pScreenInfo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base; + unsigned long iob=pRendition->board.io_base; vu8 *vmb; vu32 offset; int c; diff --git a/src/vgafont-std.data b/src/vgafont-std.data index db63ea8..c47983f 100644 --- a/src/vgafont-std.data +++ b/src/vgafont-std.data @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vgafont-std.data,v 1.3 1999/10/13 04:21:22 dawes Exp $ */ #ifndef __VGAFONT_STD__ #define __VGAFONT_STD__ diff --git a/src/vgafont-vrx.data b/src/vgafont-vrx.data index ad34582..23b5908 100644 --- a/src/vgafont-vrx.data +++ b/src/vgafont-vrx.data @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vgafont-vrx.data,v 1.3 1999/10/13 04:21:23 dawes Exp $ */ #ifndef __VGAFONT_VRX__ #define __VGAFONT_VRX__ diff --git a/src/vgapalette.data b/src/vgapalette.data index 5267608..106028d 100644 --- a/src/vgapalette.data +++ b/src/vgapalette.data @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vgapalette.data,v 1.3 1999/10/13 04:21:23 dawes Exp $ */ #ifndef __VGAPALETTE__ #define __VGAPALETTE__ diff --git a/src/vloaduc.c b/src/vloaduc.c index 67bf901..5c6aab0 100644 --- a/src/vloaduc.c +++ b/src/vloaduc.c @@ -103,7 +103,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name) sz=SW16(ehdr.e_phentsize); num=SW16(ehdr.e_phnum); if (0!=sz && 0!=num) { - orig_pphdr=pphdr=(Elf32_Phdr *)xalloc(sz*num); + orig_pphdr=pphdr=(Elf32_Phdr *)malloc(sz*num); if (!pphdr) { ErrorF("RENDITION: Cannot allocate global memory (1)\n"); close(fd); @@ -125,7 +125,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name) sz=SW16(ehdr.e_shentsize); num=SW16(ehdr.e_shnum); if (0!=sz && 0!=num) { - orig_pshdr=pshdr=(Elf32_Shdr *)xalloc(sz*num); + orig_pshdr=pshdr=(Elf32_Shdr *)malloc(sz*num); if (!pshdr) { ErrorF("RENDITION: Cannot allocate global memory (2)\n"); close(fd); @@ -148,7 +148,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name) loadSegment2board(pScreenInfo, fd, pphdr); pphdr=(Elf32_Phdr *)(((char *)pphdr)+sz); } while (--num); - xfree(orig_pphdr); + free(orig_pphdr); } else { do { @@ -158,7 +158,7 @@ verite_load_ucfile(ScrnInfoPtr pScreenInfo, char *file_name) loadSection2board(pScreenInfo, fd, pshdr); pshdr=(Elf32_Shdr *)(((char *)pshdr)+sz); } while (--num) ; - xfree(orig_pshdr); + free(orig_pshdr); } close(fd); @@ -195,7 +195,7 @@ loadSegment2board(ScrnInfoPtr pScreenInfo, int fd, Elf32_Phdr *phdr) return; } - data=(vu8 *)xalloc(size); + data=(vu8 *)malloc(size); if (NULL == data){ ErrorF("RENDITION: GlobalAllocPtr couldn't allocate %lx bytes", (unsigned long)size); @@ -210,7 +210,7 @@ loadSegment2board(ScrnInfoPtr pScreenInfo, int fd, Elf32_Phdr *phdr) mmve(pScreenInfo, size, data, physAddr); - xfree(data); + free(data); } diff --git a/src/vmodes.c b/src/vmodes.c index c0bd0df..f2dae0b 100644 --- a/src/vmodes.c +++ b/src/vmodes.c @@ -20,6 +20,7 @@ #include "v1kregs.h" #include "v2kregs.h" +#include #undef DEBUG @@ -201,7 +202,7 @@ struct V1000ClocksStr { * local function prototypes */ -static void set_PLL(IOADDRESS iob, vu32 value); +static void set_PLL(unsigned long iob, vu32 value); static double V1000CalcClock(double target, int *M, int *N, int *P); static double V2200CalcClock(double target, int *m, int *n, int *p); @@ -509,13 +510,13 @@ verite_getstride(ScrnInfoPtr pScreenInfo, int *width, */ /* - * void set_PLL(IOADDRESS iob, vu32 value) + * void set_PLL(unsigned long iob, vu32 value) * * Set PLL clock to desired frequency for the V1000. */ void -set_PLL(IOADDRESS iob, vu32 value) +set_PLL(unsigned long iob, vu32 value) { vu32 ulD; int b; diff --git a/src/vos.h b/src/vos.h index 7b55f77..999c870 100644 --- a/src/vos.h +++ b/src/vos.h @@ -23,18 +23,18 @@ /* * function prototypes */ -#define /*void*/ verite_out8(/*IOADDRESS*/ port, /*vu8*/ data) \ +#define /*void*/ verite_out8(/*unsigned long*/ port, /*vu8*/ data) \ outb(port, data) -#define /*void*/ verite_out16(/*IOADDRESS*/ port, /*vu16*/ data) \ +#define /*void*/ verite_out16(/*unsigned long*/ port, /*vu16*/ data) \ outw(port, data) -#define /*void*/ verite_out32(/*IOADDRESS*/ port, /*vu32*/ data) \ +#define /*void*/ verite_out32(/*unsigned long*/ port, /*vu32*/ data) \ outl(port, data) -#define /*vu8*/ verite_in8(/*IOADDRESS*/ io_base) ((vu8)inb(io_base)) -#define /*vu16*/ verite_in16(/*IOADDRESS*/ io_base) ((vu16)inw(io_base)) -#define /*vu32*/ verite_in32(/*IOADDRESS*/ io_base) ((vu32)inl(io_base)) +#define /*vu8*/ verite_in8(/*unsigned long*/ io_base) ((vu8)inb(io_base)) +#define /*vu16*/ verite_in16(/*unsigned long*/ io_base) ((vu16)inw(io_base)) +#define /*vu32*/ verite_in32(/*unsigned long*/ io_base) ((vu32)inl(io_base)) /* memory accesses */ #define verite_read_memory32(base, offset) MMIO_IN32(base, offset) diff --git a/src/vramdac.c b/src/vramdac.c index 7c8acbd..21c1df7 100644 --- a/src/vramdac.c +++ b/src/vramdac.c @@ -93,11 +93,11 @@ * local function prototypes */ -static void Bt485_write_masked(IOADDRESS port, vu8 reg, vu8 mask, vu8 data); -static void Bt485_write_cmd3_masked(IOADDRESS port, vu8 mask, vu8 data); +static void Bt485_write_masked(unsigned long port, vu8 reg, vu8 mask, vu8 data); +static void Bt485_write_cmd3_masked(unsigned long port, vu8 mask, vu8 data); #if 0 -static vu8 Bt485_read_masked(IOADDRESS port, vu8 reg, vu8 mask); -static vu8 Bt485_read_cmd3_masked(IOADDRESS port, vu8 mask); +static vu8 Bt485_read_masked(unsigned long port, vu8 reg, vu8 mask); +static vu8 Bt485_read_cmd3_masked(unsigned long port, vu8 mask); #endif /* @@ -159,7 +159,7 @@ int verite_initdac(ScrnInfoPtr pScreenInfo, vu8 bpp, vu8 doubleclock) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base+RAMDACBASEADDR; + unsigned long iob=pRendition->board.io_base+RAMDACBASEADDR; vu8 cmd0,cmd1,cmd2; vu8 cmd3_data=0; @@ -271,7 +271,7 @@ verite_enablecursor(ScrnInfoPtr pScreenInfo, int type, int size) BT485_3_COLOR_CURSOR, BT485_X_WINDOW_CURSOR }; static vu8 csizes[]={ BT485_32_BY_32_CURSOR, BT485_64_BY_64_CURSOR }; - IOADDRESS iob=pRendition->board.io_base+RAMDACBASEADDR; + unsigned long iob=pRendition->board.io_base+RAMDACBASEADDR; #ifdef DEBUG ErrorF ("Rendition: Debug verite_enablecursor called type=0x%x\n",type); @@ -304,7 +304,7 @@ void verite_movecursor(ScrnInfoPtr pScreenInfo, vu16 x, vu16 y, vu8 xo, vu8 yo) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base+RAMDACBASEADDR; + unsigned long iob=pRendition->board.io_base+RAMDACBASEADDR; x+=Cursor_size-xo; y+=Cursor_size-yo; @@ -327,7 +327,7 @@ void verite_setcursorcolor(ScrnInfoPtr pScreenInfo, vu32 fg, vu32 bg) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base+RAMDACBASEADDR; + unsigned long iob=pRendition->board.io_base+RAMDACBASEADDR; #ifdef DEBUG ErrorF ("Rendition: Debug verite_setcursorcolor called FG=0x%x BG=0x%x\n", @@ -374,7 +374,7 @@ verite_loadcursor(ScrnInfoPtr pScreenInfo, vu8 size, vu8 *cursorimage) int c, bytes, row; vu8 *src = cursorimage; renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base+RAMDACBASEADDR; + unsigned long iob=pRendition->board.io_base+RAMDACBASEADDR; vu8 tmp; vu8 memend; /* Added for byte-swap fix */ @@ -454,7 +454,7 @@ verite_setpalette(ScrnInfoPtr pScreenInfo, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) { renditionPtr pRendition = RENDITIONPTR(pScreenInfo); - IOADDRESS iob=pRendition->board.io_base; + unsigned long iob=pRendition->board.io_base; vu32 crtc_status; int i, index; @@ -485,12 +485,12 @@ verite_setpalette(ScrnInfoPtr pScreenInfo, int numColors, int *indices, */ /* - * static void Bt485_write_masked(IOADDRESS port, vu8 reg, vu8 mask, vu8 data) + * static void Bt485_write_masked(unsigned long port, vu8 reg, vu8 mask, vu8 data) * * */ static void -Bt485_write_masked(IOADDRESS port, vu8 reg, vu8 mask, vu8 data) +Bt485_write_masked(unsigned long port, vu8 reg, vu8 mask, vu8 data) { vu8 tmp; @@ -501,12 +501,12 @@ Bt485_write_masked(IOADDRESS port, vu8 reg, vu8 mask, vu8 data) /* - * static void Bt485_write_cmd3_masked(IOADDRESS port, vu8 mask, vu8 data) + * static void Bt485_write_cmd3_masked(unsigned long port, vu8 mask, vu8 data) * * */ static void -Bt485_write_cmd3_masked(IOADDRESS port, vu8 mask, vu8 data) +Bt485_write_cmd3_masked(unsigned long port, vu8 mask, vu8 data) { /* * Bt485_write_masked(port, BT485_COMMAND_REG_0, 0x7f, 0x80); @@ -522,24 +522,24 @@ Bt485_write_cmd3_masked(IOADDRESS port, vu8 mask, vu8 data) #if 0 /* - * static vu8 Bt485_read_masked(IOADDRESS port, vu8 reg, vu8 mask) + * static vu8 Bt485_read_masked(unsigned long port, vu8 reg, vu8 mask) * * */ static vu8 -Bt485_read_masked(IOADDRESS port, vu8 reg, vu8 mask) +Bt485_read_masked(unsigned long port, vu8 reg, vu8 mask) { return verite_in8(port+reg)&mask; } /* - * static vu8 Bt485_read_cmd3_masked(IOADDRESS port, vu8 mask) + * static vu8 Bt485_read_cmd3_masked(unsigned long port, vu8 mask) * * */ static vu8 -Bt485_read_cmd3_masked(IOADDRESS port, vu8 mask) +Bt485_read_cmd3_masked(unsigned long port, vu8 mask) { vu8 value; diff --git a/src/vtypes.h b/src/vtypes.h index 257870b..e4ad468 100644 --- a/src/vtypes.h +++ b/src/vtypes.h @@ -123,7 +123,7 @@ struct verite_board_t { vu16 chip; /* */ - IOADDRESS io_base, vgaio_base; + unsigned long io_base, vgaio_base; vu32 mmio_base; vu32 vmmio_base; vu32 mem_size;