aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso/psp_verstage/include/arch/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/picasso/psp_verstage/include/arch/io.h')
-rw-r--r--src/soc/amd/picasso/psp_verstage/include/arch/io.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/soc/amd/picasso/psp_verstage/include/arch/io.h b/src/soc/amd/picasso/psp_verstage/include/arch/io.h
new file mode 100644
index 0000000000..efa128b25c
--- /dev/null
+++ b/src/soc/amd/picasso/psp_verstage/include/arch/io.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __ARCH_IO_H__
+#define __ARCH_IO_H__
+
+#include <stdint.h>
+
+u8 io_read8(u16 reg);
+void io_write8(u16 reg, u8 value);
+
+static inline void outb(uint8_t value, uint16_t port)
+{
+ io_write8(port, value);
+}
+
+static inline uint8_t inb(uint16_t port)
+{
+ return io_read8(port);
+}
+
+#endif