aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/common
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-09-02 17:34:04 -0500
committerAaron Durbin <adurbin@chromium.org>2015-09-04 21:01:58 +0000
commit4d3de7e328fd92498fd7cf149a0aa887e33f8dfd (patch)
treeee9d7e90560ce453a801eb09f2c02a5b5c86a50b /src/soc/intel/common
parentc6a177d50064a22215c8f682e1d16043d5470fa8 (diff)
bootstate: remove need for #ifdef ENV_RAMSTAGE
The BOOT_STATE_INIT_ENTRY macro can only be used in ramstage, however the current state of the header meant bad build errors in non-ramstage. Therefore, people had to #ifdef in the source. Remove that requirement. Change-Id: I8755fc68bbaca6b72fbe8b4db4bcc1ccb35622bd Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11492 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/intel/common')
-rw-r--r--src/soc/intel/common/mrc_cache.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/soc/intel/common/mrc_cache.c b/src/soc/intel/common/mrc_cache.c
index 9a066d533f..e5e6b6a142 100644
--- a/src/soc/intel/common/mrc_cache.c
+++ b/src/soc/intel/common/mrc_cache.c
@@ -18,11 +18,13 @@
*/
#include <string.h>
+#include <bootstate.h>
#include <console/console.h>
#include <cbmem.h>
#include <fmap.h>
#include <ip_checksum.h>
#include "mrc_cache.h"
+#include "nvm.h"
#define MRC_DATA_ALIGN 0x1000
#define MRC_DATA_SIGNATURE (('M'<<0)|('R'<<8)|('C'<<16)|('D'<<24))
@@ -154,12 +156,6 @@ int mrc_cache_get_current(const struct mrc_saved_data **cache)
return __mrc_cache_get_current(&region, cache);
}
-#if ENV_ROMSTAGE
-
-/*
- * romstage code
- */
-
/* Fill in mrc_saved_data structure with payload. */
static void mrc_cache_fill(struct mrc_saved_data *cache, void *data,
size_t size)
@@ -197,15 +193,6 @@ int mrc_cache_stash_data(void *data, size_t size)
return 0;
}
-#else
-
-/*
- * ramstage code
- */
-
-#include <bootstate.h>
-#include "nvm.h"
-
static int mrc_slot_valid(const struct mrc_data_region *region,
const struct mrc_saved_data *slot,
const struct mrc_saved_data *to_save)
@@ -330,5 +317,3 @@ static void update_mrc_cache(void *unused)
}
BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY, update_mrc_cache, NULL);
-
-#endif /* ENV_ROMSTAGE */