summaryrefslogtreecommitdiffstats
path: root/hwaccess.c
diff options
context:
space:
mode:
authorRudolf Marek <r.marek@assembler.cz>2010-04-25 22:47:50 +0000
committerRudolf Marek <r.marek@assembler.cz>2010-04-25 22:47:50 +0000
commit837d81079689927b78baa5c606c6d8484ea21a95 (patch)
tree3984257535f8147f22220157a0952834f6760e35 /hwaccess.c
parentce1c798c1ce12873c101d0e3345548db83d2e374 (diff)
downloadast2050-flashrom-837d81079689927b78baa5c606c6d8484ea21a95.zip
ast2050-flashrom-837d81079689927b78baa5c606c6d8484ea21a95.tar.gz
Fix the DOS port
Now the DS selector limit is set to 4GB and all mmio accesses goes through DS, the 1:1 mapping is fixed so the _DS base is taken onto account. Plus is that the hwaccess.c needs no change and memcpy etc can be used on mmaped space. Corresponding to flashrom svn r995. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'hwaccess.c')
-rw-r--r--hwaccess.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/hwaccess.c b/hwaccess.c
index 10e67bd..36ea6f4 100644
--- a/hwaccess.c
+++ b/hwaccess.c
@@ -54,44 +54,6 @@ void release_io_perms(void)
#endif
}
-#ifdef __DJGPP__
-
-extern unsigned short segFS;
-
-#include <sys/farptr.h>
-
-void mmio_writeb(uint8_t val, void *addr)
-{
- _farpokeb(segFS, (unsigned long) addr, val);
-}
-
-void mmio_writew(uint16_t val, void *addr)
-{
- _farpokew(segFS, (unsigned long) addr, val);
-}
-
-void mmio_writel(uint32_t val, void *addr)
-{
- _farpokel(segFS, (unsigned long) addr, val);
-}
-
-uint8_t mmio_readb(void *addr)
-{
- return _farpeekb(segFS, (unsigned long) addr);
-}
-
-uint16_t mmio_readw(void *addr)
-{
- return _farpeekw(segFS, (unsigned long) addr);
-}
-
-uint32_t mmio_readl(void *addr)
-{
- return _farpeekl(segFS, (unsigned long) addr);
-}
-
-#else
-
void mmio_writeb(uint8_t val, void *addr)
{
*(volatile uint8_t *) addr = val;
@@ -121,4 +83,3 @@ uint32_t mmio_readl(void *addr)
{
return *(volatile uint32_t *) addr;
}
-#endif
OpenPOWER on IntegriCloud