4164
|
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
|