aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.osdl.org>2006-12-21 03:01:47 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-21 03:01:47 -0500
commitde9b2fccb6a1efdf1665ebbcb28cad61467b308a (patch)
treeeeaf8e24a6b323be04da5b04e44b79daf8f6d05a /include
parentfb34d203d0b5ac1b8284973eb0db3fdff101fc5e (diff)
parent031f30d2bc69f78cf542c0e5874a9d67c03d0ffe (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (22 commits) acpiphp: Link-time error for PCI Hotplug shpchp: cleanup shpchp.h shpchp: remove shpchprm_get_physical_slot_number shpchp: cleanup struct controller shpchp: remove unnecessary struct php_ctlr PCI: ATI sb600 sata quirk PCI legacy resource fix PCI: don't export device IDs to userspace PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev. PCI: Fix multiple problems with VIA hardware PCI: Only check the HT capability bits in mpic.c PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c PCI: Add #defines for Hypertransport MSI fields PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap() pci: Introduce pci_find_present PCI: pcieport-driver: remove invalid warning message rpaphp: compiler warning cleanup PCI quirks: remove redundant check ...
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h3
-rw-r--r--include/linux/Kbuild2
-rw-r--r--include/linux/ioport.h3
-rw-r--r--include/linux/pci.h29
-rw-r--r--include/linux/pci_ids.h4
-rw-r--r--include/linux/pci_regs.h19
6 files changed, 54 insertions, 6 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 1587121730c5..9fcc8d9fbb14 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -35,6 +35,9 @@
35 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \ 35 VMLINUX_SYMBOL(__start_pci_fixups_enable) = .; \
36 *(.pci_fixup_enable) \ 36 *(.pci_fixup_enable) \
37 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \ 37 VMLINUX_SYMBOL(__end_pci_fixups_enable) = .; \
38 VMLINUX_SYMBOL(__start_pci_fixups_resume) = .; \
39 *(.pci_fixup_resume) \
40 VMLINUX_SYMBOL(__end_pci_fixups_resume) = .; \
38 } \ 41 } \
39 \ 42 \
40 /* RapidIO route ops */ \ 43 /* RapidIO route ops */ \
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index a1b04d8a1d01..68dd42b9bac7 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -119,7 +119,6 @@ header-y += nfs4_mount.h
119header-y += nfs_mount.h 119header-y += nfs_mount.h
120header-y += oom.h 120header-y += oom.h
121header-y += param.h 121header-y += param.h
122header-y += pci_ids.h
123header-y += pci_regs.h 122header-y += pci_regs.h
124header-y += personality.h 123header-y += personality.h
125header-y += pfkeyv2.h 124header-y += pfkeyv2.h
@@ -162,7 +161,6 @@ header-y += vt.h
162header-y += wireless.h 161header-y += wireless.h
163header-y += xattr.h 162header-y += xattr.h
164header-y += x25.h 163header-y += x25.h
165header-y += zorro_ids.h
166 164
167unifdef-y += acct.h 165unifdef-y += acct.h
168unifdef-y += adb.h 166unifdef-y += adb.h
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index cf8696d4a138..15228d79c5bc 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -91,6 +91,9 @@ struct resource_list {
91#define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ 91#define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */
92#define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ 92#define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */
93 93
94/* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */
95#define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */
96
94/* PC/ISA/whatever - the normal PC address spaces: IO and memory */ 97/* PC/ISA/whatever - the normal PC address spaces: IO and memory */
95extern struct resource ioport_resource; 98extern struct resource ioport_resource;
96extern struct resource iomem_resource; 99extern struct resource iomem_resource;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 01c707261f9c..f3c617eabd8d 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -20,9 +20,6 @@
20/* Include the pci register defines */ 20/* Include the pci register defines */
21#include <linux/pci_regs.h> 21#include <linux/pci_regs.h>
22 22
23/* Include the ID list */
24#include <linux/pci_ids.h>
25
26/* 23/*
27 * The PCI interface treats multi-function devices as independent 24 * The PCI interface treats multi-function devices as independent
28 * devices. The slot/function address of each device is encoded 25 * devices. The slot/function address of each device is encoded
@@ -54,6 +51,9 @@
54#include <asm/atomic.h> 51#include <asm/atomic.h>
55#include <linux/device.h> 52#include <linux/device.h>
56 53
54/* Include the ID list */
55#include <linux/pci_ids.h>
56
57/* File state for mmap()s on /proc/bus/pci/X/Y */ 57/* File state for mmap()s on /proc/bus/pci/X/Y */
58enum pci_mmap_state { 58enum pci_mmap_state {
59 pci_mmap_io, 59 pci_mmap_io,
@@ -396,6 +396,21 @@ struct pci_driver {
396 */ 396 */
397#define pci_module_init pci_register_driver 397#define pci_module_init pci_register_driver
398 398
399/**
400 * PCI_VDEVICE - macro used to describe a specific pci device in short form
401 * @vend: the vendor name
402 * @dev: the 16 bit PCI Device ID
403 *
404 * This macro is used to create a struct pci_device_id that matches a
405 * specific PCI device. The subvendor, and subdevice fields will be set
406 * to PCI_ANY_ID. The macro allows the next field to follow as the device
407 * private data.
408 */
409
410#define PCI_VDEVICE(vendor, device) \
411 PCI_VENDOR_ID_##vendor, (device), \
412 PCI_ANY_ID, PCI_ANY_ID, 0, 0
413
399/* these external functions are only available when PCI support is enabled */ 414/* these external functions are only available when PCI support is enabled */
400#ifdef CONFIG_PCI 415#ifdef CONFIG_PCI
401 416
@@ -454,6 +469,8 @@ struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn);
454int pci_find_capability (struct pci_dev *dev, int cap); 469int pci_find_capability (struct pci_dev *dev, int cap);
455int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); 470int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
456int pci_find_ext_capability (struct pci_dev *dev, int cap); 471int pci_find_ext_capability (struct pci_dev *dev, int cap);
472int pci_find_ht_capability (struct pci_dev *dev, int ht_cap);
473int pci_find_next_ht_capability (struct pci_dev *dev, int pos, int ht_cap);
457struct pci_bus *pci_find_next_bus(const struct pci_bus *from); 474struct pci_bus *pci_find_next_bus(const struct pci_bus *from);
458 475
459struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, 476struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device,
@@ -468,6 +485,7 @@ struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn);
468struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn); 485struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn);
469struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); 486struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from);
470int pci_dev_present(const struct pci_device_id *ids); 487int pci_dev_present(const struct pci_device_id *ids);
488const struct pci_device_id *pci_find_present(const struct pci_device_id *ids);
471 489
472int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val); 490int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
473int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val); 491int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val);
@@ -681,6 +699,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *
681{ return NULL; } 699{ return NULL; }
682 700
683#define pci_dev_present(ids) (0) 701#define pci_dev_present(ids) (0)
702#define pci_find_present(ids) (NULL)
684#define pci_dev_put(dev) do { } while (0) 703#define pci_dev_put(dev) do { } while (0)
685 704
686static inline void pci_set_master(struct pci_dev *dev) { } 705static inline void pci_set_master(struct pci_dev *dev) { }
@@ -783,6 +802,7 @@ enum pci_fixup_pass {
783 pci_fixup_header, /* After reading configuration header */ 802 pci_fixup_header, /* After reading configuration header */
784 pci_fixup_final, /* Final phase of device fixups */ 803 pci_fixup_final, /* Final phase of device fixups */
785 pci_fixup_enable, /* pci_enable_device() time */ 804 pci_fixup_enable, /* pci_enable_device() time */
805 pci_fixup_resume, /* pci_enable_device() time */
786}; 806};
787 807
788/* Anonymous variables would be nice... */ 808/* Anonymous variables would be nice... */
@@ -801,6 +821,9 @@ enum pci_fixup_pass {
801#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \ 821#define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook) \
802 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \ 822 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable, \
803 vendor##device##hook, vendor, device, hook) 823 vendor##device##hook, vendor, device, hook)
824#define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook) \
825 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume, \
826 resume##vendor##device##hook, vendor, device, hook)
804 827
805 828
806void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 829void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 95c1e74afebc..778e701eff30 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -104,6 +104,10 @@
104#define PCI_CLASS_SERIAL_FIBER 0x0c04 104#define PCI_CLASS_SERIAL_FIBER 0x0c04
105#define PCI_CLASS_SERIAL_SMBUS 0x0c05 105#define PCI_CLASS_SERIAL_SMBUS 0x0c05
106 106
107#define PCI_BASE_CLASS_WIRELESS 0x0d
108#define PCI_CLASS_WIRELESS_RF_CONTROLLER 0x0d10
109#define PCI_CLASS_WIRELESS_WHCI 0x0d1010
110
107#define PCI_BASE_CLASS_INTELLIGENT 0x0e 111#define PCI_BASE_CLASS_INTELLIGENT 0x0e
108#define PCI_CLASS_INTELLIGENT_I2O 0x0e00 112#define PCI_CLASS_INTELLIGENT_I2O 0x0e00
109 113
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 064b1dc71c22..7a6d34ee5ab1 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -475,15 +475,32 @@
475#define PCI_PWR_CAP 12 /* Capability */ 475#define PCI_PWR_CAP 12 /* Capability */
476#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */ 476#define PCI_PWR_CAP_BUDGET(x) ((x) & 1) /* Included in system budget */
477 477
478/* Hypertransport sub capability types */ 478/*
479 * Hypertransport sub capability types
480 *
481 * Unfortunately there are both 3 bit and 5 bit capability types defined
482 * in the HT spec, catering for that is a little messy. You probably don't
483 * want to use these directly, just use pci_find_ht_capability() and it
484 * will do the right thing for you.
485 */
486#define HT_3BIT_CAP_MASK 0xE0
479#define HT_CAPTYPE_SLAVE 0x00 /* Slave/Primary link configuration */ 487#define HT_CAPTYPE_SLAVE 0x00 /* Slave/Primary link configuration */
480#define HT_CAPTYPE_HOST 0x20 /* Host/Secondary link configuration */ 488#define HT_CAPTYPE_HOST 0x20 /* Host/Secondary link configuration */
489
490#define HT_5BIT_CAP_MASK 0xF8
481#define HT_CAPTYPE_IRQ 0x80 /* IRQ Configuration */ 491#define HT_CAPTYPE_IRQ 0x80 /* IRQ Configuration */
482#define HT_CAPTYPE_REMAPPING_40 0xA0 /* 40 bit address remapping */ 492#define HT_CAPTYPE_REMAPPING_40 0xA0 /* 40 bit address remapping */
483#define HT_CAPTYPE_REMAPPING_64 0xA2 /* 64 bit address remapping */ 493#define HT_CAPTYPE_REMAPPING_64 0xA2 /* 64 bit address remapping */
484#define HT_CAPTYPE_UNITID_CLUMP 0x90 /* Unit ID clumping */ 494#define HT_CAPTYPE_UNITID_CLUMP 0x90 /* Unit ID clumping */
485#define HT_CAPTYPE_EXTCONF 0x98 /* Extended Configuration Space Access */ 495#define HT_CAPTYPE_EXTCONF 0x98 /* Extended Configuration Space Access */
486#define HT_CAPTYPE_MSI_MAPPING 0xA8 /* MSI Mapping Capability */ 496#define HT_CAPTYPE_MSI_MAPPING 0xA8 /* MSI Mapping Capability */
497#define HT_MSI_FLAGS 0x02 /* Offset to flags */
498#define HT_MSI_FLAGS_ENABLE 0x1 /* Mapping enable */
499#define HT_MSI_FLAGS_FIXED 0x2 /* Fixed mapping only */
500#define HT_MSI_FIXED_ADDR 0x00000000FEE00000ULL /* Fixed addr */
501#define HT_MSI_ADDR_LO 0x04 /* Offset to low addr bits */
502#define HT_MSI_ADDR_LO_MASK 0xFFF00000 /* Low address bit mask */
503#define HT_MSI_ADDR_HI 0x08 /* Offset to high addr bits */
487#define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */ 504#define HT_CAPTYPE_DIRECT_ROUTE 0xB0 /* Direct routing configuration */
488#define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */ 505#define HT_CAPTYPE_VCSET 0xB8 /* Virtual Channel configuration */
489#define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */ 506#define HT_CAPTYPE_ERROR_RETRY 0xC0 /* Retry on error configuration */