aboutsummaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/include/arch/io.h42
-rw-r--r--src/arch/i386/include/arch/romcc_io.h34
2 files changed, 3 insertions, 73 deletions
diff --git a/src/arch/i386/include/arch/io.h b/src/arch/i386/include/arch/io.h
index dd8d647380..aad84088d6 100644
--- a/src/arch/i386/include/arch/io.h
+++ b/src/arch/i386/include/arch/io.h
@@ -134,47 +134,6 @@ static inline void insl(uint16_t port, void *addr, unsigned long count)
);
}
-#if 0
-/* XXX XXX XXX This is a story from the evil API from hell XXX XXX XXX
- * We have different functions for memory access in pre-ram stage and ram
- * stage. Those in pre-ram stage are called write32 and expect the address
- * first and the address as a pointer type. Those in ram stage are called
- * writel and expect the datum first and the address as an integer type.
- * Until all code is checked and fixed, I'll add both versions here now.
- */
-
-static inline void writeb(uint8_t b, volatile void *addr)
-{
- *(volatile uint8_t *) addr = b;
-}
-
-static inline void writew(uint16_t b, volatile void *addr)
-{
- *(volatile uint16_t *) addr = b;
-}
-
-static inline void writel(uint32_t b, volatile void *addr)
-{
- *(volatile uint32_t *) addr = b;
-}
-
-static inline uint8_t readb(const volatile void *addr)
-{
- return *(volatile uint8_t *) addr;
-}
-
-static inline uint16_t readw(const volatile void *addr)
-{
- return *(volatile uint16_t *) addr;
-}
-
-static inline uint32_t readl(const volatile void *addr)
-{
- return *(volatile uint32_t *) addr;
-}
-#endif
-
-#if !defined(__PRE_RAM__)
static inline __attribute__((always_inline)) uint8_t read8(unsigned long addr)
{
return *((volatile uint8_t *)(addr));
@@ -204,7 +163,6 @@ static inline __attribute__((always_inline)) void write32(unsigned long addr, ui
{
*((volatile uint32_t *)(addr)) = value;
}
-#endif
#endif
diff --git a/src/arch/i386/include/arch/romcc_io.h b/src/arch/i386/include/arch/romcc_io.h
index f1466273d8..6bc7dfc179 100644
--- a/src/arch/i386/include/arch/romcc_io.h
+++ b/src/arch/i386/include/arch/romcc_io.h
@@ -3,37 +3,9 @@
#include <stdint.h>
-#ifdef __PRE_RAM__
-static inline __attribute__((always_inline)) uint8_t read8(unsigned long addr)
-{
- return *((volatile uint8_t *)(addr));
-}
-
-static inline __attribute__((always_inline)) uint16_t read16(unsigned long addr)
-{
- return *((volatile uint16_t *)(addr));
-}
-
-static inline __attribute__((always_inline)) uint32_t read32(unsigned long addr)
-{
- return *((volatile uint32_t *)(addr));
-}
-
-static inline __attribute__((always_inline)) void write8(unsigned long addr, uint8_t value)
-{
- *((volatile uint8_t *)(addr)) = value;
-}
-
-static inline __attribute__((always_inline)) void write16(unsigned long addr, uint16_t value)
-{
- *((volatile uint16_t *)(addr)) = value;
-}
-
-static inline __attribute__((always_inline)) void write32(unsigned long addr, uint32_t value)
-{
- *((volatile uint32_t *)(addr)) = value;
-}
-#endif
+// arch/io.h is pulled in in many places but it could
+// also be pulled in here for all romcc/romstage code.
+// #include <arch/io.h>
#if CONFIG_MMCONF_SUPPORT