summaryrefslogtreecommitdiffstats
path: root/hw/gumstix.c
diff options
context:
space:
mode:
authorAvi Kivity2011-08-04 14:55:30 +0200
committerAvi Kivity2011-09-04 16:46:51 +0200
commitcfe5f011042456ad6ebd815f5ce4177befedd79a (patch)
tree9f5620f326451109ea9f43d27a8eb98d1f24541a /hw/gumstix.c
parentMakefile.hw: allow hw/ files to include glib headers (diff)
downloadqemu-cfe5f011042456ad6ebd815f5ce4177befedd79a.tar.gz
qemu-cfe5f011042456ad6ebd815f5ce4177befedd79a.tar.xz
qemu-cfe5f011042456ad6ebd815f5ce4177befedd79a.zip
pflash_cfi01/pflash_cfi02: convert to memory API
cfi02 is annoying in that is ignores some address bits; we probably want explicit support in the memory API for that. In order to get the correct opaque into the MemoryRegion object, the allocation scheme is changed so that the flash emulation code allocates memory, instead of the caller. This clears a FIXME in the flash code. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/gumstix.c')
-rw-r--r--hw/gumstix.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/gumstix.c b/hw/gumstix.c
index 853f7e1ee8..b8b76f4b87 100644
--- a/hw/gumstix.c
+++ b/hw/gumstix.c
@@ -67,8 +67,7 @@ static void connex_init(ram_addr_t ram_size,
#else
be = 0;
#endif
- if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(NULL, "connext.rom",
- connex_rom),
+ if (!pflash_cfi01_register(0x00000000, NULL, "connext.rom", connex_rom,
dinfo->bdrv, sector_len, connex_rom / sector_len,
2, 0, 0, 0, 0, be)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");
@@ -106,8 +105,7 @@ static void verdex_init(ram_addr_t ram_size,
#else
be = 0;
#endif
- if (!pflash_cfi01_register(0x00000000, qemu_ram_alloc(NULL, "verdex.rom",
- verdex_rom),
+ if (!pflash_cfi01_register(0x00000000, NULL, "verdex.rom", verdex_rom,
dinfo->bdrv, sector_len, verdex_rom / sector_len,
2, 0, 0, 0, 0, be)) {
fprintf(stderr, "qemu: Error registering flash memory.\n");