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