blob: c49a2bdcc0d75d63a7a364d588c24cda344d6312 [file] [log] [blame]
Eric Biederman5899fd82003-04-24 06:25:08 +00001/*
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 Biederman52685572003-05-19 19:16:21 +000020#include <device/pci_def.h>
Eric Biederman5899fd82003-04-24 06:25:08 +000021#include <device/resource.h>
22#include <device/device.h>
23#include <device/pci_ops.h>
24
25
26struct 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")))
33extern struct pci_driver pci_drivers[];
34extern struct pci_driver epci_drivers[];
35
36
37struct device_operations default_pci_ops_dev;
38struct device_operations default_pci_ops_bus;
39struct device_operations default_pci_ops_root;
40
41
42void pci_dev_read_resources(struct device *dev);
43void pci_bus_read_resources(struct device *dev);
44void pci_dev_set_resources(struct device *dev);
45unsigned 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 */