mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43: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
|
@ -858,10 +858,9 @@ static const MemoryRegionOps serial_mm_ops[3] = {
|
|||
SerialState *serial_mm_init (target_phys_addr_t base, int it_shift,
|
||||
qemu_irq irq, int baudbase,
|
||||
CharDriverState *chr, int ioregister,
|
||||
int be)
|
||||
enum device_endian end)
|
||||
{
|
||||
SerialState *s;
|
||||
enum device_endian end;
|
||||
|
||||
s = g_malloc0(sizeof(SerialState));
|
||||
|
||||
|
@ -873,7 +872,6 @@ SerialState *serial_mm_init (target_phys_addr_t base, int it_shift,
|
|||
serial_init_core(s);
|
||||
vmstate_register(NULL, base, &vmstate_serial, s);
|
||||
|
||||
end = (be ? DEVICE_BIG_ENDIAN : DEVICE_LITTLE_ENDIAN);
|
||||
memory_region_init_io(&s->io, &serial_mm_ops[end], s,
|
||||
"serial", 8 << it_shift);
|
||||
if (ioregister) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue