diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-25 14:39:18 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-08-25 14:39:18 -0500 |
commit | 01e0451a08e0afb9af04783c320d70084cf4e574 (patch) | |
tree | 30dbbf868845acd99099c7165769f1762fa40e28 /hw/gumstix.c | |
parent | f065aa0a005ac539bf8ca556775e5cc4c3d2d3b7 (diff) |
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/gumstix.c')
-rw-r--r-- | hw/gumstix.c | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/hw/gumstix.c b/hw/gumstix.c index d3a4bb4c67..853f7e1ee8 100644 --- a/hw/gumstix.c +++ b/hw/gumstix.c @@ -48,8 +48,7 @@ static void connex_init(ram_addr_t ram_size, { PXA2xxState *cpu; DriveInfo *dinfo; - const MemoryRegionOps *flash_ops; - MemoryRegion *flash = g_new(MemoryRegion, 1); + int be; uint32_t connex_rom = 0x01000000; uint32_t connex_ram = 0x04000000; @@ -64,15 +63,14 @@ static void connex_init(ram_addr_t ram_size, } #ifdef TARGET_WORDS_BIGENDIAN - flash_ops = &pflash_cfi01_ops_be; + be = 1; #else - flash_ops = &pflash_cfi01_ops_le; + be = 0; #endif - memory_region_init_rom_device(flash, flash_ops, - NULL, "connext.rom", connex_rom); - if (!pflash_cfi01_register(0x00000000, flash, + if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(NULL, "connext.rom", + connex_rom), dinfo->bdrv, sector_len, connex_rom / sector_len, - 2, 0, 0, 0, 0)) { + 2, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); exit(1); } @@ -89,8 +87,7 @@ static void verdex_init(ram_addr_t ram_size, { PXA2xxState *cpu; DriveInfo *dinfo; - MemoryRegion *flash = g_new(MemoryRegion, 1); - const MemoryRegionOps *flash_ops; + int be; uint32_t verdex_rom = 0x02000000; uint32_t verdex_ram = 0x10000000; @@ -105,15 +102,14 @@ static void verdex_init(ram_addr_t ram_size, } #ifdef TARGET_WORDS_BIGENDIAN - flash_ops = &pflash_cfi01_ops_be; + be = 1; #else - flash_ops = &pflash_cfi01_ops_le; + be = 0; #endif - memory_region_init_rom_device(flash, flash_ops, - NULL, "verdex.rom", verdex_rom); - if (!pflash_cfi01_register(0x00000000, flash, + if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(NULL, "verdex.rom", + verdex_rom), dinfo->bdrv, sector_len, verdex_rom / sector_len, - 2, 0, 0, 0, 0)) { + 2, 0, 0, 0, 0, be)) { fprintf(stderr, "qemu: Error registering flash memory.\n"); exit(1); } |