2 * (c) 2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
12 #include <l4/sys/compiler.h>
13 #include <l4/vbus/vbus_types.h>
14 #include <l4/sys/types.h>
19 * \brief Read from the vPCI configuration space.
21 * \param vbus capability of the system bus
22 * \param handle device handle
26 * \retval value Value that has been read
27 * \param width Width to read in bits (e.g. 8, 16, 32)
29 * \return 0 on succes, else failure
32 l4vbus_pci_cfg_read(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
33 l4_uint32_t bus, l4_uint32_t devfn,
34 l4_uint32_t reg, l4_uint32_t *value, l4_uint32_t width);
37 * \brief Write to the vPCI configuration space.
39 * \param vbus capability of the system bus
40 * \param handle device handle
44 * \param value Value to write
45 * \param width Width to write in bits (e.g. 8, 16, 32)
48 l4vbus_pci_cfg_write(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
49 l4_uint32_t bus, l4_uint32_t devfn,
50 l4_uint32_t reg, l4_uint32_t value, l4_uint32_t width);
53 * \brief Enable PCI interrupt.
55 * \param vbus capability of the system bus
56 * \param handle device handle
60 * \retval trigger Trigger
61 * \retval polarity Polarity
64 l4vbus_pci_irq_enable(l4_cap_idx_t vbus, l4vbus_device_handle_t handle,
65 l4_uint32_t bus, l4_uint32_t devfn,
66 int pin, unsigned char *trigger,
67 unsigned char *polarity);