mirror of
https://git.proxmox.com/git/qemu
synced 2025-06-14 10:44:57 +00:00
exynos4210_combiner: QOM cast cleanup
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
9062143f9e
commit
c03c6b9cca
@ -56,8 +56,13 @@ typedef struct CombinerGroupState {
|
|||||||
uint8_t src_pending; /* Pending source interrupts before masking */
|
uint8_t src_pending; /* Pending source interrupts before masking */
|
||||||
} CombinerGroupState;
|
} CombinerGroupState;
|
||||||
|
|
||||||
|
#define TYPE_EXYNOS4210_COMBINER "exynos4210.combiner"
|
||||||
|
#define EXYNOS4210_COMBINER(obj) \
|
||||||
|
OBJECT_CHECK(Exynos4210CombinerState, (obj), TYPE_EXYNOS4210_COMBINER)
|
||||||
|
|
||||||
typedef struct Exynos4210CombinerState {
|
typedef struct Exynos4210CombinerState {
|
||||||
SysBusDevice busdev;
|
SysBusDevice parent_obj;
|
||||||
|
|
||||||
MemoryRegion iomem;
|
MemoryRegion iomem;
|
||||||
|
|
||||||
struct CombinerGroupState group[IIC_NGRP];
|
struct CombinerGroupState group[IIC_NGRP];
|
||||||
@ -402,24 +407,24 @@ static const MemoryRegionOps exynos4210_combiner_ops = {
|
|||||||
/*
|
/*
|
||||||
* Internal Combiner initialization.
|
* Internal Combiner initialization.
|
||||||
*/
|
*/
|
||||||
static int exynos4210_combiner_init(SysBusDevice *dev)
|
static int exynos4210_combiner_init(SysBusDevice *sbd)
|
||||||
{
|
{
|
||||||
|
DeviceState *dev = DEVICE(sbd);
|
||||||
|
Exynos4210CombinerState *s = EXYNOS4210_COMBINER(dev);
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct Exynos4210CombinerState *s =
|
|
||||||
FROM_SYSBUS(struct Exynos4210CombinerState, dev);
|
|
||||||
|
|
||||||
/* Allocate general purpose input signals and connect a handler to each of
|
/* Allocate general purpose input signals and connect a handler to each of
|
||||||
* them */
|
* them */
|
||||||
qdev_init_gpio_in(&s->busdev.qdev, exynos4210_combiner_handler, IIC_NIRQ);
|
qdev_init_gpio_in(dev, exynos4210_combiner_handler, IIC_NIRQ);
|
||||||
|
|
||||||
/* Connect SysBusDev irqs to device specific irqs */
|
/* Connect SysBusDev irqs to device specific irqs */
|
||||||
for (i = 0; i < IIC_NIRQ; i++) {
|
for (i = 0; i < IIC_NIRQ; i++) {
|
||||||
sysbus_init_irq(dev, &s->output_irq[i]);
|
sysbus_init_irq(sbd, &s->output_irq[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_combiner_ops, s,
|
memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_combiner_ops, s,
|
||||||
"exynos4210-combiner", IIC_REGION_SIZE);
|
"exynos4210-combiner", IIC_REGION_SIZE);
|
||||||
sysbus_init_mmio(dev, &s->iomem);
|
sysbus_init_mmio(sbd, &s->iomem);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -441,7 +446,7 @@ static void exynos4210_combiner_class_init(ObjectClass *klass, void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const TypeInfo exynos4210_combiner_info = {
|
static const TypeInfo exynos4210_combiner_info = {
|
||||||
.name = "exynos4210.combiner",
|
.name = TYPE_EXYNOS4210_COMBINER,
|
||||||
.parent = TYPE_SYS_BUS_DEVICE,
|
.parent = TYPE_SYS_BUS_DEVICE,
|
||||||
.instance_size = sizeof(Exynos4210CombinerState),
|
.instance_size = sizeof(Exynos4210CombinerState),
|
||||||
.class_init = exynos4210_combiner_class_init,
|
.class_init = exynos4210_combiner_class_init,
|
||||||
|
Loading…
Reference in New Issue
Block a user