Mercurial > ecos
diff packages/hal/i386/pc/current/include/plf_misc.h @ 161:ac086aa3217e
Merge from eCos master repository on 2001-06-08-21:11:51-BST
| author | jlarmour |
|---|---|
| date | Sun, 10 Jun 2001 19:35:23 +0000 |
| parents | 435cced73e2f |
| children | 977a23cdabeb |
line wrap: on
line diff
--- a/packages/hal/i386/pc/current/include/plf_misc.h +++ b/packages/hal/i386/pc/current/include/plf_misc.h @@ -1,3 +1,6 @@ +#ifndef CYGONCE_PLF_MISC_H +#define CYGONCE_PLF_MISC_H + //========================================================================== // // plf_misc.h @@ -62,87 +65,8 @@ extern void patch_dbg_syscalls(void * ve void hal_platform_init(void) ; -#if 0 -static __inline__ int pc_outb(int port, int value) -{ - asm(" - movl %0, %%eax - movl %1, %%edx - outb %%al, %%dx - " - : /* No outputs. */ - : "g" (value), "g" (port) - : "eax", "edx" - ); - - return value ; -} - - -static __inline__ int pc_inb(int port) -{ int r ; - - asm(" - movl %1, %%edx - inb %%dx, %%al - cbtw - cwtl - movl %%eax, %0 - " - : "=g" (r) - : "g" (port) - : "eax", "edx" - ); - - return r ; -} - - -static __inline__ int pc_outw(int port, int value) -{ - asm(" - movl %0, %%eax - movl %1, %%edx - outw %%ax, %%dx - " - : /* No outputs. */ - : "g" (value), "g" (port) - : "eax", "edx" - ); - - return value ; -} - - -static __inline__ int pc_inw(int port) -{ int r ; - - asm(" - movl %1, %%edx - inw %%dx, %%ax - cwtl - movl %%eax, %0 - " - : "=g" (r) - : "g" (port) - : "eax", "edx" - ); - - return r ; -} - -#else - -int pc_outb(int port, int value) ; -int pc_inb(int port) ; -int pc_outw(int port, int value) ; -int pc_inw(int port) ; - -#endif - - void hal_pc_reset(void) ; - /*------------------------------------------------------------------------*/ /* End of plf_misc.h */ +#endif //CYGONCE_PLF_MISC_H
