* [Qemu-devel] [PATCH] SPARC ebus: QOMify
@ 2016-01-06 13:40 Cao jin
2016-01-12 5:20 ` Cao jin
0 siblings, 1 reply; 2+ messages in thread
From: Cao jin @ 2016-01-06 13:40 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, mark.cave-ayland
Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
---
hw/sparc64/sun4u.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d6b929c..07f74fe 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -98,6 +98,10 @@ typedef struct EbusState {
MemoryRegion bar1;
} EbusState;
+#define TYPE_EBUS_BRIDGE "ebus"
+#define EBUS_PCI_BRIDGE(obj) \
+ OBJECT_CHECK(EbusState, (obj), TYPE_EBUS_BRIDGE)
+
int DMA_get_channel_mode (int nchan)
{
return 0;
@@ -586,7 +590,7 @@ pci_ebus_init(PCIBus *bus, int devfn, qemu_irq *irqs)
PCIDevice *pci_dev;
ISABus *isa_bus;
- pci_dev = pci_create_simple(bus, devfn, "ebus");
+ pci_dev = pci_create_simple(bus, devfn, TYPE_EBUS_BRIDGE);
isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(pci_dev), "isa.0"));
isa_irq = qemu_allocate_irqs(isa_irq_handler, irqs, 16);
isa_bus_irqs(isa_bus, isa_irq);
@@ -629,7 +633,7 @@ static void ebus_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo ebus_info = {
- .name = "ebus",
+ .name = TYPE_EBUS_BRIDGE,
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(EbusState),
.class_init = ebus_class_init,
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] SPARC ebus: QOMify
2016-01-06 13:40 [Qemu-devel] [PATCH] SPARC ebus: QOMify Cao jin
@ 2016-01-12 5:20 ` Cao jin
0 siblings, 0 replies; 2+ messages in thread
From: Cao jin @ 2016-01-12 5:20 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, mark.cave-ayland
ping?
On 01/06/2016 09:40 PM, Cao jin wrote:
> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
> ---
> hw/sparc64/sun4u.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index d6b929c..07f74fe 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -98,6 +98,10 @@ typedef struct EbusState {
> MemoryRegion bar1;
> } EbusState;
>
> +#define TYPE_EBUS_BRIDGE "ebus"
> +#define EBUS_PCI_BRIDGE(obj) \
> + OBJECT_CHECK(EbusState, (obj), TYPE_EBUS_BRIDGE)
> +
> int DMA_get_channel_mode (int nchan)
> {
> return 0;
> @@ -586,7 +590,7 @@ pci_ebus_init(PCIBus *bus, int devfn, qemu_irq *irqs)
> PCIDevice *pci_dev;
> ISABus *isa_bus;
>
> - pci_dev = pci_create_simple(bus, devfn, "ebus");
> + pci_dev = pci_create_simple(bus, devfn, TYPE_EBUS_BRIDGE);
> isa_bus = ISA_BUS(qdev_get_child_bus(DEVICE(pci_dev), "isa.0"));
> isa_irq = qemu_allocate_irqs(isa_irq_handler, irqs, 16);
> isa_bus_irqs(isa_bus, isa_irq);
> @@ -629,7 +633,7 @@ static void ebus_class_init(ObjectClass *klass, void *data)
> }
>
> static const TypeInfo ebus_info = {
> - .name = "ebus",
> + .name = TYPE_EBUS_BRIDGE,
> .parent = TYPE_PCI_DEVICE,
> .instance_size = sizeof(EbusState),
> .class_init = ebus_class_init,
>
--
Yours Sincerely,
Cao jin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-12 5:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 13:40 [Qemu-devel] [PATCH] SPARC ebus: QOMify Cao jin
2016-01-12 5:20 ` Cao jin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).