diff options
Diffstat (limited to 'src/devices/machine/pci.cpp')
-rw-r--r-- | src/devices/machine/pci.cpp | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp index 5edc3890f6d..fec52315a23 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -3,8 +3,9 @@ #include "emu.h" #include "pci.h" -const device_type PCI_ROOT = device_creator<pci_root_device>; -const device_type PCI_BRIDGE = device_creator<pci_bridge_device>; +DEFINE_DEVICE_TYPE(PCI_ROOT, pci_root_device, "pci_root", "PCI virtual root") +DEFINE_DEVICE_TYPE(PCI_BRIDGE, pci_bridge_device, "pci_bridge", "PCI-PCI Bridge") + DEVICE_ADDRESS_MAP_START(config_map, 32, pci_device) AM_RANGE(0x00, 0x03) AM_READ16 (vendor_r, 0x0000ffff) @@ -61,9 +62,9 @@ DEVICE_ADDRESS_MAP_START(config_map, 32, pci_bridge_device) AM_RANGE(0x3c, 0x3f) AM_READWRITE16(bridge_control_r, bridge_control_w, 0xffff0000) ADDRESS_MAP_END -pci_device::pci_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) - : device_t(mconfig, type, name, tag, owner, clock, shortname, source), - m_region(*this, DEVICE_SELF) +pci_device::pci_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, type, tag, owner, clock) + , m_region(*this, DEVICE_SELF) { main_id = 0xffffffff; revision = 0x00; @@ -413,8 +414,8 @@ void pci_device::set_map_flags(int id, int flags) remap_cb(); } -agp_device::agp_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) - : pci_device(mconfig, type, name, tag, owner, clock, shortname, source) +agp_device::agp_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : pci_device(mconfig, type, tag, owner, clock) { } @@ -431,16 +432,14 @@ void agp_device::device_reset() pci_bridge_device::pci_bridge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : pci_device(mconfig, PCI_BRIDGE, "PCI-PCI Bridge", tag, owner, clock, "pci_bridge", __FILE__), - device_memory_interface(mconfig, *this), - configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) + : pci_bridge_device(mconfig, PCI_BRIDGE, tag, owner, clock) { } -pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) - : pci_device(mconfig, type, name, tag, owner, clock, shortname, source), - device_memory_interface(mconfig, *this), - configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) +pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : pci_device(mconfig, type, tag, owner, clock) + , device_memory_interface(mconfig, *this) + , configure_space_config("configuration_space", ENDIANNESS_LITTLE, 32, 20) { } @@ -799,8 +798,8 @@ WRITE16_MEMBER(pci_bridge_device::bridge_control_w) } -agp_bridge_device::agp_bridge_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) - : pci_bridge_device(mconfig, type, name, tag, owner, clock, shortname, source) +agp_bridge_device::agp_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : pci_bridge_device(mconfig, type, tag, owner, clock) { } @@ -822,8 +821,8 @@ DEVICE_ADDRESS_MAP_START(io_configuration_access_map, 32, pci_host_device) ADDRESS_MAP_END -pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source) - : pci_bridge_device(mconfig, type, name, tag, owner, clock, shortname, source) +pci_host_device::pci_host_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : pci_bridge_device(mconfig, type, tag, owner, clock) { } @@ -906,7 +905,7 @@ void pci_host_device::root_config_write(uint8_t bus, uint8_t device, uint16_t re pci_root_device::pci_root_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, PCI_ROOT,"PCI virtual root", tag, owner, clock, "pci_root", __FILE__) + : device_t(mconfig, PCI_ROOT, tag, owner, clock) { } |