[Mplayer-cvslog] CVS: main/libdha libdha.c,1.6,1.7 libdha.h,1.6,1.7 pci.c,1.8,1.9
Nick Kurshev
nick at mplayerhq.hu
Fri Apr 19 18:34:06 CEST 2002
Update of /cvsroot/mplayer/main/libdha
In directory mail:/var/tmp.root/cvs-serv841
Modified Files:
libdha.c libdha.h pci.c
Log Message:
sync with mplayerxp
Index: libdha.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/libdha.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- libdha.c 4 Mar 2002 19:30:02 -0000 1.6
+++ libdha.c 19 Apr 2002 16:33:54 -0000 1.7
@@ -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) ; }
Index: libdha.h
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/libdha.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- libdha.h 2 Feb 2002 12:14:56 -0000 1.6
+++ libdha.h 19 Apr 2002 16:33:54 -0000 1.7
@@ -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
Index: pci.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/pci.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pci.c 20 Jan 2002 12:15:01 -0000 1.8
+++ pci.c 19 Apr 2002 16:33:54 -0000 1.9
@@ -736,4 +736,4 @@
int disable_app_io( void )
{
return disable_os_io();
-}
\ No newline at end of file
+}
More information about the MPlayer-cvslog
mailing list