comparison vidix/sysdep/AsmMacros_arm32.h @ 22900:a9e111b88c4a

merged libdha and libvidix, moved all files from libdha to vidix directory
author ben
date Fri, 06 Apr 2007 15:20:49 +0000
parents libdha/sysdep/AsmMacros_arm32.h@2e3262002acb
children 88bed2131f19
comparison
equal deleted inserted replaced
22899:515545f81186 22900:a9e111b88c4a
1 /*
2 This file is based on:
3 $XFree86: xc/programs/Xserver/hw/xfree86/drivers/chips/util/AsmMacros.h,v 1.1 2001/11/16 21:13:34 tsi Exp $
4 Modified for readability by Nick Kurshev
5 */
6
7 #ifndef __ASM_MACROS_ARM32_H
8 #define __ASM_MACROS_ARM32_H
9 unsigned int IOPortBase; /* Memory mapped I/O port area */
10
11 static __inline__ void outb(short port,char val)
12 {
13 if ((unsigned short)port >= 0x400) return;
14 *(volatile unsigned char*)(((unsigned short)(port))+IOPortBase) = val;
15 }
16
17 static __inline__ void outw(short port,short val)
18 {
19 if ((unsigned short)port >= 0x400) return;
20 *(volatile unsigned short*)(((unsigned short)(port))+IOPortBase) = val;
21 }
22
23 static __inline__ void outl(short port,int val)
24 {
25 if ((unsigned short)port >= 0x400) return;
26 *(volatile unsigned long*)(((unsigned short)(port))+IOPortBase) = val;
27 }
28
29 static __inline__ unsigned int inb(short port)
30 {
31 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
32 return(*(volatile unsigned char*)(((unsigned short)(port))+IOPortBase));
33 }
34
35 static __inline__ unsigned int inw(short port)
36 {
37 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
38 return(*(volatile unsigned short*)(((unsigned short)(port))+IOPortBase));
39 }
40
41 static __inline__ unsigned int inl(short port)
42 {
43 if ((unsigned short)port >= 0x400) return((unsigned int)-1);
44 return(*(volatile unsigned long*)(((unsigned short)(port))+IOPortBase));
45 }
46
47 #define intr_disable()
48 #define intr_enable()
49
50 #endif