summaryrefslogtreecommitdiffstats
path: root/vidix/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'vidix/sysdep')
-rw-r--r--vidix/sysdep/AsmMacros_x86.h30
-rw-r--r--vidix/sysdep/libdha_os2.c26
-rw-r--r--vidix/sysdep/libdha_win32.c10
-rw-r--r--vidix/sysdep/pci_alpha.c2
-rw-r--r--vidix/sysdep/pci_arm32.c4
-rw-r--r--vidix/sysdep/pci_ia64.c4
-rw-r--r--vidix/sysdep/pci_linux.c26
-rw-r--r--vidix/sysdep/pci_lynx.c20
-rw-r--r--vidix/sysdep/pci_os2.c12
-rw-r--r--vidix/sysdep/pci_powerpc.c2
-rw-r--r--vidix/sysdep/pci_sparc.c4
-rw-r--r--vidix/sysdep/pci_x86.c4
12 files changed, 72 insertions, 72 deletions
diff --git a/vidix/sysdep/AsmMacros_x86.h b/vidix/sysdep/AsmMacros_x86.h
index 88e71e275d..35411c92dc 100644
--- a/vidix/sysdep/AsmMacros_x86.h
+++ b/vidix/sysdep/AsmMacros_x86.h
@@ -92,7 +92,7 @@ extern int svgahelper_initialized;
static __inline__ void svga_outb(short port, char value)
{
io_t iov;
-
+
iov.val = value;
iov.port = port;
ioctl(svgahelper_fd, SVGALIB_HELPER_IOCSOUTB, &iov);
@@ -101,7 +101,7 @@ static __inline__ void svga_outb(short port, char value)
static __inline__ void svga_outw(short port, char value)
{
io_t iov;
-
+
iov.val = value;
iov.port = port;
ioctl(svgahelper_fd, SVGALIB_HELPER_IOCSOUTW, &iov);
@@ -110,7 +110,7 @@ static __inline__ void svga_outw(short port, char value)
static __inline__ void svga_outl(short port, unsigned int value)
{
io_t iov;
-
+
iov.val = value;
iov.port = port;
ioctl(svgahelper_fd, SVGALIB_HELPER_IOCSOUTL, &iov);
@@ -119,30 +119,30 @@ static __inline__ void svga_outl(short port, unsigned int value)
static __inline__ unsigned int svga_inb(short port)
{
io_t iov;
-
+
iov.port = port;
ioctl(svgahelper_fd, SVGALIB_HELPER_IOCGINB, &iov);
-
+
return iov.val;
}
static __inline__ unsigned int svga_inw(short port)
{
io_t iov;
-
+
iov.port = port;
ioctl(svgahelper_fd, SVGALIB_HELPER_IOCGINW, &iov);
-
+
return iov.val;
}
static __inline__ unsigned int svga_inl(short port)
{
io_t iov;
-
+
iov.port = port;
ioctl(svgahelper_fd, SVGALIB_HELPER_IOCGINL, &iov);
-
+
return iov.val;
}
#endif /* CONIFG_SVGAHELPER */
@@ -161,7 +161,7 @@ static __inline__ void outb(short port,char val)
if (dhahelper_initialized == 1)
{
dhahelper_port_t _port;
-
+
_port.operation = PORT_OP_WRITE;
_port.addr = port;
_port.size = 1;
@@ -189,7 +189,7 @@ static __inline__ void outw(short port,short val)
if (dhahelper_initialized == 1)
{
dhahelper_port_t _port;
-
+
_port.operation = PORT_OP_WRITE;
_port.addr = port;
_port.size = 2;
@@ -217,7 +217,7 @@ static __inline__ void outl(short port,unsigned int val)
if (dhahelper_initialized == 1)
{
dhahelper_port_t _port;
-
+
_port.operation = PORT_OP_WRITE;
_port.addr = port;
_port.size = 4;
@@ -246,7 +246,7 @@ static __inline__ unsigned int inb(short port)
if (dhahelper_initialized == 1)
{
dhahelper_port_t _port;
-
+
_port.operation = PORT_OP_READ;
_port.addr = port;
_port.size = 1;
@@ -276,7 +276,7 @@ static __inline__ unsigned int inw(short port)
if (dhahelper_initialized == 1)
{
dhahelper_port_t _port;
-
+
_port.operation = PORT_OP_READ;
_port.addr = port;
_port.size = 2;
@@ -306,7 +306,7 @@ static __inline__ unsigned int inl(short port)
if (dhahelper_initialized == 1)
{
dhahelper_port_t _port;
-
+
_port.operation = PORT_OP_READ;
_port.addr = port;
_port.size = 4;
diff --git a/vidix/sysdep/libdha_os2.c b/vidix/sysdep/libdha_os2.c
index 14ba370b42..f9d166716b 100644
--- a/vidix/sysdep/libdha_os2.c
+++ b/vidix/sysdep/libdha_os2.c
@@ -5,24 +5,24 @@
* <Holger.Veit@gmd.de>
* Modified 1996 by Sebastien Marineau <marineau@genie.uottawa.ca>
*
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * HOLGER VEIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * HOLGER VEIT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
- *
+ *
* Except as contained in this notice, the name of Holger Veit shall not be
* used in advertising or otherwise to promote the sale, use or other dealings
* in this Software without prior written authorization from Holger Veit.
@@ -140,7 +140,7 @@ void unmap_phys_mem(void * base, unsigned long size)
/* and changing it appropriately to call this with the virtual adress */
/* If the above mapping function is only called once, then we can store */
/* the virtual adress and use it here.... */
-
+
par.addr = (ULONG)base;
par.size = 0xffffffff; /* This is the virtual address parameter. Set this to ignore */
plen = sizeof(par);
@@ -156,6 +156,6 @@ void unmap_phys_mem(void * base, unsigned long size)
* the other pointers will immediately become invalid. We avoid closing
* driver for now, but this should be fixed for server exit
*/
-
+
if(!callcount) close_mmap();
}
diff --git a/vidix/sysdep/libdha_win32.c b/vidix/sysdep/libdha_win32.c
index 50c037aa2b..d6ecdae014 100644
--- a/vidix/sysdep/libdha_win32.c
+++ b/vidix/sysdep/libdha_win32.c
@@ -32,17 +32,17 @@ typedef struct MapDevRequest
#define FILE_DEVICE_UNKNOWN 0x00000022
#define METHOD_NEITHER 3
-
+
int IsWinNT(void) {
OSVERSIONINFO OSVersionInfo;
OSVersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&OSVersionInfo);
return OSVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT;
-}
+}
+
+static HANDLE hDriver = INVALID_HANDLE_VALUE;
+
-static HANDLE hDriver = INVALID_HANDLE_VALUE;
-
-
/* Memory Map a piece of Real Memory */
void *map_phys_mem(unsigned long base, unsigned long size) {
if(!IsWinNT()){
diff --git a/vidix/sysdep/pci_alpha.c b/vidix/sysdep/pci_alpha.c
index e968b3e121..997aaa70a1 100644
--- a/vidix/sysdep/pci_alpha.c
+++ b/vidix/sysdep/pci_alpha.c
@@ -19,7 +19,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
unsigned long retval;
diff --git a/vidix/sysdep/pci_arm32.c b/vidix/sysdep/pci_arm32.c
index a631887da3..9ef2012727 100644
--- a/vidix/sysdep/pci_arm32.c
+++ b/vidix/sysdep/pci_arm32.c
@@ -10,7 +10,7 @@ static int pci_config_type( void )
unsigned char tmp1, tmp2;
int retval;
retval = 0;
-
+
outb(PCI_MODE2_ENABLE_REG, 0x00);
outb(PCI_MODE2_FORWARD_REG, 0x00);
tmp1 = inb(PCI_MODE2_ENABLE_REG);
@@ -50,7 +50,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
unsigned long config_cmd;
diff --git a/vidix/sysdep/pci_ia64.c b/vidix/sysdep/pci_ia64.c
index a631887da3..9ef2012727 100644
--- a/vidix/sysdep/pci_ia64.c
+++ b/vidix/sysdep/pci_ia64.c
@@ -10,7 +10,7 @@ static int pci_config_type( void )
unsigned char tmp1, tmp2;
int retval;
retval = 0;
-
+
outb(PCI_MODE2_ENABLE_REG, 0x00);
outb(PCI_MODE2_FORWARD_REG, 0x00);
tmp1 = inb(PCI_MODE2_ENABLE_REG);
@@ -50,7 +50,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
unsigned long config_cmd;
diff --git a/vidix/sysdep/pci_linux.c b/vidix/sysdep/pci_linux.c
index 12da9376b9..6accf0885d 100644
--- a/vidix/sysdep/pci_linux.c
+++ b/vidix/sysdep/pci_linux.c
@@ -69,14 +69,14 @@ static int pci_config_type(void)
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
pcic_t p;
-
+
p.address = cmd;
p.pcipos = (bus << 8) | dev | (func << 5);
-
+
if (ioctl(svgahelper_fd, SVGALIB_HELPER_IOCGPCIINL, &p))
return -1;
@@ -116,10 +116,10 @@ static __inline__ int enable_os_io(void)
#if defined(__powerpc__) && defined(__linux__)
/* should be fixed? */
-#else
+#else
if (iopl(3) != 0)
return errno;
-#endif
+#endif
return 0;
}
@@ -137,10 +137,10 @@ static __inline__ int disable_os_io(void)
#endif
#if defined(__powerpc__) && defined(__linux__)
/* should be fixed? */
-#else
+#else
if (iopl(0) != 0)
return errno;
-#endif
+#endif
return 0;
}
@@ -152,8 +152,8 @@ static __inline__ int disable_os_io(void)
#if defined(CONFIG_PCI_LINUX_PROC)
static int pci_config_type( void ) { return 1; }
-/* pci operations for (powerpc) Linux
- questions, suggestions etc:
+/* pci operations for (powerpc) Linux
+ questions, suggestions etc:
mplayer-dev-eng@mplayerhq.hu, colin@colino.net*/
#include <fcntl.h>
//#include <sys/io.h>
@@ -179,11 +179,11 @@ static int pci_get_vendor(
pread(fd, &device, 2, PCI_DEVICE_ID) == 2) {
vendor = le2me_16(vendor);
device = le2me_16(device);
- retval = vendor + (device<<16); /*no worries about byte order,
+ retval = vendor + (device<<16); /*no worries about byte order,
all ppc are bigendian*/
} else {
retval = 0xFFFF;
- }
+ }
if (fd > 0) {
close(fd);
}
@@ -193,7 +193,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
long retval;
@@ -208,7 +208,7 @@ static long pci_config_read_long(
retval = le2me_32(retval);
} else {
retval = 0;
- }
+ }
if (fd > 0) {
close(fd);
}
diff --git a/vidix/sysdep/pci_lynx.c b/vidix/sysdep/pci_lynx.c
index 59b8dddb2c..d24676ad1f 100644
--- a/vidix/sysdep/pci_lynx.c
+++ b/vidix/sysdep/pci_lynx.c
@@ -35,7 +35,7 @@
* to change too much code
*/
#include <smem.h>
-
+
static unsigned char *pciConfBase;
static __inline__ void enable_os_io(void)
@@ -54,23 +54,23 @@ static __inline__ void disable_os_io(void)
}
#include <smem.h>
-
+
static unsigned char *pciConfBase;
-
+
static __inline__ unsigned long
static swapl(unsigned long val)
{
unsigned char *p = (unsigned char *)&val;
return (p[3] << 24) | (p[2] << 16) | (p[1] << 8) | (p[0] << 0);
}
-
-
+
+
#define BUS(tag) (((tag)>>16)&0xff)
#define DFN(tag) (((tag)>>8)&0xff)
-
+
#define PCIBIOS_DEVICE_NOT_FOUND 0x86
#define PCIBIOS_SUCCESSFUL 0x00
-
+
static int pciconfig_read(
unsigned char bus,
unsigned char dev,
@@ -80,7 +80,7 @@ static int pciconfig_read(
{
unsigned long _val;
unsigned long *ptr;
-
+
dev >>= 3;
if (bus || dev >= 16) {
*val = 0xFFFFFFFF;
@@ -92,7 +92,7 @@ static int pciconfig_read(
*val = _val;
return PCIBIOS_SUCCESSFUL;
}
-
+
static int pciconfig_write(
unsigned char bus,
unsigned char dev,
@@ -102,7 +102,7 @@ static int pciconfig_write(
{
unsigned long _val;
unsigned long *ptr;
-
+
dev >>= 3;
_val = swapl(val);
if (bus || dev >= 16) {
diff --git a/vidix/sysdep/pci_os2.c b/vidix/sysdep/pci_os2.c
index 5e19463820..2dc678c148 100644
--- a/vidix/sysdep/pci_os2.c
+++ b/vidix/sysdep/pci_os2.c
@@ -37,7 +37,7 @@ static __inline__ int enable_os_io(void)
ULONG dlen,action;
APIRET rc;
static char *ioDrvPath = "/dev/fastio$";
-
+
if (DosOpen((PSZ)ioDrvPath, (PHFILE)&hfd, (PULONG)&action,
(ULONG)0, FILE_SYSTEM, FILE_OPEN,
OPEN_SHARE_DENYNONE|OPEN_FLAGS_NOINHERIT|OPEN_ACCESS_READONLY,
@@ -47,9 +47,9 @@ static __inline__ int enable_os_io(void)
return 42;
}
callgate[0] = callgate[1] = 0;
-
+
/* Get callgate from driver for fast io to ports and other stuff */
-
+
rc = DosDevIOCtl(hfd, (ULONG)0x76, (ULONG)0x64,
NULL, 0, NULL,
(ULONG*)&callgate[2], sizeof(USHORT), &dlen);
@@ -59,14 +59,14 @@ static __inline__ int enable_os_io(void)
DosClose(hfd);
return 42;
}
-
+
/* Calling callgate with function 13 sets IOPL for the program */
-
+
__asm__ volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate"
: /*no outputs */
: /*no inputs */
: "eax","ebx","ecx","edx","cc");
-
+
DosClose(hfd);
return 0;
}
diff --git a/vidix/sysdep/pci_powerpc.c b/vidix/sysdep/pci_powerpc.c
index 94529037b6..cda750b153 100644
--- a/vidix/sysdep/pci_powerpc.c
+++ b/vidix/sysdep/pci_powerpc.c
@@ -20,7 +20,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
long retval;
diff --git a/vidix/sysdep/pci_sparc.c b/vidix/sysdep/pci_sparc.c
index a631887da3..9ef2012727 100644
--- a/vidix/sysdep/pci_sparc.c
+++ b/vidix/sysdep/pci_sparc.c
@@ -10,7 +10,7 @@ static int pci_config_type( void )
unsigned char tmp1, tmp2;
int retval;
retval = 0;
-
+
outb(PCI_MODE2_ENABLE_REG, 0x00);
outb(PCI_MODE2_FORWARD_REG, 0x00);
tmp1 = inb(PCI_MODE2_ENABLE_REG);
@@ -50,7 +50,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
unsigned long config_cmd;
diff --git a/vidix/sysdep/pci_x86.c b/vidix/sysdep/pci_x86.c
index a631887da3..9ef2012727 100644
--- a/vidix/sysdep/pci_x86.c
+++ b/vidix/sysdep/pci_x86.c
@@ -10,7 +10,7 @@ static int pci_config_type( void )
unsigned char tmp1, tmp2;
int retval;
retval = 0;
-
+
outb(PCI_MODE2_ENABLE_REG, 0x00);
outb(PCI_MODE2_FORWARD_REG, 0x00);
tmp1 = inb(PCI_MODE2_ENABLE_REG);
@@ -50,7 +50,7 @@ static int pci_get_vendor(
static long pci_config_read_long(
unsigned char bus,
unsigned char dev,
- int func,
+ int func,
unsigned cmd)
{
unsigned long config_cmd;