[coreboot] [commit] r5532 - trunk/src/arch/i386/include/arch
repository service
svn at coreboot.org
Sat May 8 20:14:50 CEST 2010
Author: stepan
Date: Sat May 8 20:14:50 2010
New Revision: 5532
URL: https://tracker.coreboot.org/trac/coreboot/changeset/5532
Log:
wipe some old unused code, this has been cleaned up now.
Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Modified:
trunk/src/arch/i386/include/arch/io.h
trunk/src/arch/i386/include/arch/romcc_io.h
Modified: trunk/src/arch/i386/include/arch/io.h
==============================================================================
--- trunk/src/arch/i386/include/arch/io.h Sat May 8 19:15:36 2010 (r5531)
+++ trunk/src/arch/i386/include/arch/io.h Sat May 8 20:14:50 2010 (r5532)
@@ -134,47 +134,6 @@
);
}
-#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 @@
{
*((volatile uint32_t *)(addr)) = value;
}
-#endif
#endif
Modified: trunk/src/arch/i386/include/arch/romcc_io.h
==============================================================================
--- trunk/src/arch/i386/include/arch/romcc_io.h Sat May 8 19:15:36 2010 (r5531)
+++ trunk/src/arch/i386/include/arch/romcc_io.h Sat May 8 20:14:50 2010 (r5532)
@@ -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
More information about the coreboot
mailing list