From fb50cfe44dbff7be1489c5ecf5428aabd401f2e0 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 11 Aug 2011 16:07:14 -0700 Subject: 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 Signed-off-by: Avi Kivity --- hw/omap_uart.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'hw/omap_uart.c') diff --git a/hw/omap_uart.c b/hw/omap_uart.c index 191a0c2..66696ab 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); } -- cgit v1.1