summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/emulation/qemu-i440fx/rom_media.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mainboard/emulation/qemu-i440fx/rom_media.c b/src/mainboard/emulation/qemu-i440fx/rom_media.c
index d2469bade2..f4fd3c3775 100644
--- a/src/mainboard/emulation/qemu-i440fx/rom_media.c
+++ b/src/mainboard/emulation/qemu-i440fx/rom_media.c
@@ -97,7 +97,8 @@ static ssize_t qemu_eraseat(const struct region_device *rd, size_t offset,
}
static struct region_device_ops flash_ops;
-static struct mem_region_device boot_dev;
+static const struct mem_region_device boot_dev =
+ MEM_REGION_DEV_INIT(0x100000000ULL - CONFIG_ROM_SIZE, CONFIG_ROM_SIZE, &flash_ops);
/*
* Depending on how firmware image was passed to QEMU, it may behave as:
@@ -133,10 +134,6 @@ void boot_device_init(void)
*/
flash_ops = mem_rdev_rw_ops;
- boot_dev.base = (void *)(uintptr_t)(0x100000000ULL - CONFIG_ROM_SIZE);
- boot_dev.rdev.ops = &flash_ops;
- boot_dev.rdev.region.size = CONFIG_ROM_SIZE;
-
/*
* Find first byte different than any of the commands, simplified.
*