cbmem: use boot state machine
There were previously 2 functions, init_cbmem_pre_device() and init_cbmem_post_device(), where the 2 cbmem implementations implemented one or the other. These 2 functions are no longer needed to be called in the boot flow once the boot state callbacks are utilized. Change-Id: Ida71f1187bdcc640ae600705ddb3517e1410a80d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/3136 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Ronald G. Minnich
parent
4dd87fb2d8
commit
40131cfa46
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <string.h>
|
||||
#include <bootstate.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#if CONFIG_HAVE_ACPI_RESUME && !defined(__PRE_RAM__)
|
||||
@@ -232,11 +233,7 @@ int cbmem_initialize(void)
|
||||
#endif
|
||||
|
||||
#ifndef __PRE_RAM__
|
||||
/* cbmem cannot be initialized before device drivers, but it can be initialized
|
||||
* after the drivers have run. */
|
||||
void init_cbmem_pre_device(void) {}
|
||||
|
||||
void init_cbmem_post_device(void)
|
||||
static void init_cbmem_post_device(void *unused)
|
||||
{
|
||||
cbmem_initialize();
|
||||
#if CONFIG_CONSOLE_CBMEM
|
||||
@@ -244,6 +241,11 @@ void init_cbmem_post_device(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOT_STATE_INIT_ENTRIES(cbmem_bscb) = {
|
||||
BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_ENTRY,
|
||||
init_cbmem_post_device, NULL),
|
||||
};
|
||||
|
||||
void cbmem_list(void)
|
||||
{
|
||||
struct cbmem_entry *cbmem_toc;
|
||||
|
Reference in New Issue
Block a user