acpi: ged: rename event memory region
Rename memory region and callbacks and ops to carry "evt" in the name because a second region will be added shortly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20200520132003.9492-10-kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Igor Mammedow <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
c8ed8f57cc
commit
32905fc95c
@ -142,7 +142,7 @@ void build_ged_aml(Aml *table, const char *name, HotplugHandler *hotplug_dev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Memory read by the GED _EVT AML dynamic method */
|
/* Memory read by the GED _EVT AML dynamic method */
|
||||||
static uint64_t ged_read(void *opaque, hwaddr addr, unsigned size)
|
static uint64_t ged_evt_read(void *opaque, hwaddr addr, unsigned size)
|
||||||
{
|
{
|
||||||
uint64_t val = 0;
|
uint64_t val = 0;
|
||||||
GEDState *ged_st = opaque;
|
GEDState *ged_st = opaque;
|
||||||
@ -161,14 +161,14 @@ static uint64_t ged_read(void *opaque, hwaddr addr, unsigned size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Nothing is expected to be written to the GED memory region */
|
/* Nothing is expected to be written to the GED memory region */
|
||||||
static void ged_write(void *opaque, hwaddr addr, uint64_t data,
|
static void ged_evt_write(void *opaque, hwaddr addr, uint64_t data,
|
||||||
unsigned int size)
|
unsigned int size)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static const MemoryRegionOps ged_ops = {
|
static const MemoryRegionOps ged_evt_ops = {
|
||||||
.read = ged_read,
|
.read = ged_evt_read,
|
||||||
.write = ged_write,
|
.write = ged_evt_write,
|
||||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||||
.valid = {
|
.valid = {
|
||||||
.min_access_size = 4,
|
.min_access_size = 4,
|
||||||
@ -287,9 +287,9 @@ static void acpi_ged_initfn(Object *obj)
|
|||||||
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
||||||
GEDState *ged_st = &s->ged_state;
|
GEDState *ged_st = &s->ged_state;
|
||||||
|
|
||||||
memory_region_init_io(&ged_st->io, obj, &ged_ops, ged_st,
|
memory_region_init_io(&ged_st->evt, obj, &ged_evt_ops, ged_st,
|
||||||
TYPE_ACPI_GED, ACPI_GED_EVT_SEL_LEN);
|
TYPE_ACPI_GED, ACPI_GED_EVT_SEL_LEN);
|
||||||
sysbus_init_mmio(sbd, &ged_st->io);
|
sysbus_init_mmio(sbd, &ged_st->evt);
|
||||||
|
|
||||||
sysbus_init_irq(sbd, &s->irq);
|
sysbus_init_irq(sbd, &s->irq);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
#define ACPI_GED_NVDIMM_HOTPLUG_EVT 0x4
|
#define ACPI_GED_NVDIMM_HOTPLUG_EVT 0x4
|
||||||
|
|
||||||
typedef struct GEDState {
|
typedef struct GEDState {
|
||||||
MemoryRegion io;
|
MemoryRegion evt;
|
||||||
uint32_t sel;
|
uint32_t sel;
|
||||||
} GEDState;
|
} GEDState;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user