From acf230c2ea3f549f4392a53d5b3f41e3fc7e78a3 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Tue, 30 Mar 2021 16:51:53 +0200 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/51943 Reviewed-by: Sam Lewis Reviewed-by: Angel Pons Reviewed-by: Felix Held Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/mainboard/ti/beaglebone/sd_media.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/mainboard/ti/beaglebone/sd_media.c b/src/mainboard/ti/beaglebone/sd_media.c index 7e04f211dd..f6009be160 100644 --- a/src/mainboard/ti/beaglebone/sd_media.c +++ b/src/mainboard/ti/beaglebone/sd_media.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -92,8 +93,9 @@ static const struct region_device_ops am335x_sd_ops = { extern struct omap_image_headers headers; -static struct mmap_helper_region_device sd_mdev = MMAP_HELPER_REGION_INIT( - &am335x_sd_ops, COREBOOT_IMAGE_OFFSET + sizeof(headers), CONFIG_ROM_SIZE); +static struct mmap_helper_region_device sd_mdev = MMAP_HELPER_DEV_INIT( + &am335x_sd_ops, COREBOOT_IMAGE_OFFSET + sizeof(headers), CONFIG_ROM_SIZE, + &cbfs_cache); static bool init_done = false; @@ -108,13 +110,6 @@ void boot_device_init(void) storage_setup_media(&media, &sd_host.sd_mmc_ctrlr); 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; }