patch-2.4.26 linux-2.4.26/drivers/video/sis/osdef.h
Next file: linux-2.4.26/drivers/video/sis/sis_accel.c
Previous file: linux-2.4.26/drivers/video/sis/oem310.h
Back to the patch index
Back to the overall index
- Lines: 154
- Date:
2004-04-14 06:05:40.000000000 -0700
- Orig file:
linux-2.4.25/drivers/video/sis/osdef.h
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.25/drivers/video/sis/osdef.h linux-2.4.26/drivers/video/sis/osdef.h
@@ -31,13 +31,10 @@
* * 2) Redistributions in binary form must reproduce the above copyright
* * notice, this list of conditions and the following disclaimer in the
* * documentation and/or other materials provided with the distribution.
- * * 3) All advertising materials mentioning features or use of this software
- * * must display the following acknowledgement: "This product includes
- * * software developed by Thomas Winischhofer, Vienna, Austria."
- * * 4) The name of the author may not be used to endorse or promote products
+ * * 3) The name of the author may not be used to endorse or promote products
* * derived from this software without specific prior written permission.
* *
- * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR
* * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
@@ -54,95 +51,77 @@
*/
/* The choices are: */
-
#define LINUX_KERNEL /* Kernel framebuffer */
/* #define LINUX_XF86 */ /* XFree86 */
-/**********************************************************************/
-#ifdef LINUX_KERNEL /* -------------------------- */
-#include <linux/config.h>
-#include <linux/version.h>
-
-#ifdef CONFIG_FB_SIS_300
-#define SIS300
-#endif
-
-#ifdef CONFIG_FB_SIS_315
-#define SIS315H
-#endif
-
-#if 1
-#define SISFBACCEL /* Include 2D acceleration */
-#endif
-
-#endif
-
-#ifdef LINUX_XF86 /* ----------------------------- */
-#define SIS300
-#define SIS315H
-#endif
-
-/**********************************************************************/
-#ifdef LINUX_XF86
-#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
-#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
-#endif
-
-#ifdef LINUX_KERNEL
-#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
-#define SiS_MemoryCopy(Destination,Soruce,Length) memcpy(Destination,Soruce,Length)
-#endif
-
-/**********************************************************************/
-
#ifdef OutPortByte
#undef OutPortByte
-#endif /* OutPortByte */
+#endif
#ifdef OutPortWord
#undef OutPortWord
-#endif /* OutPortWord */
+#endif
#ifdef OutPortLong
#undef OutPortLong
-#endif /* OutPortLong */
+#endif
#ifdef InPortByte
#undef InPortByte
-#endif /* InPortByte */
+#endif
#ifdef InPortWord
#undef InPortWord
-#endif /* InPortWord */
+#endif
#ifdef InPortLong
#undef InPortLong
-#endif /* InPortLong */
+#endif
/**********************************************************************/
-/* LINUX XF86 */
+/* LINUX KERNEL */
/**********************************************************************/
-#ifdef LINUX_XF86
-#define OutPortByte(p,v) outb((CARD16)(p),(CARD8)(v))
-#define OutPortWord(p,v) outw((CARD16)(p),(CARD16)(v))
-#define OutPortLong(p,v) outl((CARD16)(p),(CARD32)(v))
-#define InPortByte(p) inb((CARD16)(p))
-#define InPortWord(p) inw((CARD16)(p))
-#define InPortLong(p) inl((CARD16)(p))
+#ifdef LINUX_KERNEL
+#include <linux/config.h>
+#include <linux/version.h>
+
+#ifdef CONFIG_FB_SIS_300
+#define SIS300
+#endif
+
+#ifdef CONFIG_FB_SIS_315
+#define SIS315H
+#endif
+
+#if 1
+#define SISFBACCEL /* Include 2D acceleration */
+#endif
+
+#define OutPortByte(p,v) outb((u8)(v),(SISIOADDRESS)(p))
+#define OutPortWord(p,v) outw((u16)(v),(SISIOADDRESS)(p))
+#define OutPortLong(p,v) outl((u32)(v),(SISIOADDRESS)(p))
+#define InPortByte(p) inb((SISIOADDRESS)(p))
+#define InPortWord(p) inw((SISIOADDRESS)(p))
+#define InPortLong(p) inl((SISIOADDRESS)(p))
+#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
#endif
/**********************************************************************/
-/* LINUX KERNEL */
+/* XFree86 */
/**********************************************************************/
-#ifdef LINUX_KERNEL
-#define OutPortByte(p,v) outb((u8)(v),(u16)(p))
-#define OutPortWord(p,v) outw((u16)(v),(u16)(p))
-#define OutPortLong(p,v) outl((u32)(v),(u16)(p))
-#define InPortByte(p) inb((u16)(p))
-#define InPortWord(p) inw((u16)(p))
-#define InPortLong(p) inl((u16)(p))
+#ifdef LINUX_XF86
+#define SIS300
+#define SIS315H
+
+#define OutPortByte(p,v) outb((IOADDRESS)(p),(CARD8)(v))
+#define OutPortWord(p,v) outw((IOADDRESS)(p),(CARD16)(v))
+#define OutPortLong(p,v) outl((IOADDRESS)(p),(CARD32)(v))
+#define InPortByte(p) inb((IOADDRESS)(p))
+#define InPortWord(p) inw((IOADDRESS)(p))
+#define InPortLong(p) inl((IOADDRESS)(p))
+#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)