Enable 8-byte wide MMIO for 16550 serial devices
Some drivers for the PPMC7400 PowerPC evaluation board accesses the serial registers through the floating point unit (stfd/ldfd), which is an 8-byte wide access. This patch enables that behavior. Signed-off-by: Mike Nawrocki <michael.nawrocki@gtri.gatech.edu> Message-Id: <20171106161039.32596-1-michael.nawrocki@gtri.gatech.edu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
d24aaf2a29
commit
e5a11847c4
@ -1005,7 +1005,7 @@ static void serial_mm_write(void *opaque, hwaddr addr,
|
||||
uint64_t value, unsigned size)
|
||||
{
|
||||
SerialState *s = opaque;
|
||||
value &= ~0u >> (32 - (size * 8));
|
||||
value &= 255;
|
||||
serial_ioport_write(s, addr >> s->it_shift, value, 1);
|
||||
}
|
||||
|
||||
@ -1014,16 +1014,22 @@ static const MemoryRegionOps serial_mm_ops[3] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_NATIVE_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
[DEVICE_LITTLE_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
[DEVICE_BIG_ENDIAN] = {
|
||||
.read = serial_mm_read,
|
||||
.write = serial_mm_write,
|
||||
.endianness = DEVICE_BIG_ENDIAN,
|
||||
.valid.max_access_size = 8,
|
||||
.impl.max_access_size = 8,
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user