summaryrefslogtreecommitdiffstats
path: root/vidix
diff options
context:
space:
mode:
authorben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-11 23:04:03 +0000
committerben <ben@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-08-11 23:04:03 +0000
commitf2918b92400c460aafad3b98fecd03fde0fd0d0d (patch)
tree8d3b5f0d7b6221d8ad4f72f5a8bd0082bed778b3 /vidix
parentf14367fac94c32c6baab25ab34af96c93e183d0c (diff)
downloadmpv-f2918b92400c460aafad3b98fecd03fde0fd0d0d.tar.bz2
mpv-f2918b92400c460aafad3b98fecd03fde0fd0d0d.tar.xz
Add proper VIDIX support for SuperH architecture.
Patch by Magnus Damm <magnus dot damm at gmail dot com>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27451 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'vidix')
-rw-r--r--vidix/AsmMacros.h2
-rw-r--r--vidix/dha.c2
-rw-r--r--vidix/pci.c6
-rw-r--r--vidix/sysdep/pci_linux.c6
4 files changed, 11 insertions, 5 deletions
diff --git a/vidix/AsmMacros.h b/vidix/AsmMacros.h
index 228e4b6dd6..f40929ade5 100644
--- a/vidix/AsmMacros.h
+++ b/vidix/AsmMacros.h
@@ -77,6 +77,8 @@
#include "sysdep/AsmMacros_arm32.h"
#elif defined(__powerpc__)
#include "sysdep/AsmMacros_powerpc.h"
+#elif defined(__sh__)
+#include <sys/io.h>
#else
#include "sysdep/AsmMacros_x86.h"
#endif
diff --git a/vidix/dha.c b/vidix/dha.c
index 8e3d2ada5d..28dc8c8c09 100644
--- a/vidix/dha.c
+++ b/vidix/dha.c
@@ -185,7 +185,7 @@ void unmap_phys_mem(void *ptr, unsigned long size)
#endif /* Generic mmap (not win32, nor os2) */
-#if !defined(__alpha__) && !defined(__powerpc__)
+#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__)
unsigned char INPORT8(unsigned idx)
{
return inb(idx);
diff --git a/vidix/pci.c b/vidix/pci.c
index ffa91224e1..1006b14a80 100644
--- a/vidix/pci.c
+++ b/vidix/pci.c
@@ -484,7 +484,7 @@ static int pcibus=-1, pcicard=-1, pcifunc=-1 ;
#include "sysdep/pci_arm32.c"
#elif defined(__powerpc__)
#include "sysdep/pci_powerpc.c"
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__sh__)
/* Nothing here right now */
#else
#include "sysdep/pci_x86.c"
@@ -628,7 +628,7 @@ int pci_scan(pciinfo_t *pci_list,unsigned *num_pci)
} while (++pcr._pcibusidx < pcr._pcinumbus);
}
-#if !defined(__alpha__) && !defined(__powerpc__)
+#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__sh__)
/* Now try pci config 2 probe (deprecated) */
if ((pcr._configtype == 2) || do_mode2_scan) {
@@ -689,7 +689,7 @@ int pci_scan(pciinfo_t *pci_list,unsigned *num_pci)
outb(PCI_MODE2_ENABLE_REG, 0x00);
}
-#endif /* !__alpha__ && !__powerpc__ */
+#endif /* !__alpha__ && !__powerpc__ && !__sh__ */
disable_os_io();
diff --git a/vidix/sysdep/pci_linux.c b/vidix/sysdep/pci_linux.c
index aca99573db..12da9376b9 100644
--- a/vidix/sysdep/pci_linux.c
+++ b/vidix/sysdep/pci_linux.c
@@ -36,6 +36,10 @@ int iopl();
#endif
#endif
+#ifdef __sh__
+#define iopl(x) 1
+#endif
+
#include "config.h"
#ifdef CONFIG_DHAHELPER
@@ -141,7 +145,7 @@ static __inline__ int disable_os_io(void)
}
#if (defined(__powerpc__) || defined(__sparc__) || defined(__sparc64__) \
- || defined(__x86_64__)) && defined(__linux__) && !defined(CONFIG_SVGAHELPER)
+ || defined(__x86_64__) || defined(__sh__)) && defined(__linux__) && !defined(CONFIG_SVGAHELPER)
#define CONFIG_PCI_LINUX_PROC
#endif