aboutsummaryrefslogtreecommitdiff
path: root/hw/omap_uart.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-08-11 16:07:14 -0700
committerAvi Kivity <avi@redhat.com>2011-10-02 16:14:01 +0200
commitfb50cfe44dbff7be1489c5ecf5428aabd401f2e0 (patch)
tree737c44fe223d0a98a30ed36781413fb4715b7e42 /hw/omap_uart.c
parent8e8ffc44e8d0a4a41e4b0bee8b1c2a3e1a11cfc4 (diff)
serial: Use enum device_endian in serial_mm_init parameter
The use of DEVICE_NATIVE_ENDIAN cleans up lots of ifdefs in many of the callers. 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.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/hw/omap_uart.c b/hw/omap_uart.c
index 191a0c2ccd..66696ab865 100644
--- a/hw/omap_uart.c
+++ b/hw/omap_uart.c
@@ -60,15 +60,9 @@ struct omap_uart_s *omap_uart_init(target_phys_addr_t base,
s->base = base;
s->fclk = fclk;
s->irq = irq;
-#ifdef TARGET_WORDS_BIGENDIAN
s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,
chr ?: qemu_chr_new(label, "null", NULL), 1,
- 1);
-#else
- s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16,
- chr ?: qemu_chr_new(label, "null", NULL), 1,
- 0);
-#endif
+ DEVICE_NATIVE_ENDIAN);
return s;
}
@@ -182,15 +176,8 @@ 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 */
-#ifdef TARGET_WORDS_BIGENDIAN
- s->serial = serial_mm_init(s->base, 2, s->irq,
- omap_clk_getrate(s->fclk) / 16,
- chr ?: qemu_chr_new("null", "null", NULL), 1,
- 1);
-#else
s->serial = serial_mm_init(s->base, 2, s->irq,
omap_clk_getrate(s->fclk) / 16,
chr ?: qemu_chr_new("null", "null", NULL), 1,
- 0);
-#endif
+ DEVICE_NATIVE_ENDIAN);
}