From: Alexander Graf <agraf@suse.de>
To: "qemu-ppc@nongnu.org List" <qemu-ppc@nongnu.org>
Cc: qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH 1/5] PPC: E500: PCI: Make first slot qdev settable
Date: Wed, 12 Dec 2012 15:09:54 +0100 [thread overview]
Message-ID: <1355321398-23393-2-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1355321398-23393-1-git-send-email-agraf@suse.de>
Today the first slot id in our e500 pci implementation is hardcoded to
0x11. Keep it there as default, but allow users to change the default to
a different id.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
hw/ppce500_pci.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/hw/ppce500_pci.c b/hw/ppce500_pci.c
index e534341..4cd4edc 100644
--- a/hw/ppce500_pci.c
+++ b/hw/ppce500_pci.c
@@ -87,6 +87,7 @@ struct PPCE500PCIState {
struct pci_inbound pib[PPCE500_PCI_NR_PIBS];
uint32_t gasket_time;
qemu_irq irq[4];
+ uint32_t first_slot;
/* mmio maps */
MemoryRegion container;
MemoryRegion iomem;
@@ -361,7 +362,7 @@ static int e500_pcihost_initfn(SysBusDevice *dev)
b = pci_register_bus(DEVICE(dev), NULL, mpc85xx_pci_set_irq,
mpc85xx_pci_map_irq, s->irq, address_space_mem,
- &s->pio, PCI_DEVFN(0x11, 0), 4);
+ &s->pio, PCI_DEVFN(s->first_slot, 0), 4);
h->bus = b;
pci_create_simple(b, 0, "e500-host-bridge");
@@ -401,12 +402,18 @@ static const TypeInfo e500_host_bridge_info = {
.class_init = e500_host_bridge_class_init,
};
+static Property pcihost_properties[] = {
+ DEFINE_PROP_UINT32("first_slot", PPCE500PCIState, first_slot, 0x11),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void e500_pcihost_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
k->init = e500_pcihost_initfn;
+ dc->props = pcihost_properties;
dc->vmsd = &vmstate_ppce500_pci;
}
--
1.6.0.2
next prev parent reply other threads:[~2012-12-12 14:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 14:09 [Qemu-devel] [PATCH 0/5] PPC: e500: Enable more PCI slots for -M ppce500 Alexander Graf
2012-12-12 14:09 ` Alexander Graf [this message]
2012-12-12 14:09 ` [Qemu-devel] [PATCH 2/5] PPC: E500: PCI: Make IRQ calculation more generic Alexander Graf
2012-12-12 14:09 ` [Qemu-devel] [PATCH 3/5] PPC: E500: Generate dt pci irq map dynamically Alexander Graf
2012-12-12 18:40 ` [Qemu-devel] [Qemu-ppc] " Scott Wood
2012-12-12 23:38 ` Alexander Graf
2012-12-12 23:43 ` Scott Wood
2012-12-13 0:04 ` Alexander Graf
2012-12-13 0:20 ` Scott Wood
2012-12-13 0:28 ` Alexander Graf
2012-12-13 0:33 ` Scott Wood
2012-12-13 0:36 ` Alexander Graf
2012-12-12 14:09 ` [Qemu-devel] [PATCH 4/5] PPC: E500: Move PCI slot information into params Alexander Graf
2012-12-12 14:09 ` [Qemu-devel] [PATCH 5/5] PPC: E500plat: Make a lot of PCI slots available Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355321398-23393-2-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).