summaryrefslogtreecommitdiffstats
path: root/hw/musicpal.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/musicpal.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/musicpal.c')
-rw-r--r--hw/musicpal.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c
index 63dd391176..ade5a91feb 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -1565,16 +1565,16 @@ static void musicpal_init(ram_addr_t ram_size,
* image is smaller than 32 MB.
*/
#ifdef TARGET_WORDS_BIGENDIAN
- pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, qemu_ram_alloc(NULL,
- "musicpal.flash", flash_size),
+ pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, NULL,
+ "musicpal.flash", flash_size,
dinfo->bdrv, 0x10000,
(flash_size + 0xffff) >> 16,
MP_FLASH_SIZE_MAX / flash_size,
2, 0x00BF, 0x236D, 0x0000, 0x0000,
0x5555, 0x2AAA, 1);
#else
- pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, qemu_ram_alloc(NULL,
- "musicpal.flash", flash_size),
+ pflash_cfi02_register(0-MP_FLASH_SIZE_MAX, NULL,
+ "musicpal.flash", flash_size,
dinfo->bdrv, 0x10000,
(flash_size + 0xffff) >> 16,
MP_FLASH_SIZE_MAX / flash_size,