# HG changeset patch # User ben # Date 1218495843 0 # Node ID 3f6d802c6ea87e87232caa88410788dc5864d995 # Parent 24f66c71a209f6a932dd1fc28995317c9d5928d6 Add proper VIDIX support for SuperH architecture. Patch by Magnus Damm . diff -r 24f66c71a209 -r 3f6d802c6ea8 vidix/AsmMacros.h --- a/vidix/AsmMacros.h Mon Aug 11 21:10:04 2008 +0000 +++ b/vidix/AsmMacros.h Mon Aug 11 23:04:03 2008 +0000 @@ -77,6 +77,8 @@ #include "sysdep/AsmMacros_arm32.h" #elif defined(__powerpc__) #include "sysdep/AsmMacros_powerpc.h" +#elif defined(__sh__) +#include #else #include "sysdep/AsmMacros_x86.h" #endif diff -r 24f66c71a209 -r 3f6d802c6ea8 vidix/dha.c --- a/vidix/dha.c Mon Aug 11 21:10:04 2008 +0000 +++ b/vidix/dha.c Mon Aug 11 23:04:03 2008 +0000 @@ -185,7 +185,7 @@ #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 -r 24f66c71a209 -r 3f6d802c6ea8 vidix/pci.c --- a/vidix/pci.c Mon Aug 11 21:10:04 2008 +0000 +++ b/vidix/pci.c Mon Aug 11 23:04:03 2008 +0000 @@ -484,7 +484,7 @@ #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 @@ } 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 @@ outb(PCI_MODE2_ENABLE_REG, 0x00); } -#endif /* !__alpha__ && !__powerpc__ */ +#endif /* !__alpha__ && !__powerpc__ && !__sh__ */ disable_os_io(); diff -r 24f66c71a209 -r 3f6d802c6ea8 vidix/sysdep/pci_linux.c --- a/vidix/sysdep/pci_linux.c Mon Aug 11 21:10:04 2008 +0000 +++ b/vidix/sysdep/pci_linux.c Mon Aug 11 23:04:03 2008 +0000 @@ -36,6 +36,10 @@ #endif #endif +#ifdef __sh__ +#define iopl(x) 1 +#endif + #include "config.h" #ifdef CONFIG_DHAHELPER @@ -141,7 +145,7 @@ } #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