boot: remove cbmem_post_handling()

The cbmem_post_handling() function was implemented by 2
chipsets in order to save memory configuration in flash. Convert
both of these chipsets to use the boot state machine callbacks
to perform the saving of the memory configuration.

Change-Id: I697e5c946281b85a71d8533437802d7913135af3
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/3137
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Aaron Durbin
2013-04-24 17:31:49 -05:00
committed by Ronald G. Minnich
parent 40131cfa46
commit 243aa44b74
8 changed files with 14 additions and 21 deletions

View File

@ -19,6 +19,7 @@
#include <stdint.h>
#include <string.h>
#include <bootstate.h>
#include <console/console.h>
#include <cbfs.h>
#include <ip_checksum.h>
@ -153,7 +154,7 @@ static struct mrc_data_container *find_next_mrc_cache
return mrc_cache;
}
void update_mrc_cache(void)
static void update_mrc_cache(void *unused)
{
printk(BIOS_DEBUG, "Updating MRC cache data.\n");
struct mrc_data_container *current = cbmem_find(CBMEM_ID_MRCDATA);
@ -222,6 +223,11 @@ void update_mrc_cache(void)
flash->write(flash, to_flash_offset(cache),
current->mrc_data_size + sizeof(*current), current);
}
BOOT_STATE_INIT_ENTRIES(mrc_cache_update) = {
BOOT_STATE_INIT_ENTRY(BS_WRITE_TABLES, BS_ON_ENTRY,
update_mrc_cache, NULL),
};
#endif
struct mrc_data_container *find_current_mrc_cache(void)