hw/misc: Use the IEC binary prefix definitions
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180625124238.25339-16-f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f0353b0d10
commit
de9b602ebd
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qemu/log.h"
|
||||
#include "hw/misc/auxbus.h"
|
||||
#include "hw/i2c/i2c.h"
|
||||
@ -68,7 +69,7 @@ AUXBus *aux_init_bus(DeviceState *parent, const char *name)
|
||||
|
||||
/* Memory related. */
|
||||
bus->aux_io = g_malloc(sizeof(*bus->aux_io));
|
||||
memory_region_init(bus->aux_io, OBJECT(bus), "aux-io", (1 << 20));
|
||||
memory_region_init(bus->aux_io, OBJECT(bus), "aux-io", 1 * MiB);
|
||||
address_space_init(&bus->aux_addr_space, bus->aux_io, "aux-io");
|
||||
return bus;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/units.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/pci/msi.h"
|
||||
#include "qemu/timer.h"
|
||||
@ -357,7 +358,7 @@ static void pci_edu_realize(PCIDevice *pdev, Error **errp)
|
||||
edu, QEMU_THREAD_JOINABLE);
|
||||
|
||||
memory_region_init_io(&edu->mmio, OBJECT(edu), &edu_mmio_ops, edu,
|
||||
"edu-mmio", 1 << 20);
|
||||
"edu-mmio", 1 * MiB);
|
||||
pci_register_bar(pdev, 0, PCI_BASE_ADDRESS_SPACE_MEMORY, &edu->mmio);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user