summaryrefslogtreecommitdiff
path: root/hw/pxa2xx.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/pxa2xx.c
parent8e8ffc44e8d0a4a41e4b0bee8b1c2a3e1a11cfc4 (diff)
downloadqemu-fb50cfe44dbff7be1489c5ecf5428aabd401f2e0.tar.gz
qemu-fb50cfe44dbff7be1489c5ecf5428aabd401f2e0.tar.bz2
qemu-fb50cfe44dbff7be1489c5ecf5428aabd401f2e0.zip
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/pxa2xx.c')
-rw-r--r--hw/pxa2xx.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/hw/pxa2xx.c b/hw/pxa2xx.c
index 2aa876001e..55b5d8ccb4 100644
--- a/hw/pxa2xx.c
+++ b/hw/pxa2xx.c
@@ -2113,19 +2113,16 @@ PXA2xxState *pxa270_init(unsigned int sdram_size, const char *revision)
qdev_get_gpio_in(s->dma, PXA2XX_RX_RQ_MMCI),
qdev_get_gpio_in(s->dma, PXA2XX_TX_RQ_MMCI));
- for (i = 0; pxa270_serial[i].io_base; i ++)
- if (serial_hds[i])
-#ifdef TARGET_WORDS_BIGENDIAN
- serial_mm_init(pxa270_serial[i].io_base, 2,
- qdev_get_gpio_in(s->pic, pxa270_serial[i].irqn),
- 14857000 / 16, serial_hds[i], 1, 1);
-#else
+ for (i = 0; pxa270_serial[i].io_base; i++) {
+ if (serial_hds[i]) {
serial_mm_init(pxa270_serial[i].io_base, 2,
- qdev_get_gpio_in(s->pic, pxa270_serial[i].irqn),
- 14857000 / 16, serial_hds[i], 1, 0);
-#endif
- else
+ qdev_get_gpio_in(s->pic, pxa270_serial[i].irqn),
+ 14857000 / 16, serial_hds[i], 1,
+ DEVICE_NATIVE_ENDIAN);
+ } else {
break;
+ }
+ }
if (serial_hds[i])
s->fir = pxa2xx_fir_init(0x40800000,
qdev_get_gpio_in(s->pic, PXA2XX_PIC_ICP),
@@ -2248,20 +2245,16 @@ PXA2xxState *pxa255_init(unsigned int sdram_size)
qdev_get_gpio_in(s->dma, PXA2XX_RX_RQ_MMCI),
qdev_get_gpio_in(s->dma, PXA2XX_TX_RQ_MMCI));
- for (i = 0; pxa255_serial[i].io_base; i ++)
+ for (i = 0; pxa255_serial[i].io_base; i++) {
if (serial_hds[i]) {
-#ifdef TARGET_WORDS_BIGENDIAN
- serial_mm_init(pxa255_serial[i].io_base, 2,
- qdev_get_gpio_in(s->pic, pxa255_serial[i].irqn),
- 14745600 / 16, serial_hds[i], 1, 1);
-#else
serial_mm_init(pxa255_serial[i].io_base, 2,
- qdev_get_gpio_in(s->pic, pxa255_serial[i].irqn),
- 14745600 / 16, serial_hds[i], 1, 0);
-#endif
+ qdev_get_gpio_in(s->pic, pxa255_serial[i].irqn),
+ 14745600 / 16, serial_hds[i], 1,
+ DEVICE_NATIVE_ENDIAN);
} else {
break;
}
+ }
if (serial_hds[i])
s->fir = pxa2xx_fir_init(0x40800000,
qdev_get_gpio_in(s->pic, PXA2XX_PIC_ICP),