aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/auxbus.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2018-06-25 09:42:07 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-07-02 15:41:13 +0200
commitde9b602ebd7c3a2e22b79114478d1a3c43bdfb4f (patch)
treeb9b4cd37bdd1030cbafb6a0a62ff561802065b9c /hw/misc/auxbus.c
parentf0353b0d10dcb2a58372fe70af09c09195ec6098 (diff)
downloadqemu-de9b602ebd7c3a2e22b79114478d1a3c43bdfb4f.zip
qemu-de9b602ebd7c3a2e22b79114478d1a3c43bdfb4f.tar.gz
qemu-de9b602ebd7c3a2e22b79114478d1a3c43bdfb4f.tar.bz2
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>
Diffstat (limited to 'hw/misc/auxbus.c')
-rw-r--r--hw/misc/auxbus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index b4cacd6..b8a8721 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -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;
}