[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 36/40] PPC: E500: Move PCI slot information into par
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 36/40] PPC: E500: Move PCI slot information into params |
Date: |
Fri, 14 Dec 2012 13:13:52 +0100 |
We have a params struct that allows us to expose differences between
e500 machine models. Include PCI slot information there, so we can have
different machines with different PCI slot topology.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/e500.c | 4 +++-
hw/ppc/e500.h | 2 ++
hw/ppc/e500plat.c | 2 ++
hw/ppc/mpc8544ds.c | 2 ++
4 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index ebb6d96..564f654 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -339,7 +339,8 @@ static int ppce500_load_device_tree(CPUPPCState *env,
qemu_devtree_setprop_cells(fdt, pci, "interrupt-map-mask", 0xf800, 0x0,
0x0, 0x7);
pci_map = pci_map_create(fdt, qemu_devtree_get_phandle(fdt, mpic),
- 0x11, 2, &len);
+ params->pci_first_slot, params->pci_nr_slots,
+ &len);
qemu_devtree_setprop(fdt, pci, "interrupt-map", pci_map, len);
qemu_devtree_setprop_phandle(fdt, pci, "interrupt-parent", mpic);
qemu_devtree_setprop_cells(fdt, pci, "interrupts", 24, 2);
@@ -569,6 +570,7 @@ void ppce500_init(PPCE500Params *params)
/* PCI */
dev = qdev_create(NULL, "e500-pcihost");
+ qdev_prop_set_uint32(dev, "first_slot", params->pci_first_slot);
qdev_init_nofail(dev);
s = SYS_BUS_DEVICE(dev);
sysbus_connect_irq(s, 0, mpic[pci_irq_nrs[0]]);
diff --git a/hw/ppc/e500.h b/hw/ppc/e500.h
index 7ae87f4..f5ff273 100644
--- a/hw/ppc/e500.h
+++ b/hw/ppc/e500.h
@@ -9,6 +9,8 @@ typedef struct PPCE500Params {
const char *kernel_cmdline;
const char *initrd_filename;
const char *cpu_model;
+ int pci_first_slot;
+ int pci_nr_slots;
/* e500-specific params */
diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c
index 4cfb940..9365213 100644
--- a/hw/ppc/e500plat.c
+++ b/hw/ppc/e500plat.c
@@ -40,6 +40,8 @@ static void e500plat_init(QEMUMachineInitArgs *args)
.kernel_cmdline = kernel_cmdline,
.initrd_filename = initrd_filename,
.cpu_model = cpu_model,
+ .pci_first_slot = 0x11,
+ .pci_nr_slots = 2,
.fixup_devtree = e500plat_fixup_devtree,
};
diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c
index e651661..7e1761d 100644
--- a/hw/ppc/mpc8544ds.c
+++ b/hw/ppc/mpc8544ds.c
@@ -40,6 +40,8 @@ static void mpc8544ds_init(QEMUMachineInitArgs *args)
.kernel_cmdline = kernel_cmdline,
.initrd_filename = initrd_filename,
.cpu_model = cpu_model,
+ .pci_first_slot = 0x11,
+ .pci_nr_slots = 2,
.fixup_devtree = mpc8544ds_fixup_devtree,
};
--
1.6.0.2
- [Qemu-devel] [PATCH 30/40] MSI-X: Fix endianness, (continued)
- [Qemu-devel] [PATCH 30/40] MSI-X: Fix endianness, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 32/40] openpic: Accelerate pending irq search, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 29/40] PPC: e500: Declare pci bridge as bridge, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 13/40] mpic: Unify numbering scheme, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 40/40] pseries: Increase default NVRAM size, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 35/40] PPC: E500: Generate dt pci irq map dynamically, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 38/40] PPC: e500: pci: Export slot2irq calculation, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 24/40] openpic: remove irq_out, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 28/40] PPC: e500: Add MSI support, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 31/40] openpic: fix minor coding style issues, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 36/40] PPC: E500: Move PCI slot information into params,
Alexander Graf <=
- [Qemu-devel] [PATCH 02/40] pseries: Use #define for XICS base irq number, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 34/40] PPC: E500: PCI: Make IRQ calculation more generic, Alexander Graf, 2012/12/14
- [Qemu-devel] [PATCH 08/40] pseries: Update SLOF for NVRAM support, Alexander Graf, 2012/12/14
- Re: [Qemu-devel] [PULL 00/40] ppc patch queue 2012-12-14, Blue Swirl, 2012/12/15