From 4da487eae8858dc132d60b7ffb0015e9c96b0df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Thu, 19 Mar 2015 06:58:15 +0200 Subject: CBMEM: Add LATE_CBMEM_INIT guards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our target is to get rid of backup_top_of_ram() and get_top_of_ram() entirely so only declare these with LATE_CBMEM_INIT=y. Change-Id: I54f549fe774996f4d803f9ec527e0fac46f6576f Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/8749 Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson --- src/southbridge/amd/cimx/sb700/lpc.c | 3 +++ src/southbridge/amd/cimx/sb800/ramtop.c | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'src/southbridge/amd/cimx') diff --git a/src/southbridge/amd/cimx/sb700/lpc.c b/src/southbridge/amd/cimx/sb700/lpc.c index 75a3fb97da..f730e286cc 100644 --- a/src/southbridge/amd/cimx/sb700/lpc.c +++ b/src/southbridge/amd/cimx/sb700/lpc.c @@ -24,6 +24,8 @@ #include /* printk */ #include +#if IS_ENABLED(CONFIG_LATE_CBMEM_INIT) + #define BIOSRAM_INDEX 0xcd4 #define BIOSRAM_DATA 0xcd5 @@ -37,6 +39,7 @@ void backup_top_of_ram(uint64_t ramtop) nvram_pos++; } } +#endif void lpc_read_resources(device_t dev) { diff --git a/src/southbridge/amd/cimx/sb800/ramtop.c b/src/southbridge/amd/cimx/sb800/ramtop.c index 7e9abaeced..0d811ab72c 100644 --- a/src/southbridge/amd/cimx/sb800/ramtop.c +++ b/src/southbridge/amd/cimx/sb800/ramtop.c @@ -30,6 +30,8 @@ int acpi_get_sleep_type(void) return (int)tmp; } +#if IS_ENABLED(CONFIG_LATE_CBMEM_INIT) + #ifndef __PRE_RAM__ void backup_top_of_ram(uint64_t ramtop) { @@ -57,3 +59,5 @@ unsigned long get_top_of_ram(void) } return (unsigned long) xdata; } + +#endif -- cgit v1.2.3