# HG changeset patch # User nick # Date 1011170602 0 # Node ID fb092b45c9ccabddf52a888cb40c3a3486c94844 # Parent 62a6135d090ed830fce3dbad0a27d7139963c766 en(dis)able app io should be exported too diff -r 62a6135d090e -r fb092b45c9cc libdha/libdha.h --- a/libdha/libdha.h Wed Jan 16 08:33:17 2002 +0000 +++ b/libdha/libdha.h Wed Jan 16 08:43:22 2002 +0000 @@ -27,9 +27,9 @@ typedef struct pciinfo_s { - int bus,card,func ; /* PCI/AGP bus:card:func */ - unsigned short vendor,device ; /* Card vendor+device ID */ - unsigned base0,base1,base2,baserom ; /* Memory and I/O base addresses */ + int bus,card,func; /* PCI/AGP bus:card:func */ + unsigned short vendor,device; /* Card vendor+device ID */ + unsigned base0,base1,base2,baserom; /* Memory and I/O base addresses */ }pciinfo_t; /* needed for mga_vid */ @@ -40,6 +40,10 @@ extern int pci_scan(pciinfo_t *pci_list,unsigned *num_card); + /* Enables/disables accessing to IO space from application side. + Should return 0 if o'k or errno on error. */ +extern int enable_app_io( void ); +extern int disable_app_io( void ); extern unsigned char INPORT8(unsigned idx); extern unsigned short INPORT16(unsigned idx); diff -r 62a6135d090e -r fb092b45c9cc libdha/pci.c --- a/libdha/pci.c Wed Jan 16 08:33:17 2002 +0000 +++ b/libdha/pci.c Wed Jan 16 08:43:22 2002 +0000 @@ -720,3 +720,13 @@ return(0); } + +int enable_app_io( void ) +{ + return enable_os_io(); +} + +int disable_app_io( void ) +{ + return disable_os_io(); +} \ No newline at end of file