mb/ti/beaglebone: Fix MMAP_HELPER API usage

This replays the changes made in commit 9b1f3cc6fb (cbfs: Pull
handling of the CBFS_CACHE mem_pool into CBFS core) for the latest
work on the BeagleBone port. I hope it's the right thing to do.

Fixes: Makes `master` compile again.

Change-Id: Ia51c66dbe425a662ea2a6b2527b2b6982f587891
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51943
Reviewed-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Nico Huber 2021-03-30 16:51:53 +02:00 committed by Felix Held
parent 6b0ebee63e
commit acf230c2ea
1 changed files with 4 additions and 9 deletions

View File

@ -6,6 +6,7 @@
#include <assert.h> #include <assert.h>
#include <commonlib/storage/sd_mmc.h> #include <commonlib/storage/sd_mmc.h>
#include <cbmem.h> #include <cbmem.h>
#include <cbfs.h>
#include <soc/ti/am335x/mmc.h> #include <soc/ti/am335x/mmc.h>
#include <soc/ti/am335x/header.h> #include <soc/ti/am335x/header.h>
@ -92,8 +93,9 @@ static const struct region_device_ops am335x_sd_ops = {
extern struct omap_image_headers headers; extern struct omap_image_headers headers;
static struct mmap_helper_region_device sd_mdev = MMAP_HELPER_REGION_INIT( static struct mmap_helper_region_device sd_mdev = MMAP_HELPER_DEV_INIT(
&am335x_sd_ops, COREBOOT_IMAGE_OFFSET + sizeof(headers), CONFIG_ROM_SIZE); &am335x_sd_ops, COREBOOT_IMAGE_OFFSET + sizeof(headers), CONFIG_ROM_SIZE,
&cbfs_cache);
static bool init_done = false; static bool init_done = false;
@ -108,13 +110,6 @@ void boot_device_init(void)
storage_setup_media(&media, &sd_host.sd_mmc_ctrlr); storage_setup_media(&media, &sd_host.sd_mmc_ctrlr);
storage_display_setup(&media); storage_display_setup(&media);
if (ENV_BOOTBLOCK) {
mmap_helper_device_init(&sd_mdev, _cbfs_cache, REGION_SIZE(cbfs_cache));
} else {
mmap_helper_device_init(&sd_mdev, _postram_cbfs_cache,
REGION_SIZE(postram_cbfs_cache));
}
init_done = true; init_done = true;
} }