[PATCH 2/2] xfree86: Add Loongson MIPS support

Jeremy Huddleston jeremyhu at apple.com
Sat Oct 15 21:40:03 PDT 2011


Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41038

Signed-off-by: Matt Kraai <kraai at ftbfs.org>
Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
---
 hw/xfree86/os-support/linux/lnx_video.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index 18116bd..a023da3 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -131,16 +131,21 @@ volatile unsigned char *ioBase = NULL;
 Bool
 xf86EnableIO(void)
 {
-#if defined(__powerpc__)
+#if defined(__mips__) || defined(__powerpc__)
 	int fd;
-	unsigned int ioBase_phys;
+	pointer ioBase_phys;
 #endif
 
 	if (ExtendedEnabled)
 		return TRUE;
 
-#if defined(__powerpc__)
+#if defined(__mips__) || defined(__powerpc__)
+
+# if defined(__mips__)
+	ioBase_phys = 0x1fd00000;
+# elif defined(__powerpc__)
 	ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
+# endif
 
 	fd = open("/dev/mem", O_RDWR);
 	if (ioBase == NULL) {
-- 
1.7.6.1




More information about the xorg-devel mailing list