]> git.proxmox.com Git - mirror_qemu.git/commitdiff
pflash_cfi0x: remove unused base field
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>
Tue, 30 Oct 2012 07:45:11 +0000 (07:45 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 30 Oct 2012 07:45:11 +0000 (07:45 +0000)
This field is completely unused. The base address should also be abstracted
away from the device anyway. Removed.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/pflash_cfi01.c
hw/pflash_cfi02.c

index 5e3a409c2b40bc7b455909626d1b782a936fa9dc..2e29f8a38aafc3c2b2f0a6e5971c4856d0fdbb1f 100644 (file)
@@ -61,7 +61,6 @@ do {                                               \
 
 struct pflash_t {
     BlockDriverState *bs;
-    hwaddr base;
     hwaddr sector_len;
     hwaddr total_len;
     int width;
@@ -594,7 +593,6 @@ pflash_t *pflash_cfi01_register(hwaddr base,
     }
 
     pfl->timer = qemu_new_timer_ns(vm_clock, pflash_timer, pfl);
-    pfl->base = base;
     pfl->sector_len = sector_len;
     pfl->total_len = total_len;
     pfl->width = width;
index 9f94c0623d107e0d28da258f49288f000eacc2f5..083718bad3b6285a21b3a1b10b67d9ba1f54a0bb 100644 (file)
@@ -56,7 +56,6 @@ do {                                               \
 
 struct pflash_t {
     BlockDriverState *bs;
-    hwaddr base;
     uint32_t sector_len;
     uint32_t chip_len;
     int mappings;
@@ -602,7 +601,6 @@ pflash_t *pflash_cfi02_register(hwaddr base,
         name, size);
     vmstate_register_ram(&pfl->orig_mem, qdev);
     pfl->storage = memory_region_get_ram_ptr(&pfl->orig_mem);
-    pfl->base = base;
     pfl->chip_len = chip_len;
     pfl->mappings = nb_mappings;
     pfl->bs = bs;
@@ -618,7 +616,7 @@ pflash_t *pflash_cfi02_register(hwaddr base,
 
     pflash_setup_mappings(pfl);
     pfl->rom_mode = 1;
-    memory_region_add_subregion(get_system_memory(), pfl->base, &pfl->mem);
+    memory_region_add_subregion(get_system_memory(), base, &pfl->mem);
 
     if (pfl->bs) {
         pfl->ro = bdrv_is_read_only(pfl->bs);