summaryrefslogtreecommitdiff
path: root/src/lib/cbmem.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2009-11-06 17:02:51 +0000
committerMyles Watson <mylesgw@gmail.com>2009-11-06 17:02:51 +0000
commit1d6d45e3c98e16cbb86915483f771a7bf0e9a633 (patch)
tree38eca17371ca6c9e47b0b403d016eb163327b01b /src/lib/cbmem.c
parent637309d65e6448d34cc92d44f92a93324c154e79 (diff)
Split the two usages of __ROMCC__:
__ROMCC__ now means "Don't use prototypes, since romcc doesn't support them." __PRE_RAM__ means "Use simpler versions of functions, and no device tree." There are probably some places where both are tested, but only one is needed. Signed-off-by: Myles Watson <mylesgw@gmail.com> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4921 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/lib/cbmem.c')
-rw-r--r--src/lib/cbmem.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c
index 83779a7ee8..023ddeaeb2 100644
--- a/src/lib/cbmem.c
+++ b/src/lib/cbmem.c
@@ -45,7 +45,7 @@ struct cbmem_entry {
u64 size;
} __attribute__((packed));
-#ifndef __ROMCC__
+#ifndef __PRE_RAM__
struct cbmem_entry *bss_cbmem_toc;
#endif
@@ -64,7 +64,7 @@ void cbmem_init(u64 baseaddr, u64 size)
struct cbmem_entry *cbmem_toc;
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
-#ifndef __ROMCC__
+#ifndef __PRE_RAM__
bss_cbmem_toc = cbmem_toc;
#endif
@@ -91,7 +91,7 @@ int cbmem_reinit(u64 baseaddr)
cbmem_toc = (struct cbmem_entry *)(unsigned long)baseaddr;
debug("Re-Initializing CBMEM area to 0x%lx\n", (unsigned long)baseaddr);
-#ifndef __ROMCC__
+#ifndef __PRE_RAM__
bss_cbmem_toc = cbmem_toc;
#endif
@@ -102,7 +102,7 @@ void *cbmem_add(u32 id, u64 size)
{
struct cbmem_entry *cbmem_toc;
int i;
-#ifdef __ROMCC__
+#ifdef __PRE_RAM__
cbmem_toc = (struct cbmem_entry *)(get_top_of_ram() - HIGH_MEMORY_SIZE);
#else
cbmem_toc = bss_cbmem_toc;
@@ -158,7 +158,7 @@ void *cbmem_find(u32 id)
{
struct cbmem_entry *cbmem_toc;
int i;
-#ifdef __ROMCC__
+#ifdef __PRE_RAM__
cbmem_toc = (struct cbmem_entry *)(get_top_of_ram() - HIGH_MEMORY_SIZE);
#else
cbmem_toc = bss_cbmem_toc;
@@ -175,7 +175,7 @@ void *cbmem_find(u32 id)
return (void *)NULL;
}
-#ifndef __ROMCC__
+#ifndef __PRE_RAM__
#if CONFIG_HAVE_ACPI_RESUME
extern u8 acpi_slp_type;
#endif
@@ -199,12 +199,12 @@ void cbmem_initialize(void)
cbmem_arch_init();
}
-#ifndef __ROMCC__
+#ifndef __PRE_RAM__
void cbmem_list(void)
{
struct cbmem_entry *cbmem_toc;
int i;
-#ifdef __ROMCC__
+#ifdef __PRE_RAM__
cbmem_toc = (struct cbmem_entry *)(get_top_of_ram() - HIGH_MEMORY_SIZE);
#else
cbmem_toc = bss_cbmem_toc;