aboutsummaryrefslogtreecommitdiff
path: root/hw/omap_uart.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/omap_uart.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/omap_uart.c')
-rw-r--r--hw/omap_uart.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/omap_uart.c b/hw/omap_uart.c
index b43f04c5ce..19f8e6eec9 100644
--- a/hw/omap_uart.c
+++ b/hw/omap_uart.c
@@ -22,6 +22,7 @@
#include "omap.h"
/* We use pc-style serial ports. */
#include "pc.h"
+#include "exec-memory.h"
/* UARTs */
struct omap_uart_s {
@@ -60,7 +61,8 @@ struct omap_uart_s *omap_uart_init(target_phys_addr_t base,
s->base = base;
s->fclk = fclk;
s->irq = irq;
- s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,
+ s->serial = serial_mm_init(get_system_memory(), base, 2, irq,
+ omap_clk_getrate(fclk)/16,
chr ?: qemu_chr_new(label, "null", NULL),
DEVICE_NATIVE_ENDIAN);
return s;
@@ -176,7 +178,7 @@ struct omap_uart_s *omap2_uart_init(struct omap_target_agent_s *ta,
void omap_uart_attach(struct omap_uart_s *s, CharDriverState *chr)
{
/* TODO: Should reuse or destroy current s->serial */
- s->serial = serial_mm_init(s->base, 2, s->irq,
+ s->serial = serial_mm_init(get_system_memory(), s->base, 2, s->irq,
omap_clk_getrate(s->fclk) / 16,
chr ?: qemu_chr_new("null", "null", NULL),
DEVICE_NATIVE_ENDIAN);