mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
parent
8e8ffc44e8
commit
fb50cfe44d
14 changed files with 38 additions and 84 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue