spl: Remove #ifdefs with BOOTSTAGE
This feature has some helpers in its header file so that its functions resolve to nothing when the feature is disabled. Add a few more and use these to simplify the code. With this there are no more #ifdefs in board_init_r() Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -502,6 +502,20 @@ int bootstage_unstash(const void *base, int size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int _bootstage_stash_default(void)
|
||||
{
|
||||
return bootstage_stash(map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR, 0),
|
||||
CONFIG_BOOTSTAGE_STASH_SIZE);
|
||||
}
|
||||
|
||||
int _bootstage_unstash_default(void)
|
||||
{
|
||||
const void *stash = map_sysmem(CONFIG_BOOTSTAGE_STASH_ADDR,
|
||||
CONFIG_BOOTSTAGE_STASH_SIZE);
|
||||
|
||||
return bootstage_unstash(stash, CONFIG_BOOTSTAGE_STASH_SIZE);
|
||||
}
|
||||
|
||||
int bootstage_get_size(void)
|
||||
{
|
||||
struct bootstage_data *data = gd->bootstage;
|
||||
|
||||
Reference in New Issue
Block a user