	Enable the ioBase mapping code for mips, too. This is needed by
	xf86-video-siliconmotion.
--- xorg-server-1.7.6.orig/hw/xfree86/os-support/linux/lnx_video.c	2010-03-12 05:38:22.000000000 +0100
+++ xorg-server-1.7.6/hw/xfree86/os-support/linux/lnx_video.c	2010-06-05 21:46:29.659792653 +0200
@@ -485,7 +485,7 @@ unmapVidMem(int ScreenNum, pointer Base,
 /* I/O Permissions section                                                 */
 /***************************************************************************/
 
-#if defined(__powerpc__)
+#if defined(__powerpc__) || defined(__mips__)
 volatile unsigned char *ioBase = NULL;
 
 #ifndef __NR_pciconfig_iobase
@@ -497,7 +497,7 @@ volatile unsigned char *ioBase = NULL;
 Bool
 xf86EnableIO(void)
 {
-#if defined(__powerpc__)
+#if defined(__powerpc__) || defined(__mips__)
 	int fd;
 	unsigned int ioBase_phys;
 #endif
@@ -505,8 +505,12 @@ xf86EnableIO(void)
 	if (ExtendedEnabled)
 		return TRUE;
 
-#if defined(__powerpc__)
+#if defined(__powerpc__) || defined(__mips__)
+#ifdef __powerpc__
 	ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
+#else
+	ioBase_phys = 0x1fd00000;
+#endif
 
 	fd = open("/dev/mem", O_RDWR);
 	if (ioBase == NULL) {
@@ -522,9 +526,10 @@ xf86EnableIO(void)
 		    return FALSE;
 		}
 #endif
+		xf86Msg(X_INFO,"ioBase 0x%lx\n", (unsigned long)ioBase);
 	}
 	close(fd);
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__)
         if (ioperm(0, 1024, 1) || iopl(3)) {
                 if (errno == ENODEV)
                         ErrorF("xf86EnableIOPorts: no I/O ports found\n");
@@ -548,10 +553,10 @@ xf86DisableIO(void)
 {
 	if (!ExtendedEnabled)
 		return;
-#if defined(__powerpc__)
+#if defined(__powerpc__) || defined(__mips__)
 	munmap(ioBase, 0x20000);
 	ioBase = NULL;
-#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__)
+#elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__) && !defined(__m32r__)
 	iopl(0);
 	ioperm(0, 1024, 0);
 #endif
