summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-05-08 18:14:50 +0000
committerStefan Reinauer <stepan@openbios.org>2010-05-08 18:14:50 +0000
commit133887d540620d1c13cf3f3be0fdd46cd7adcff1 (patch)
tree5f130beeb030cb0ec898c4a9be64992986c2d328 /src/arch
parentc53d1f341513cb21d57e39c575553fef61ccab6a (diff)
downloadcoreboot-133887d540620d1c13cf3f3be0fdd46cd7adcff1.tar.xz
wipe some old unused code, this has been cleaned up now.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5532 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
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