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
This commit is contained in:
Stefan Reinauer 2010-05-08 18:14:50 +00:00 committed by Stefan Reinauer
parent c53d1f3415
commit 133887d540
2 changed files with 3 additions and 73 deletions

View File

@ -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) static inline __attribute__((always_inline)) uint8_t read8(unsigned long addr)
{ {
return *((volatile uint8_t *)(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; *((volatile uint32_t *)(addr)) = value;
} }
#endif
#endif #endif

View File

@ -3,37 +3,9 @@
#include <stdint.h> #include <stdint.h>
#ifdef __PRE_RAM__ // arch/io.h is pulled in in many places but it could
static inline __attribute__((always_inline)) uint8_t read8(unsigned long addr) // also be pulled in here for all romcc/romstage code.
{ // #include <arch/io.h>
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
#if CONFIG_MMCONF_SUPPORT #if CONFIG_MMCONF_SUPPORT