aboutsummaryrefslogtreecommitdiff
path: root/hw/petalogix_ml605_mmu.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-08-11 16:07:16 -0700
committerAvi Kivity <avi@redhat.com>2011-10-02 16:14:02 +0200
commit39186d8ab8af8937cee4743cc1956bdc28923ac9 (patch)
tree24c3d9953aa8900f96aae4086799a4795502de43 /hw/petalogix_ml605_mmu.c
parent2ff0c7c3c2251e7e81e90c9556dda64261d033ec (diff)
serial: Add MemoryRegion parameter to serial_mm_init
Remove the get_system_memory() call from serial_mm_init, pushing it back into the callers. In many cases we already have the system memory region available. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/petalogix_ml605_mmu.c')
-rw-r--r--hw/petalogix_ml605_mmu.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
index ab893416c8..2a0f7fd031 100644
--- a/hw/petalogix_ml605_mmu.c
+++ b/hw/petalogix_ml605_mmu.c
@@ -38,6 +38,7 @@
#include "elf.h"
#include "blockdev.h"
#include "pc.h"
+#include "exec-memory.h"
#include "microblaze_pic_cpu.h"
#include "xilinx_axidma.h"
@@ -141,6 +142,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
const char *kernel_cmdline,
const char *initrd_filename, const char *cpu_model)
{
+ MemoryRegion *address_space_mem = get_system_memory();
DeviceState *dev;
CPUState *env;
int kernel_size;
@@ -184,8 +186,8 @@ petalogix_ml605_init(ram_addr_t ram_size,
irq[i] = qdev_get_gpio_in(dev, i);
}
- serial_mm_init(UART16550_BASEADDR + 0x1000, 2, irq[5], 115200,
- serial_hds[0], DEVICE_LITTLE_ENDIAN);
+ serial_mm_init(address_space_mem, UART16550_BASEADDR + 0x1000, 2,
+ irq[5], 115200, serial_hds[0], DEVICE_LITTLE_ENDIAN);
/* 2 timers at irq 2 @ 100 Mhz. */
xilinx_timer_create(TIMER_BASEADDR, irq[2], 2, 100 * 1000000);