aboutsummaryrefslogtreecommitdiff
path: root/hw/dec_pci.c
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2010-02-07 19:28:32 +0000
committerBlue Swirl <blauwirbel@gmail.com>2010-02-07 19:28:32 +0000
commitd55380bb9c9a5b1f4c7aa919e77f9bfb72023c3a (patch)
tree8c1410d20f748f184d17d73ec31856ed67a86d00 /hw/dec_pci.c
parentff9868ecaa9293781780c757db529dac0cc48fee (diff)
dec: actually implement PCI bridging
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/dec_pci.c')
-rw-r--r--hw/dec_pci.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/hw/dec_pci.c b/hw/dec_pci.c
index 2bf4f71b42..8d059f1315 100644
--- a/hw/dec_pci.c
+++ b/hw/dec_pci.c
@@ -23,6 +23,7 @@
* THE SOFTWARE.
*/
+#include "dec_pci.h"
#include "sysbus.h"
#include "pci.h"
#include "pci_host.h"
@@ -42,6 +43,25 @@ typedef struct DECState {
PCIHostState host_state;
} DECState;
+static int dec_map_irq(PCIDevice *pci_dev, int irq_num)
+{
+ return irq_num;
+}
+
+PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn)
+{
+ DeviceState *dev;
+ PCIBus *ret;
+
+ dev = qdev_create(NULL, "dec-21154");
+ qdev_init_nofail(dev);
+ ret = pci_bridge_init(parent_bus, devfn,
+ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21154,
+ dec_map_irq, "DEC 21154 PCI-PCI bridge");
+
+ return ret;
+}
+
static int pci_dec_21154_init_device(SysBusDevice *dev)
{
DECState *s;