mirror of https://github.com/xemu-project/xemu.git
dec: actually implement PCI bridging
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
ff9868ecaa
commit
d55380bb9c
20
hw/dec_pci.c
20
hw/dec_pci.c
|
@ -23,6 +23,7 @@
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "dec_pci.h"
|
||||||
#include "sysbus.h"
|
#include "sysbus.h"
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
#include "pci_host.h"
|
#include "pci_host.h"
|
||||||
|
@ -42,6 +43,25 @@ typedef struct DECState {
|
||||||
PCIHostState host_state;
|
PCIHostState host_state;
|
||||||
} DECState;
|
} 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)
|
static int pci_dec_21154_init_device(SysBusDevice *dev)
|
||||||
{
|
{
|
||||||
DECState *s;
|
DECState *s;
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef DEC_PCI_H
|
||||||
|
#define DEC_PCI_H
|
||||||
|
|
||||||
|
#include "qemu-common.h"
|
||||||
|
|
||||||
|
PCIBus *pci_dec_21154_init(PCIBus *parent_bus, int devfn);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue