Mercurial > mplayer.hg
changeset 5702:567de708ab3a
sync with mplayerxp
author | nick |
---|---|
date | Fri, 19 Apr 2002 16:34:04 +0000 |
parents | 67f0194f3a8c |
children | efd2518b174e |
files | libdha/libdha.c libdha/libdha.h libdha/pci.c libdha/sysdep/pci_alpha.c |
diffstat | 4 files changed, 20 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libdha/libdha.c Fri Apr 19 10:56:26 2002 +0000 +++ b/libdha/libdha.c Fri Apr 19 16:34:04 2002 +0000 @@ -27,6 +27,9 @@ #include <fcntl.h> #include <sys/stat.h> #include <sys/types.h> +#ifdef ARCH_ALPHA +#include <sys/io.h> +#endif #include <unistd.h> /* instead exit() use libdha_exit, and do the 'mother-application' deinit @@ -67,8 +70,12 @@ #include "kernelhelper/dhahelper.h" static int mem=-1; -void *map_phys_mem(unsigned base, unsigned size) +void *map_phys_mem(unsigned long base, unsigned long size) { +#ifdef ARCH_ALPHA +/* TODO: move it into sysdep */ + base += bus_base(); +#endif if ( (mem = open("/dev/dhahelper",O_RDWR)) < 0) { if ( (mem = open(DEV_MEM,O_RDWR)) == -1) { @@ -95,8 +102,12 @@ #else static int mem=-1; -void *map_phys_mem(unsigned base, unsigned size) +void *map_phys_mem(unsigned long base, unsigned long size) { +#ifdef ARCH_ALPHA +/* TODO: move it into sysdep */ + base += bus_base(); +#endif if ( (mem = open(DEV_MEM,O_RDWR)) == -1) { perror("libdha: open(/dev/mem) failed") ; exit(1) ; } @@ -104,7 +115,7 @@ } #endif /* CONFIG_DHAHELPER */ -void unmap_phys_mem(void *ptr, unsigned size) +void unmap_phys_mem(void *ptr, unsigned long size) { int res=munmap(ptr,size) ; if (res == -1) { perror("libdha: munmap() failed") ; exit(1) ; }
--- a/libdha/libdha.h Fri Apr 19 10:56:26 2002 +0000 +++ b/libdha/libdha.h Fri Apr 19 16:34:04 2002 +0000 @@ -55,8 +55,8 @@ extern void OUTPORT32(unsigned idx,unsigned val); #define OUTPORT(idx,val) OUTPORT32(idx,val) -extern void * map_phys_mem(unsigned base, unsigned size); -extern void unmap_phys_mem(void *ptr, unsigned size); +extern void * map_phys_mem(unsigned long base, unsigned long size); +extern void unmap_phys_mem(void *ptr, unsigned long size); /* These are the region types */ #define MTRR_TYPE_UNCACHABLE 0 @@ -70,4 +70,4 @@ } #endif -#endif \ No newline at end of file +#endif
--- a/libdha/pci.c Fri Apr 19 10:56:26 2002 +0000 +++ b/libdha/pci.c Fri Apr 19 16:34:04 2002 +0000 @@ -736,4 +736,4 @@ int disable_app_io( void ) { return disable_os_io(); -} \ No newline at end of file +}
--- a/libdha/sysdep/pci_alpha.c Fri Apr 19 10:56:26 2002 +0000 +++ b/libdha/sysdep/pci_alpha.c Fri Apr 19 16:34:04 2002 +0000 @@ -11,7 +11,7 @@ unsigned char dev, int func) { - int retval; + unsigned long retval; pciconfig_read(bus, dev<<3, PCI_ID_REG, 4, &retval); return retval; } @@ -22,7 +22,7 @@ int func, unsigned cmd) { - long retval; + unsigned long retval; pciconfig_read(bus, dev<<3, cmd, 4, &retval); return retval; }