summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-09-27 07:48:05 +0000
committerEric Andersen <andersen@codepoet.org>2001-09-27 07:48:05 +0000
commit78b5c6dad40a526777091ebb1d5b858eaa9a2cc8 (patch)
treeeb2509cbc292c9973ef76458db81955ad792ec7f /libc/sysdeps/linux
parent88a880c205dca334488cbcf09faaf0fdc986b880 (diff)
Sigh. Erik mucks it up again...
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/arm/Makefile2
-rw-r--r--libc/sysdeps/linux/arm/inout_bwl.c (renamed from libc/sysdeps/linux/arm/ioperm.c)42
2 files changed, 1 insertions, 43 deletions
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile
index 482d84497..a27d20856 100644
--- a/libc/sysdeps/linux/arm/Makefile
+++ b/libc/sysdeps/linux/arm/Makefile
@@ -36,7 +36,7 @@ CRT0_OBJ=$(patsubst %.S,%.o, $(CRT0))
SSRC=longjmp.S setjmp.S vfork.S
SOBJS=$(patsubst %.S,%.o, $(SSRC))
-CSRC=ioperm.c
+CSRC=inout_bwl.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
OBJS=$(SOBJS) $(MOBJ) $(COBJS)
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/inout_bwl.c
index bd935600c..583c77965 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/inout_bwl.c
@@ -50,48 +50,6 @@
#define IO_ADDR(port) (IO_BASE + ((port) << IO_SHIFT))
-#define MAX_PORT 0x10000
-int ioperm(unsigned long int from, unsigned long int num, int turn_on)
-{
- /* this test isn't as silly as it may look like; consider overflows! */
- if (from >= MAX_PORT || from + num > MAX_PORT) {
- __set_errno (EINVAL);
- return -1;
- }
-
- if (turn_on)
- {
- int fd;
- unsigned long int base;
-
- fd = open ("/dev/mem", O_RDWR);
- if (fd < 0)
- return -1;
-
- base = (unsigned long int) mmap (0, MAX_PORT << IO_SHIFT,
- PROT_READ | PROT_WRITE,
- MAP_SHARED, fd, IO_BASE);
- close (fd);
- if ((long) base == -1)
- return -1;
- }
-
- return 0;
-}
-
-
-int iopl (unsigned int level)
-{
- if (level > 3) {
- __set_errno (EINVAL);
- return -1;
- }
- if (level) {
- return ioperm (0, MAX_PORT, 1);
- }
- return 0;
-}
-
void outb (unsigned char b, unsigned long int port)
{
*((volatile unsigned char *)(IO_ADDR (port))) = b;