Eric Biederman | 5899fd8 | 2003-04-24 06:25:08 +0000 | [diff] [blame] | 1 | /* |
Eric Biederman | 5899fd8 | 2003-04-24 06:25:08 +0000 | [diff] [blame] | 2 | * PCI defines and function prototypes |
| 3 | * Copyright 1994, Drew Eckhardt |
| 4 | * Copyright 1997--1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz> |
| 5 | * |
| 6 | * For more information, please consult the following manuals (look at |
| 7 | * http://www.pcisig.com/ for how to get them): |
| 8 | * |
| 9 | * PCI BIOS Specification |
| 10 | * PCI Local Bus Specification |
| 11 | * PCI to PCI Bridge Specification |
| 12 | * PCI System Design Guide |
| 13 | */ |
| 14 | |
| 15 | #ifndef PCI_H |
| 16 | #define PCI_H |
| 17 | |
Eric Biederman | 5268557 | 2003-05-19 19:16:21 +0000 | [diff] [blame] | 18 | #include <device/pci_def.h> |
Eric Biederman | 5899fd8 | 2003-04-24 06:25:08 +0000 | [diff] [blame] | 19 | #include <device/resource.h> |
| 20 | #include <device/device.h> |
| 21 | #include <device/pci_ops.h> |
| 22 | |
| 23 | |
| 24 | struct pci_driver { |
| 25 | struct device_operations *ops; |
| 26 | unsigned short vendor; |
| 27 | unsigned short device; |
| 28 | }; |
| 29 | |
| 30 | #define __pci_driver __attribute__ ((unused,__section__(".rodata.pci_driver"))) |
| 31 | extern struct pci_driver pci_drivers[]; |
| 32 | extern struct pci_driver epci_drivers[]; |
| 33 | |
| 34 | |
| 35 | struct device_operations default_pci_ops_dev; |
| 36 | struct device_operations default_pci_ops_bus; |
Eric Biederman | 5899fd8 | 2003-04-24 06:25:08 +0000 | [diff] [blame] | 37 | |
| 38 | |
Eric Biederman | e9a271e3 | 2003-09-02 03:36:25 +0000 | [diff] [blame^] | 39 | void pci_dev_read_resources(device_t dev); |
| 40 | void pci_bus_read_resources(device_t dev); |
| 41 | void pci_dev_set_resources(device_t dev); |
| 42 | void pci_dev_enable_resources(device_t dev); |
| 43 | void pci_bus_enable_resources(device_t dev); |
| 44 | unsigned int pci_scan_bridge(device_t bus, unsigned int max); |
| 45 | unsigned int pci_scan_bus(struct bus *bus, unsigned min_devfn, unsigned max_devfn, unsigned int max); |
Eric Biederman | 5899fd8 | 2003-04-24 06:25:08 +0000 | [diff] [blame] | 46 | |
| 47 | #define PCI_IO_BRIDGE_ALIGN 4096 |
| 48 | #define PCI_MEM_BRIDGE_ALIGN (1024*1024) |
| 49 | |
| 50 | #endif /* PCI_H */ |