root / hw / pci_bridge.h @ 8294a64d
History | View | Annotate | Download (2.1 kB)
1 | 783753fd | Isaku Yamahata | /*
|
---|---|---|---|
2 | 783753fd | Isaku Yamahata | * QEMU PCI bridge
|
3 | 783753fd | Isaku Yamahata | *
|
4 | 783753fd | Isaku Yamahata | * Copyright (c) 2004 Fabrice Bellard
|
5 | 783753fd | Isaku Yamahata | *
|
6 | 783753fd | Isaku Yamahata | * This program is free software; you can redistribute it and/or modify
|
7 | 783753fd | Isaku Yamahata | * it under the terms of the GNU General Public License as published by
|
8 | 783753fd | Isaku Yamahata | * the Free Software Foundation; either version 2 of the License, or
|
9 | 783753fd | Isaku Yamahata | * (at your option) any later version.
|
10 | 783753fd | Isaku Yamahata | *
|
11 | 783753fd | Isaku Yamahata | * This program is distributed in the hope that it will be useful,
|
12 | 783753fd | Isaku Yamahata | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 | 783753fd | Isaku Yamahata | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 | 783753fd | Isaku Yamahata | * GNU General Public License for more details.
|
15 | 783753fd | Isaku Yamahata | *
|
16 | 783753fd | Isaku Yamahata | * You should have received a copy of the GNU General Public License
|
17 | 783753fd | Isaku Yamahata | * along with this program; if not, write to the Free Software
|
18 | 783753fd | Isaku Yamahata | * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
19 | 783753fd | Isaku Yamahata | *
|
20 | 783753fd | Isaku Yamahata | * split out pci bus specific stuff from pci.[hc] to pci_bridge.[hc]
|
21 | 783753fd | Isaku Yamahata | * Copyright (c) 2009 Isaku Yamahata <yamahata at valinux co jp>
|
22 | 783753fd | Isaku Yamahata | * VA Linux Systems Japan K.K.
|
23 | 783753fd | Isaku Yamahata | *
|
24 | 783753fd | Isaku Yamahata | */
|
25 | 783753fd | Isaku Yamahata | |
26 | 783753fd | Isaku Yamahata | #ifndef QEMU_PCI_BRIDGE_H
|
27 | 783753fd | Isaku Yamahata | #define QEMU_PCI_BRIDGE_H
|
28 | 783753fd | Isaku Yamahata | |
29 | 783753fd | Isaku Yamahata | #include "pci.h" |
30 | 783753fd | Isaku Yamahata | |
31 | f4c817e0 | Isaku Yamahata | int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
|
32 | f4c817e0 | Isaku Yamahata | uint16_t svid, uint16_t ssid); |
33 | f4c817e0 | Isaku Yamahata | |
34 | 783753fd | Isaku Yamahata | PCIDevice *pci_bridge_get_device(PCIBus *bus); |
35 | 68f79994 | Isaku Yamahata | PCIBus *pci_bridge_get_sec_bus(PCIBridge *br); |
36 | 783753fd | Isaku Yamahata | |
37 | 68f79994 | Isaku Yamahata | pcibus_t pci_bridge_get_base(const PCIDevice *bridge, uint8_t type);
|
38 | 68f79994 | Isaku Yamahata | pcibus_t pci_bridge_get_limit(const PCIDevice *bridge, uint8_t type);
|
39 | 783753fd | Isaku Yamahata | |
40 | 68f79994 | Isaku Yamahata | void pci_bridge_write_config(PCIDevice *d,
|
41 | 68f79994 | Isaku Yamahata | uint32_t address, uint32_t val, int len);
|
42 | 0208def1 | Isaku Yamahata | void pci_bridge_disable_base_limit(PCIDevice *dev);
|
43 | 68f79994 | Isaku Yamahata | void pci_bridge_reset_reg(PCIDevice *dev);
|
44 | 68f79994 | Isaku Yamahata | void pci_bridge_reset(DeviceState *qdev);
|
45 | 68f79994 | Isaku Yamahata | |
46 | 68f79994 | Isaku Yamahata | int pci_bridge_initfn(PCIDevice *pci_dev);
|
47 | 68f79994 | Isaku Yamahata | int pci_bridge_exitfn(PCIDevice *pci_dev);
|
48 | 68f79994 | Isaku Yamahata | |
49 | 68f79994 | Isaku Yamahata | |
50 | 68f79994 | Isaku Yamahata | /*
|
51 | 68f79994 | Isaku Yamahata | * before qdev initialization(qdev_init()), this function sets bus_name and
|
52 | 68f79994 | Isaku Yamahata | * map_irq callback which are necessry for pci_bridge_initfn() to
|
53 | 68f79994 | Isaku Yamahata | * initialize bus.
|
54 | 68f79994 | Isaku Yamahata | */
|
55 | 68f79994 | Isaku Yamahata | void pci_bridge_map_irq(PCIBridge *br, const char* bus_name, |
56 | 68f79994 | Isaku Yamahata | pci_map_irq_fn map_irq); |
57 | 783753fd | Isaku Yamahata | |
58 | 783753fd | Isaku Yamahata | #endif /* QEMU_PCI_BRIDGE_H */ |
59 | 783753fd | Isaku Yamahata | /*
|
60 | 783753fd | Isaku Yamahata | * Local variables:
|
61 | 783753fd | Isaku Yamahata | * c-indent-level: 4
|
62 | 783753fd | Isaku Yamahata | * c-basic-offset: 4
|
63 | 783753fd | Isaku Yamahata | * tab-width: 8
|
64 | 783753fd | Isaku Yamahata | * indent-tab-mode: nil
|
65 | 783753fd | Isaku Yamahata | * End:
|
66 | 783753fd | Isaku Yamahata | */ |