mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 13:30:52 +00:00
d484205210
Drop unnecessary inclusions from headers. Downgrade a few more to exec/hwaddr.h. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190812052359.30071-17-armbru@redhat.com>
34 lines
848 B
C
34 lines
848 B
C
#include "qemu/osdep.h"
|
|
#include "exec/memory.h"
|
|
#include "hw/display/edid.h"
|
|
|
|
static uint64_t edid_region_read(void *ptr, hwaddr addr, unsigned size)
|
|
{
|
|
uint8_t *edid = ptr;
|
|
|
|
return edid[addr];
|
|
}
|
|
|
|
static void edid_region_write(void *ptr, hwaddr addr,
|
|
uint64_t val, unsigned size)
|
|
{
|
|
/* read only */
|
|
}
|
|
|
|
static const MemoryRegionOps edid_region_ops = {
|
|
.read = edid_region_read,
|
|
.write = edid_region_write,
|
|
.valid.min_access_size = 1,
|
|
.valid.max_access_size = 4,
|
|
.impl.min_access_size = 1,
|
|
.impl.max_access_size = 1,
|
|
.endianness = DEVICE_LITTLE_ENDIAN,
|
|
};
|
|
|
|
void qemu_edid_region_io(MemoryRegion *region, Object *owner,
|
|
uint8_t *edid, size_t size)
|
|
{
|
|
memory_region_init_io(region, owner, &edid_region_ops,
|
|
edid, "edid", size);
|
|
}
|