Aaron Durbin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36690 )
Change subject: cbfs: remove prepare() callback from struct cbfs_locator ......................................................................
cbfs: remove prepare() callback from struct cbfs_locator
The prepare() callback is no longer utilized in the code. Remove the callback and support for it.
Change-Id: Ic438e5a80850a3df619dbbfdecb522a9dc2c1949 Signed-off-by: Aaron Durbin adurbin@chromium.org --- M src/include/cbfs.h M src/lib/cbfs.c M src/lib/prog_loaders.c 3 files changed, 1 insertion(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/36690/1
diff --git a/src/include/cbfs.h b/src/include/cbfs.h index 85e25b3..540a481 100644 --- a/src/include/cbfs.h +++ b/src/include/cbfs.h @@ -76,16 +76,10 @@ /* Return < 0 on error otherwise props are filled out accordingly. */ int cbfs_boot_region_properties(struct cbfs_props *props);
-/* Allow external logic to take action prior to locating a program - * (stage or payload). */ -void cbfs_prepare_program_locate(void); - /* Object used to identify location of current cbfs to use for cbfs_boot_* - * operations. It's used by cbfs_boot_region_properties() and - * cbfs_prepare_program_locate(). */ + * operations. It's used by cbfs_boot_region_properties(). */ struct cbfs_locator { const char *name; - void (*prepare)(void); /* Returns 0 on successful fill of cbfs properties. */ int (*locate)(struct cbfs_props *props); }; diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 13b5afb..91a9d6a 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -385,16 +385,3 @@
return -1; } - -void cbfs_prepare_program_locate(void) -{ - int i; - - boot_device_init(); - - for (i = 0; i < ARRAY_SIZE(locators); i++) { - if (locators[i]->prepare == NULL) - continue; - locators[i]->prepare(); - } -} diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 72c1de1..7f320d9 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -43,8 +43,6 @@ if (prog_locate_hook(prog)) return -1;
- cbfs_prepare_program_locate(); - if (cbfs_boot_locate(&file, prog_name(prog), NULL)) return -1;