From 2d48377a8531de63ec1d0c4b9b1959dc4b78356c Mon Sep 17 00:00:00 2001 From: Blue Swirl Date: Sun, 21 Mar 2010 19:47:11 +0000 Subject: Compile serial only once Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl --- hw/sm501.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'hw/sm501.c') diff --git a/hw/sm501.c b/hw/sm501.c index 80185864c4..1a342bdc58 100644 --- a/hw/sm501.c +++ b/hw/sm501.c @@ -1226,10 +1226,17 @@ void sm501_init(uint32_t base, uint32_t local_mem_bytes, qemu_irq irq, 2, -1, irq); /* bridge to serial emulation module */ - if (chr) - serial_mm_init(base + MMIO_BASE_OFFSET + SM501_UART0, 2, - NULL, /* TODO : chain irq to IRL */ - 115200, chr, 1); + if (chr) { +#ifdef TARGET_WORDS_BIGENDIAN + serial_mm_init(base + MMIO_BASE_OFFSET + SM501_UART0, 2, + NULL, /* TODO : chain irq to IRL */ + 115200, chr, 1, 1); +#else + serial_mm_init(base + MMIO_BASE_OFFSET + SM501_UART0, 2, + NULL, /* TODO : chain irq to IRL */ + 115200, chr, 1, 0); +#endif + } /* create qemu graphic console */ s->ds = graphic_console_init(sm501_update_display, NULL, -- cgit v1.2.3