summaryrefslogtreecommitdiffstats
path: root/hw/collie.c
diff options
context:
space:
mode:
authorAnthony Liguori2011-08-25 21:39:18 +0200
committerAnthony Liguori2011-08-25 21:39:18 +0200
commit01e0451a08e0afb9af04783c320d70084cf4e574 (patch)
tree30dbbf868845acd99099c7165769f1762fa40e28 /hw/collie.c
parentvga: Silence bogus gcc warning about uninitialized variables (diff)
downloadqemu-01e0451a08e0afb9af04783c320d70084cf4e574.tar.gz
qemu-01e0451a08e0afb9af04783c320d70084cf4e574.tar.xz
qemu-01e0451a08e0afb9af04783c320d70084cf4e574.zip
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversing changes made to 444dc48298c480e42e15a8fe676be737d8a6b2a1. From Avi: Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this out - it isn't trivial. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/collie.c')
-rw-r--r--hw/collie.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/hw/collie.c b/hw/collie.c
index 0b955e04f1..156404d9f3 100644
--- a/hw/collie.c
+++ b/hw/collie.c
@@ -26,7 +26,7 @@ static void collie_init(ram_addr_t ram_size,
{
StrongARMState *s;
DriveInfo *dinfo;
- MemoryRegion *phys_flash = g_new(MemoryRegion, 2);
+ ram_addr_t phys_flash;
if (!cpu_model) {
cpu_model = "sa1110";
@@ -34,19 +34,17 @@ static void collie_init(ram_addr_t ram_size,
s = sa1110_init(collie_binfo.ram_size, cpu_model);
- memory_region_init_rom_device(&phys_flash[0], &pflash_cfi01_ops_le,
- NULL, "collie.fl1", 0x02000000);
+ phys_flash = qemu_ram_alloc(NULL, "collie.fl1", 0x02000000);
dinfo = drive_get(IF_PFLASH, 0, 0);
- pflash_cfi01_register(SA_CS0, &phys_flash[0],
+ pflash_cfi01_register(SA_CS0, phys_flash,
dinfo ? dinfo->bdrv : NULL, (64 * 1024),
- 512, 4, 0x00, 0x00, 0x00, 0x00);
+ 512, 4, 0x00, 0x00, 0x00, 0x00, 0);
- memory_region_init_rom_device(&phys_flash[1], &pflash_cfi01_ops_le,
- NULL, "collie.fl2", 0x02000000);
+ phys_flash = qemu_ram_alloc(NULL, "collie.fl2", 0x02000000);
dinfo = drive_get(IF_PFLASH, 0, 1);
- pflash_cfi01_register(SA_CS1, &phys_flash[1],
+ pflash_cfi01_register(SA_CS1, phys_flash,
dinfo ? dinfo->bdrv : NULL, (64 * 1024),
- 512, 4, 0x00, 0x00, 0x00, 0x00);
+ 512, 4, 0x00, 0x00, 0x00, 0x00, 0);
sysbus_create_simple("scoop", 0x40800000, NULL);