summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorAntonello Dettori <dev@dettori.io>2016-06-22 21:09:08 +0200
committerMartin Roth <martinroth@google.com>2016-06-24 20:48:12 +0200
commite5f48d20e7d66471f182afe305fe073177722224 (patch)
treef4a28f1a43ca733aca74d79ee7cff4787dd1b9c1 /src/soc
parent5992afa57db4921f341bfdeb4bc796dfa6d0ae0e (diff)
region: Add writeat and eraseat support
Implement writeat and eraseat support into the region_device_ops struct. Change-Id: Iac2cf32e523d2f19ee9e5feefe1fba8c68982f3d Signed-off-by: Antonello Dettori <dev@dettori.io> Reviewed-on: https://review.coreboot.org/15318 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/apollolake/mmap_boot.c4
-rw-r--r--src/soc/samsung/exynos5250/alternate_cbfs.c6
-rw-r--r--src/soc/samsung/exynos5420/alternate_cbfs.c6
3 files changed, 10 insertions, 6 deletions
diff --git a/src/soc/intel/apollolake/mmap_boot.c b/src/soc/intel/apollolake/mmap_boot.c
index d434cfacda..bf2e5b95b4 100644
--- a/src/soc/intel/apollolake/mmap_boot.c
+++ b/src/soc/intel/apollolake/mmap_boot.c
@@ -102,10 +102,10 @@ static void bios_mmap_init(void)
shadow_dev_ptr = car_get_var_ptr(&shadow_dev);
real_dev_ptr = car_get_var_ptr(&real_dev);
- mem_region_device_init(shadow_dev_ptr, (void *)base,
+ mem_region_device_ro_init(shadow_dev_ptr, (void *)base,
bios_mapped_size);
- xlate_region_device_init(real_dev_ptr, &shadow_dev_ptr->rdev,
+ xlate_region_device_ro_init(real_dev_ptr, &shadow_dev_ptr->rdev,
start, bios_mapped_size,
CONFIG_ROM_SIZE);
diff --git a/src/soc/samsung/exynos5250/alternate_cbfs.c b/src/soc/samsung/exynos5250/alternate_cbfs.c
index 2e290c82c4..a3431e28fd 100644
--- a/src/soc/samsung/exynos5250/alternate_cbfs.c
+++ b/src/soc/samsung/exynos5250/alternate_cbfs.c
@@ -108,7 +108,8 @@ static int sdmmc_cbfs_open(void)
return 0;
}
-static struct mem_region_device alternate_rdev = MEM_REGION_DEV_INIT(NULL, 0);
+static struct mem_region_device alternate_rdev =
+ MEM_REGION_DEV_RO_INIT(NULL, 0);
const struct region_device *boot_device_ro(void)
{
@@ -129,7 +130,8 @@ const struct region_device *boot_device_ro(void)
void boot_device_init(void)
{
- mem_region_device_init(&alternate_rdev, _cbfs_cache, _cbfs_cache_size);
+ mem_region_device_ro_init(&alternate_rdev, _cbfs_cache,
+ _cbfs_cache_size);
if (*iram_secondary_base == SECONDARY_BASE_BOOT_USB) {
printk(BIOS_DEBUG, "Using Exynos alternate boot mode USB A-A\n");
diff --git a/src/soc/samsung/exynos5420/alternate_cbfs.c b/src/soc/samsung/exynos5420/alternate_cbfs.c
index 20fc317fce..3a40154c11 100644
--- a/src/soc/samsung/exynos5420/alternate_cbfs.c
+++ b/src/soc/samsung/exynos5420/alternate_cbfs.c
@@ -115,7 +115,8 @@ static int sdmmc_cbfs_open(void)
return 0;
}
-static struct mem_region_device alternate_rdev = MEM_REGION_DEV_INIT(NULL, 0);
+static struct mem_region_device alternate_rdev =
+ MEM_REGION_DEV_RO_INIT(NULL, 0);
const struct region_device *boot_device_ro(void)
{
@@ -136,7 +137,8 @@ const struct region_device *boot_device_ro(void)
void boot_device_init(void)
{
- mem_region_device_init(&alternate_rdev, _cbfs_cache, _cbfs_cache_size);
+ mem_region_device_ro_init(&alternate_rdev, _cbfs_cache,
+ _cbfs_cache_size);
if (*iram_secondary_base == SECONDARY_BASE_BOOT_USB) {
printk(BIOS_DEBUG, "Using Exynos alternate boot mode USB A-A\n");