summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/io.h
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-08-30 12:37:38 +0000
committerJoursoir <chat@joursoir.net>2021-08-30 12:37:38 +0000
commita4d749210d4a628552717e9d3fe3ebf7ed84f1f0 (patch)
tree57bae5d3b1b5d9092309f9e3efa307028960a6a3 /arch/x86/include/asm/io.h
parentd206791e894510d04adf6b24d6da729ca85604e7 (diff)
downloadmfsos-a4d749210d4a628552717e9d3fe3ebf7ed84f1f0.tar.gz
mfsos-a4d749210d4a628552717e9d3fe3ebf7ed84f1f0.tar.bz2
mfsos-a4d749210d4a628552717e9d3fe3ebf7ed84f1f0.zip
move the arch specific code for port IO to the correct place
Diffstat (limited to 'arch/x86/include/asm/io.h')
-rw-r--r--arch/x86/include/asm/io.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
new file mode 100644
index 0000000..02009d5
--- /dev/null
+++ b/arch/x86/include/asm/io.h
@@ -0,0 +1,15 @@
+#ifndef ASM_X86_IO_H
+#define ASM_X86_IO_H
+
+#include <stdint.h>
+
+static inline void outb(uint16_t port, uint8_t data)
+{
+ asm volatile (
+ "out %0,%1"
+ : /* no output */
+ : "a" (data), "d" (port)
+ );
+}
+
+#endif /* ASM_X86_IO_H */