#include <stdint.h>
#include <stddef.h>
Go to the source code of this file.
#define PCI_MAJOR_BRIDGE 6 |
#define PCI_MAJOR_SERIALBUS 12 |
#define PCI_MINOR_PCI 4 |
#define PCI_MINOR_USB 3 |
#define PCI_USB_IFACE_EHCI 0x20 |
#define PCI_USB_IFACE_UHCI 0 |
typedef void pci_handler_func(void *AUX) |
struct pci_dev* pci_get_dev_by_class | ( | int | major, | |
int | minor, | |||
int | iface, | |||
int | n | |||
) | [read] |
Definition at line 206 of file pci.c.
References devices, list_begin(), list_end(), list_entry, list_next(), NULL, pci_dev::pch, pci_config_header::pci_interface, pci_config_header::pci_major, pci_config_header::pci_minor, and pci_dev::peer.
Referenced by ehci_init(), and uhci_init().
struct pci_dev* pci_get_device | ( | int | vendor, | |
int | device, | |||
int | func, | |||
int | n | |||
) | [read] |
Definition at line 179 of file pci.c.
References devices, pci_dev::func, list_begin(), list_end(), list_entry, list_next(), NULL, pci_dev::pch, pci_config_header::pci_device_id, pci_config_header::pci_vendor_id, and pci_dev::peer.
void pci_init | ( | void | ) |
Definition at line 167 of file pci.c.
References devices, int_devices, list_init(), num_pci_pages, pci_print_stats(), and pci_scan_bus().
Referenced by main().
Definition at line 234 of file pci.c.
References pci_dev::io_ranges, list_begin(), list_end(), list_entry, list_next(), NULL, and pci_io::peer.
Referenced by ehci_init(), and uhci_init().
Definition at line 281 of file pci.c.
References ASSERT, NULL, and pci_io::size.
Referenced by uhci_init().
void pci_mask_irq | ( | struct pci_dev * | ) |
Definition at line 731 of file pci.c.
References intr_irq_mask(), pci_dev::pch, and pci_config_header::pci_int_line.
void pci_print_stats | ( | void | ) |
Definition at line 701 of file pci.c.
References devices, list_begin(), list_end(), list_entry, list_next(), pci_print_dev_info(), and pci_dev::peer.
Referenced by pci_init().
Definition at line 767 of file pci.c.
References pci_dev::bus, pci_dev::dev, pci_dev::func, and pci_read_config().
Definition at line 773 of file pci.c.
References pci_dev::bus, pci_dev::dev, pci_dev::func, and pci_read_config().
Definition at line 761 of file pci.c.
References pci_dev::bus, pci_dev::dev, pci_dev::func, and pci_read_config().
Definition at line 365 of file pci.c.
References pci_io::addr, ASSERT, inw(), NULL, PANIC, PCI_IO_MEM, PCI_IO_PORT, pci_io::port, pci_io::ptr, and pci_io::type.
Referenced by check_and_flip_change(), dump_regs(), uhci_detect_ports(), uhci_enable_port(), uhci_init(), uhci_irq(), uhci_run_unlocked(), and uhci_stop_unlocked().
Definition at line 343 of file pci.c.
References pci_io::addr, ASSERT, inl(), NULL, PANIC, PCI_IO_MEM, PCI_IO_PORT, pci_io::port, pci_io::ptr, and pci_io::type.
Referenced by dump_regs().
Definition at line 389 of file pci.c.
References pci_io::addr, ASSERT, inb(), NULL, PANIC, PCI_IO_MEM, PCI_IO_PORT, pci_io::port, pci_io::ptr, and pci_io::type.
Referenced by ehci_init().
Definition at line 307 of file pci.c.
References pci_io::addr, ASSERT, NULL, outw(), PANIC, PCI_IO_MEM, PCI_IO_PORT, pci_io::port, pci_io::ptr, and pci_io::type.
Referenced by check_and_flip_change(), uhci_enable_port(), uhci_init(), uhci_irq(), uhci_run_unlocked(), and uhci_stop_unlocked().
Definition at line 289 of file pci.c.
References pci_io::addr, ASSERT, NULL, outl(), PANIC, PCI_IO_MEM, PCI_IO_PORT, pci_io::port, pci_io::ptr, and pci_io::type.
Referenced by ehci_init(), and uhci_init().
Definition at line 325 of file pci.c.
References pci_io::addr, ASSERT, NULL, outb(), PANIC, PCI_IO_MEM, PCI_IO_PORT, pci_io::port, pci_io::ptr, and pci_io::type.
Referenced by uhci_init().
void pci_register_irq | ( | struct pci_dev * | , | |
pci_handler_func * | , | |||
void * | AUX | |||
) |
Definition at line 250 of file pci.c.
References ASSERT, int_devices, pci_dev::int_peer, intr_is_registered(), intr_register_ext(), pci_dev::irq_handler, pci_dev::irq_handler_aux, list_push_back(), NULL, pci_dev::pch, pci_config_header::pci_int_line, and pci_interrupt().
Referenced by uhci_init().
void pci_unmask_irq | ( | struct pci_dev * | ) |
Definition at line 737 of file pci.c.
References intr_irq_unmask(), pci_dev::pch, and pci_config_header::pci_int_line.
void pci_unregister_irq | ( | struct pci_dev * | ) |
Definition at line 268 of file pci.c.
References ASSERT, pci_dev::int_peer, intr_disable(), intr_enable(), pci_dev::irq_handler, pci_dev::irq_handler_aux, list_remove(), and NULL.
Definition at line 743 of file pci.c.
References pci_dev::bus, pci_dev::dev, pci_dev::func, and pci_write_config().
Referenced by uhci_init().
Definition at line 749 of file pci.c.
References pci_dev::bus, pci_dev::dev, pci_dev::func, and pci_write_config().
Definition at line 755 of file pci.c.
References pci_dev::bus, pci_dev::dev, pci_dev::func, and pci_write_config().