summaryrefslogtreecommitdiff
path: root/hw/sm501.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-03-21 19:47:11 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-03-21 19:47:11 +0000
commit2d48377a8531de63ec1d0c4b9b1959dc4b78356c (patch)
tree5d953e12d529ea65102e1600dbcb14127261ea28 /hw/sm501.c
parentd3ffc7a6e7372e1b88a4bf1c588cbe8ed46b2ca4 (diff)
downloadqemu-2d48377a8531de63ec1d0c4b9b1959dc4b78356c.tar.gz
qemu-2d48377a8531de63ec1d0c4b9b1959dc4b78356c.tar.bz2
qemu-2d48377a8531de63ec1d0c4b9b1959dc4b78356c.zip
Compile serial only once
Push TARGET_WORDS_BIGENDIAN dependency to board level. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/sm501.c')
-rw-r--r--hw/sm501.c15
1 files changed, 11 insertions, 4 deletions
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,