diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-03-21 19:47:11 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-03-21 19:47:11 +0000 |
commit | 2d48377a8531de63ec1d0c4b9b1959dc4b78356c (patch) | |
tree | 5d953e12d529ea65102e1600dbcb14127261ea28 /hw/omap1.c | |
parent | d3ffc7a6e7372e1b88a4bf1c588cbe8ed46b2ca4 (diff) |
Compile serial only once
Push TARGET_WORDS_BIGENDIAN dependency to board level.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/omap1.c')
-rw-r--r-- | hw/omap1.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/hw/omap1.c b/hw/omap1.c index b5d78cd917..a554d905f2 100644 --- a/hw/omap1.c +++ b/hw/omap1.c @@ -1986,9 +1986,15 @@ 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_open("null", "null", NULL), 1); - + chr ?: qemu_chr_open("null", "null", NULL), 1, + 1); +#else + s->serial = serial_mm_init(base, 2, irq, omap_clk_getrate(fclk)/16, + chr ?: qemu_chr_open("null", "null", NULL), 1, + 0); +#endif return s; } @@ -2101,9 +2107,17 @@ 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_open("null", "null", NULL), 1); + omap_clk_getrate(s->fclk) / 16, + chr ?: qemu_chr_open("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_open("null", "null", NULL), 1, + 0); +#endif } /* MPU Clock/Reset/Power Mode Control */ |