summaryrefslogtreecommitdiff
path: root/hwaccess.h
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-03-16 23:59:19 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2010-03-16 23:59:19 +0000
commit1f5e4543ddc2130f2a85ecbbf2c4aa6249010060 (patch)
treef920353a2683cc9bc4ad6954d95400c6c923629d /hwaccess.h
parentd3b06d7808cfc109c3950fb916dc0d5a71ee57d4 (diff)
downloadflashrom-1f5e4543ddc2130f2a85ecbbf2c4aa6249010060.tar.gz
Add MS-DOS crosscompilation support to flashrom. Tested, works fine.
Part 1: Code changes. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@944 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'hwaccess.h')
-rw-r--r--hwaccess.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/hwaccess.h b/hwaccess.h
index 06817ab..7a76925 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -68,12 +68,30 @@
#define INW inw
#define INL inl
#else
+
+#ifdef __DJGPP__
+
+#include <pc.h>
+
+ #define OUTB(x,y) outportb(y, x)
+ #define OUTW(x,y) outportw(y, x)
+ #define OUTL(x,y) outportl(y, x)
+
+ #define INB inportb
+ #define INW inportw
+ #define INL inportl
+
+#else
+
#define OUTB outb
#define OUTW outw
#define OUTL outl
#define INB inb
#define INW inw
#define INL inl
+
+#endif
+
#endif
#endif