From 133887d540620d1c13cf3f3be0fdd46cd7adcff1 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 8 May 2010 18:14:50 +0000 Subject: wipe some old unused code, this has been cleaned up now. Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5532 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/include/arch/io.h | 42 ----------------------------------- src/arch/i386/include/arch/romcc_io.h | 34 +++------------------------- 2 files changed, 3 insertions(+), 73 deletions(-) (limited to 'src/arch') 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 -#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 #if CONFIG_MMCONF_SUPPORT -- cgit v1.2.3