aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-26 13:35:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-26 13:35:27 -0500
commit68c6b859846bd078b37c6ca5f3882032f129e72d (patch)
treee243605957f1cab3532d57d86ea87355c10b6385 /include
parenta4a47bc03fe520e95e0c4212bf97c86545fb14f9 (diff)
parentbb8d41330ce27edb91adb6922d3f8e1a8923f727 (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (48 commits) x86/PCI: Prevent mmconfig memory corruption ACPI: Use GPE reference counting to support shared GPEs x86/PCI: use host bridge _CRS info by default on 2008 and newer machines PCI: augment bus resource table with a list PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs PCI: read bridge windows before filling in subtractive decode resources PCI: split up pci_read_bridge_bases() PCIe PME: use pci_pcie_cap() PCI PM: Run-time callbacks for PCI bus type PCIe PME: use pci_is_pcie() PCI / ACPI / PM: Platform support for PCI PME wake-up ACPI / ACPICA: Multiple system notify handlers per device ACPI / PM: Add more run-time wake-up fields ACPI: Use GPE reference counting to support shared GPEs PCI PM: Make it possible to force using INTx for PCIe PME signaling PCI PM: PCIe PME root port service driver PCI PM: Add function for checking PME status of devices PCI: mark is_pcie obsolete PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges PCI: pciehp: second try to get big range for pcie devices ...
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_bus.h6
-rw-r--r--include/acpi/acpi_drivers.h1
-rw-r--r--include/acpi/acpixf.h6
-rw-r--r--include/acpi/actypes.h28
-rw-r--r--include/linux/ioport.h7
-rw-r--r--include/linux/pci-acpi.h7
-rw-r--r--include/linux/pci.h109
-rw-r--r--include/linux/pci_hotplug.h41
-rw-r--r--include/linux/pci_ids.h3
9 files changed, 122 insertions, 86 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 3cd9ccdcbd8f..54508ccea023 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -242,6 +242,8 @@ struct acpi_device_perf {
242struct acpi_device_wakeup_flags { 242struct acpi_device_wakeup_flags {
243 u8 valid:1; /* Can successfully enable wakeup? */ 243 u8 valid:1; /* Can successfully enable wakeup? */
244 u8 run_wake:1; /* Run-Wake GPE devices */ 244 u8 run_wake:1; /* Run-Wake GPE devices */
245 u8 always_enabled:1; /* Run-wake devices that are always enabled */
246 u8 notifier_present:1; /* Wake-up notify handler has been installed */
245}; 247};
246 248
247struct acpi_device_wakeup_state { 249struct acpi_device_wakeup_state {
@@ -256,6 +258,7 @@ struct acpi_device_wakeup {
256 struct acpi_device_wakeup_state state; 258 struct acpi_device_wakeup_state state;
257 struct acpi_device_wakeup_flags flags; 259 struct acpi_device_wakeup_flags flags;
258 int prepare_count; 260 int prepare_count;
261 int run_wake_count;
259}; 262};
260 263
261/* Device */ 264/* Device */
@@ -386,6 +389,9 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
386struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); 389struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
387#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) 390#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
388 391
392int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
393int acpi_disable_wakeup_device_power(struct acpi_device *dev);
394
389#ifdef CONFIG_PM_SLEEP 395#ifdef CONFIG_PM_SLEEP
390int acpi_pm_device_sleep_state(struct device *, int *); 396int acpi_pm_device_sleep_state(struct device *, int *);
391int acpi_pm_device_sleep_wake(struct device *, bool); 397int acpi_pm_device_sleep_wake(struct device *, bool);
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index f4906f6568d4..3a4767c01c5f 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -104,6 +104,7 @@ int acpi_pci_bind_root(struct acpi_device *device);
104 104
105struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, 105struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
106 int bus); 106 int bus);
107void pci_acpi_crs_quirks(void);
107 108
108/* -------------------------------------------------------------------------- 109/* --------------------------------------------------------------------------
109 Processor 110 Processor
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 86e9735a96bd..3988f93b9c66 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -281,11 +281,11 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status);
281/* 281/*
282 * GPE Interfaces 282 * GPE Interfaces
283 */ 283 */
284acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); 284acpi_status acpi_set_gpe(acpi_handle gpe_device, u32 gpe_number, u8 action);
285 285
286acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); 286acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type);
287 287
288acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); 288acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u8 type);
289 289
290acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags); 290acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags);
291 291
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 153f12dc3373..73af40863371 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -668,15 +668,16 @@ typedef u32 acpi_event_status;
668 668
669/* 669/*
670 * GPE info flags - Per GPE 670 * GPE info flags - Per GPE
671 * +-+-+-+---+---+-+ 671 * +-+-+-+---+-+-+-+
672 * |7|6|5|4:3|2:1|0| 672 * |7|6|5|4:3|2|1|0|
673 * +-+-+-+---+---+-+ 673 * +-+-+-+---+-+-+-+
674 * | | | | | | 674 * | | | | | | |
675 * | | | | | +--- Interrupt type: Edge or Level Triggered 675 * | | | | | | +--- Interrupt type: Edge or Level Triggered
676 * | | | | +--- Type: Wake-only, Runtime-only, or wake/runtime 676 * | | | | | +--- GPE can wake the system
677 * | | | | +--- Unused
677 * | | | +--- Type of dispatch -- to method, handler, or none 678 * | | | +--- Type of dispatch -- to method, handler, or none
678 * | | +--- Enabled for runtime? 679 * | | +--- Unused
679 * | +--- Enabled for wake? 680 * | +--- Unused
680 * +--- Unused 681 * +--- Unused
681 */ 682 */
682#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 683#define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01
@@ -687,22 +688,13 @@ typedef u32 acpi_event_status;
687#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06 688#define ACPI_GPE_TYPE_WAKE_RUN (u8) 0x06
688#define ACPI_GPE_TYPE_WAKE (u8) 0x02 689#define ACPI_GPE_TYPE_WAKE (u8) 0x02
689#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */ 690#define ACPI_GPE_TYPE_RUNTIME (u8) 0x04 /* Default */
691#define ACPI_GPE_CAN_WAKE (u8) 0x02
690 692
691#define ACPI_GPE_DISPATCH_MASK (u8) 0x18 693#define ACPI_GPE_DISPATCH_MASK (u8) 0x18
692#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08 694#define ACPI_GPE_DISPATCH_HANDLER (u8) 0x08
693#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10 695#define ACPI_GPE_DISPATCH_METHOD (u8) 0x10
694#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */ 696#define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 /* Default */
695 697
696#define ACPI_GPE_RUN_ENABLE_MASK (u8) 0x20
697#define ACPI_GPE_RUN_ENABLED (u8) 0x20
698#define ACPI_GPE_RUN_DISABLED (u8) 0x00 /* Default */
699
700#define ACPI_GPE_WAKE_ENABLE_MASK (u8) 0x40
701#define ACPI_GPE_WAKE_ENABLED (u8) 0x40
702#define ACPI_GPE_WAKE_DISABLED (u8) 0x00 /* Default */
703
704#define ACPI_GPE_ENABLE_MASK (u8) 0x60 /* Both run/wake */
705
706/* 698/*
707 * Flags for GPE and Lock interfaces 699 * Flags for GPE and Lock interfaces
708 */ 700 */
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 7129504e053d..dda98410d588 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -112,6 +112,7 @@ extern struct resource iomem_resource;
112 112
113extern int request_resource(struct resource *root, struct resource *new); 113extern int request_resource(struct resource *root, struct resource *new);
114extern int release_resource(struct resource *new); 114extern int release_resource(struct resource *new);
115void release_child_resources(struct resource *new);
115extern void reserve_region_with_split(struct resource *root, 116extern void reserve_region_with_split(struct resource *root,
116 resource_size_t start, resource_size_t end, 117 resource_size_t start, resource_size_t end,
117 const char *name); 118 const char *name);
@@ -120,8 +121,10 @@ extern void insert_resource_expand_to_fit(struct resource *root, struct resource
120extern int allocate_resource(struct resource *root, struct resource *new, 121extern int allocate_resource(struct resource *root, struct resource *new,
121 resource_size_t size, resource_size_t min, 122 resource_size_t size, resource_size_t min,
122 resource_size_t max, resource_size_t align, 123 resource_size_t max, resource_size_t align,
123 void (*alignf)(void *, struct resource *, 124 resource_size_t (*alignf)(void *,
124 resource_size_t, resource_size_t), 125 const struct resource *,
126 resource_size_t,
127 resource_size_t),
125 void *alignf_data); 128 void *alignf_data);
126int adjust_resource(struct resource *res, resource_size_t start, 129int adjust_resource(struct resource *res, resource_size_t start,
127 resource_size_t size); 130 resource_size_t size);
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 93a7c08f869d..c8b6473c5f42 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -11,6 +11,13 @@
11#include <linux/acpi.h> 11#include <linux/acpi.h>
12 12
13#ifdef CONFIG_ACPI 13#ifdef CONFIG_ACPI
14extern acpi_status pci_acpi_add_bus_pm_notifier(struct acpi_device *dev,
15 struct pci_bus *pci_bus);
16extern acpi_status pci_acpi_remove_bus_pm_notifier(struct acpi_device *dev);
17extern acpi_status pci_acpi_add_pm_notifier(struct acpi_device *dev,
18 struct pci_dev *pci_dev);
19extern acpi_status pci_acpi_remove_pm_notifier(struct acpi_device *dev);
20
14static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) 21static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev)
15{ 22{
16 struct pci_bus *pbus = pdev->bus; 23 struct pci_bus *pbus = pdev->bus;
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c1968f464c38..e19a69613d8f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -187,6 +187,33 @@ enum pci_bus_flags {
187 PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2, 187 PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2,
188}; 188};
189 189
190/* Based on the PCI Hotplug Spec, but some values are made up by us */
191enum pci_bus_speed {
192 PCI_SPEED_33MHz = 0x00,
193 PCI_SPEED_66MHz = 0x01,
194 PCI_SPEED_66MHz_PCIX = 0x02,
195 PCI_SPEED_100MHz_PCIX = 0x03,
196 PCI_SPEED_133MHz_PCIX = 0x04,
197 PCI_SPEED_66MHz_PCIX_ECC = 0x05,
198 PCI_SPEED_100MHz_PCIX_ECC = 0x06,
199 PCI_SPEED_133MHz_PCIX_ECC = 0x07,
200 PCI_SPEED_66MHz_PCIX_266 = 0x09,
201 PCI_SPEED_100MHz_PCIX_266 = 0x0a,
202 PCI_SPEED_133MHz_PCIX_266 = 0x0b,
203 AGP_UNKNOWN = 0x0c,
204 AGP_1X = 0x0d,
205 AGP_2X = 0x0e,
206 AGP_4X = 0x0f,
207 AGP_8X = 0x10,
208 PCI_SPEED_66MHz_PCIX_533 = 0x11,
209 PCI_SPEED_100MHz_PCIX_533 = 0x12,
210 PCI_SPEED_133MHz_PCIX_533 = 0x13,
211 PCIE_SPEED_2_5GT = 0x14,
212 PCIE_SPEED_5_0GT = 0x15,
213 PCIE_SPEED_8_0GT = 0x16,
214 PCI_SPEED_UNKNOWN = 0xff,
215};
216
190struct pci_cap_saved_state { 217struct pci_cap_saved_state {
191 struct hlist_node next; 218 struct hlist_node next;
192 char cap_nr; 219 char cap_nr;
@@ -239,6 +266,7 @@ struct pci_dev {
239 configuration space */ 266 configuration space */
240 unsigned int pme_support:5; /* Bitmask of states from which PME# 267 unsigned int pme_support:5; /* Bitmask of states from which PME#
241 can be generated */ 268 can be generated */
269 unsigned int pme_interrupt:1;
242 unsigned int d1_support:1; /* Low power state D1 is supported */ 270 unsigned int d1_support:1; /* Low power state D1 is supported */
243 unsigned int d2_support:1; /* Low power state D2 is supported */ 271 unsigned int d2_support:1; /* Low power state D2 is supported */
244 unsigned int no_d1d2:1; /* Only allow D0 and D3 */ 272 unsigned int no_d1d2:1; /* Only allow D0 and D3 */
@@ -275,7 +303,8 @@ struct pci_dev {
275 unsigned int msix_enabled:1; 303 unsigned int msix_enabled:1;
276 unsigned int ari_enabled:1; /* ARI forwarding */ 304 unsigned int ari_enabled:1; /* ARI forwarding */
277 unsigned int is_managed:1; 305 unsigned int is_managed:1;
278 unsigned int is_pcie:1; 306 unsigned int is_pcie:1; /* Obsolete. Will be removed.
307 Use pci_is_pcie() instead */
279 unsigned int needs_freset:1; /* Dev requires fundamental reset */ 308 unsigned int needs_freset:1; /* Dev requires fundamental reset */
280 unsigned int state_saved:1; 309 unsigned int state_saved:1;
281 unsigned int is_physfn:1; 310 unsigned int is_physfn:1;
@@ -335,9 +364,26 @@ static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
335 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space); 364 hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
336} 365}
337 366
338#ifndef PCI_BUS_NUM_RESOURCES 367/*
339#define PCI_BUS_NUM_RESOURCES 16 368 * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
340#endif 369 * to P2P or CardBus bridge windows) go in a table. Additional ones (for
370 * buses below host bridges or subtractive decode bridges) go in the list.
371 * Use pci_bus_for_each_resource() to iterate through all the resources.
372 */
373
374/*
375 * PCI_SUBTRACTIVE_DECODE means the bridge forwards the window implicitly
376 * and there's no way to program the bridge with the details of the window.
377 * This does not apply to ACPI _CRS windows, even with the _DEC subtractive-
378 * decode bit set, because they are explicit and can be programmed with _SRS.
379 */
380#define PCI_SUBTRACTIVE_DECODE 0x1
381
382struct pci_bus_resource {
383 struct list_head list;
384 struct resource *res;
385 unsigned int flags;
386};
341 387
342#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */ 388#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */
343 389
@@ -348,8 +394,8 @@ struct pci_bus {
348 struct list_head devices; /* list of devices on this bus */ 394 struct list_head devices; /* list of devices on this bus */
349 struct pci_dev *self; /* bridge device as seen by parent */ 395 struct pci_dev *self; /* bridge device as seen by parent */
350 struct list_head slots; /* list of slots on this bus */ 396 struct list_head slots; /* list of slots on this bus */
351 struct resource *resource[PCI_BUS_NUM_RESOURCES]; 397 struct resource *resource[PCI_BRIDGE_RESOURCE_NUM];
352 /* address space routed to this bus */ 398 struct list_head resources; /* address space routed to this bus */
353 399
354 struct pci_ops *ops; /* configuration access functions */ 400 struct pci_ops *ops; /* configuration access functions */
355 void *sysdata; /* hook for sys-specific extension */ 401 void *sysdata; /* hook for sys-specific extension */
@@ -359,6 +405,8 @@ struct pci_bus {
359 unsigned char primary; /* number of primary bridge */ 405 unsigned char primary; /* number of primary bridge */
360 unsigned char secondary; /* number of secondary bridge */ 406 unsigned char secondary; /* number of secondary bridge */
361 unsigned char subordinate; /* max number of subordinate buses */ 407 unsigned char subordinate; /* max number of subordinate buses */
408 unsigned char max_bus_speed; /* enum pci_bus_speed */
409 unsigned char cur_bus_speed; /* enum pci_bus_speed */
362 410
363 char name[48]; 411 char name[48];
364 412
@@ -563,7 +611,8 @@ int __must_check pcibios_enable_device(struct pci_dev *, int mask);
563char *pcibios_setup(char *str); 611char *pcibios_setup(char *str);
564 612
565/* Used only when drivers/pci/setup.c is used */ 613/* Used only when drivers/pci/setup.c is used */
566void pcibios_align_resource(void *, struct resource *, resource_size_t, 614resource_size_t pcibios_align_resource(void *, const struct resource *,
615 resource_size_t,
567 resource_size_t); 616 resource_size_t);
568void pcibios_update_irq(struct pci_dev *, int irq); 617void pcibios_update_irq(struct pci_dev *, int irq);
569 618
@@ -589,6 +638,7 @@ struct pci_bus *pci_create_bus(struct device *parent, int bus,
589 struct pci_ops *ops, void *sysdata); 638 struct pci_ops *ops, void *sysdata);
590struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, 639struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
591 int busnr); 640 int busnr);
641void pcie_update_link_speed(struct pci_bus *bus, u16 link_status);
592struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr, 642struct pci_slot *pci_create_slot(struct pci_bus *parent, int slot_nr,
593 const char *name, 643 const char *name,
594 struct hotplug_slot *hotplug); 644 struct hotplug_slot *hotplug);
@@ -615,12 +665,6 @@ extern void pci_sort_breadthfirst(void);
615 665
616/* Generic PCI functions exported to card drivers */ 666/* Generic PCI functions exported to card drivers */
617 667
618#ifdef CONFIG_PCI_LEGACY
619struct pci_dev __deprecated *pci_find_device(unsigned int vendor,
620 unsigned int device,
621 struct pci_dev *from);
622#endif /* CONFIG_PCI_LEGACY */
623
624enum pci_lost_interrupt_reason { 668enum pci_lost_interrupt_reason {
625 PCI_LOST_IRQ_NO_INFORMATION = 0, 669 PCI_LOST_IRQ_NO_INFORMATION = 0,
626 PCI_LOST_IRQ_DISABLE_MSI, 670 PCI_LOST_IRQ_DISABLE_MSI,
@@ -750,11 +794,19 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state);
750pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); 794pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state);
751bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); 795bool pci_pme_capable(struct pci_dev *dev, pci_power_t state);
752void pci_pme_active(struct pci_dev *dev, bool enable); 796void pci_pme_active(struct pci_dev *dev, bool enable);
753int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); 797int __pci_enable_wake(struct pci_dev *dev, pci_power_t state,
798 bool runtime, bool enable);
754int pci_wake_from_d3(struct pci_dev *dev, bool enable); 799int pci_wake_from_d3(struct pci_dev *dev, bool enable);
755pci_power_t pci_target_state(struct pci_dev *dev); 800pci_power_t pci_target_state(struct pci_dev *dev);
756int pci_prepare_to_sleep(struct pci_dev *dev); 801int pci_prepare_to_sleep(struct pci_dev *dev);
757int pci_back_from_sleep(struct pci_dev *dev); 802int pci_back_from_sleep(struct pci_dev *dev);
803bool pci_dev_run_wake(struct pci_dev *dev);
804
805static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state,
806 bool enable)
807{
808 return __pci_enable_wake(dev, state, false, enable);
809}
758 810
759/* For use by arch with custom probe code */ 811/* For use by arch with custom probe code */
760void set_pcie_port_type(struct pci_dev *pdev); 812void set_pcie_port_type(struct pci_dev *pdev);
@@ -776,6 +828,7 @@ void pci_bus_assign_resources(const struct pci_bus *bus);
776void pci_bus_size_bridges(struct pci_bus *bus); 828void pci_bus_size_bridges(struct pci_bus *bus);
777int pci_claim_resource(struct pci_dev *, int); 829int pci_claim_resource(struct pci_dev *, int);
778void pci_assign_unassigned_resources(void); 830void pci_assign_unassigned_resources(void);
831void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
779void pdev_enable_device(struct pci_dev *); 832void pdev_enable_device(struct pci_dev *);
780void pdev_sort_resources(struct pci_dev *, struct resource_list *); 833void pdev_sort_resources(struct pci_dev *, struct resource_list *);
781int pci_enable_resources(struct pci_dev *, int mask); 834int pci_enable_resources(struct pci_dev *, int mask);
@@ -793,12 +846,23 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *);
793void pci_release_selected_regions(struct pci_dev *, int); 846void pci_release_selected_regions(struct pci_dev *, int);
794 847
795/* drivers/pci/bus.c */ 848/* drivers/pci/bus.c */
849void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags);
850struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
851void pci_bus_remove_resources(struct pci_bus *bus);
852
853#define pci_bus_for_each_resource(bus, res, i) \
854 for (i = 0; \
855 (res = pci_bus_resource_n(bus, i)) || i < PCI_BRIDGE_RESOURCE_NUM; \
856 i++)
857
796int __must_check pci_bus_alloc_resource(struct pci_bus *bus, 858int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
797 struct resource *res, resource_size_t size, 859 struct resource *res, resource_size_t size,
798 resource_size_t align, resource_size_t min, 860 resource_size_t align, resource_size_t min,
799 unsigned int type_mask, 861 unsigned int type_mask,
800 void (*alignf)(void *, struct resource *, 862 resource_size_t (*alignf)(void *,
801 resource_size_t, resource_size_t), 863 const struct resource *,
864 resource_size_t,
865 resource_size_t),
802 void *alignf_data); 866 void *alignf_data);
803void pci_enable_bridges(struct pci_bus *bus); 867void pci_enable_bridges(struct pci_bus *bus);
804 868
@@ -977,13 +1041,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
977_PCI_NOP_ALL(read, *) 1041_PCI_NOP_ALL(read, *)
978_PCI_NOP_ALL(write,) 1042_PCI_NOP_ALL(write,)
979 1043
980static inline struct pci_dev *pci_find_device(unsigned int vendor,
981 unsigned int device,
982 struct pci_dev *from)
983{
984 return NULL;
985}
986
987static inline struct pci_dev *pci_get_device(unsigned int vendor, 1044static inline struct pci_dev *pci_get_device(unsigned int vendor,
988 unsigned int device, 1045 unsigned int device,
989 struct pci_dev *from) 1046 struct pci_dev *from)
@@ -1241,8 +1298,12 @@ enum pci_fixup_pass {
1241 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \ 1298 DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend, \
1242 suspend##vendor##device##hook, vendor, device, hook) 1299 suspend##vendor##device##hook, vendor, device, hook)
1243 1300
1244 1301#ifdef CONFIG_PCI_QUIRKS
1245void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 1302void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
1303#else
1304static inline void pci_fixup_device(enum pci_fixup_pass pass,
1305 struct pci_dev *dev) {}
1306#endif
1246 1307
1247void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); 1308void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
1248void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); 1309void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h
index 652ba797696d..5d09cbafa7db 100644
--- a/include/linux/pci_hotplug.h
+++ b/include/linux/pci_hotplug.h
@@ -28,26 +28,6 @@
28#ifndef _PCI_HOTPLUG_H 28#ifndef _PCI_HOTPLUG_H
29#define _PCI_HOTPLUG_H 29#define _PCI_HOTPLUG_H
30 30
31
32/* These values come from the PCI Hotplug Spec */
33enum pci_bus_speed {
34 PCI_SPEED_33MHz = 0x00,
35 PCI_SPEED_66MHz = 0x01,
36 PCI_SPEED_66MHz_PCIX = 0x02,
37 PCI_SPEED_100MHz_PCIX = 0x03,
38 PCI_SPEED_133MHz_PCIX = 0x04,
39 PCI_SPEED_66MHz_PCIX_ECC = 0x05,
40 PCI_SPEED_100MHz_PCIX_ECC = 0x06,
41 PCI_SPEED_133MHz_PCIX_ECC = 0x07,
42 PCI_SPEED_66MHz_PCIX_266 = 0x09,
43 PCI_SPEED_100MHz_PCIX_266 = 0x0a,
44 PCI_SPEED_133MHz_PCIX_266 = 0x0b,
45 PCI_SPEED_66MHz_PCIX_533 = 0x11,
46 PCI_SPEED_100MHz_PCIX_533 = 0x12,
47 PCI_SPEED_133MHz_PCIX_533 = 0x13,
48 PCI_SPEED_UNKNOWN = 0xff,
49};
50
51/* These values come from the PCI Express Spec */ 31/* These values come from the PCI Express Spec */
52enum pcie_link_width { 32enum pcie_link_width {
53 PCIE_LNK_WIDTH_RESRV = 0x00, 33 PCIE_LNK_WIDTH_RESRV = 0x00,
@@ -61,12 +41,6 @@ enum pcie_link_width {
61 PCIE_LNK_WIDTH_UNKNOWN = 0xFF, 41 PCIE_LNK_WIDTH_UNKNOWN = 0xFF,
62}; 42};
63 43
64enum pcie_link_speed {
65 PCIE_2_5GB = 0x14,
66 PCIE_5_0GB = 0x15,
67 PCIE_LNK_SPEED_UNKNOWN = 0xFF,
68};
69
70/** 44/**
71 * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use 45 * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use
72 * @owner: The module owner of this structure 46 * @owner: The module owner of this structure
@@ -89,12 +63,6 @@ enum pcie_link_speed {
89 * @get_adapter_status: Called to get see if an adapter is present in the slot or not. 63 * @get_adapter_status: Called to get see if an adapter is present in the slot or not.
90 * If this field is NULL, the value passed in the struct hotplug_slot_info 64 * If this field is NULL, the value passed in the struct hotplug_slot_info
91 * will be used when this value is requested by a user. 65 * will be used when this value is requested by a user.
92 * @get_max_bus_speed: Called to get the max bus speed for a slot.
93 * If this field is NULL, the value passed in the struct hotplug_slot_info
94 * will be used when this value is requested by a user.
95 * @get_cur_bus_speed: Called to get the current bus speed for a slot.
96 * If this field is NULL, the value passed in the struct hotplug_slot_info
97 * will be used when this value is requested by a user.
98 * 66 *
99 * The table of function pointers that is passed to the hotplug pci core by a 67 * The table of function pointers that is passed to the hotplug pci core by a
100 * hotplug pci driver. These functions are called by the hotplug pci core when 68 * hotplug pci driver. These functions are called by the hotplug pci core when
@@ -112,17 +80,14 @@ struct hotplug_slot_ops {
112 int (*get_attention_status) (struct hotplug_slot *slot, u8 *value); 80 int (*get_attention_status) (struct hotplug_slot *slot, u8 *value);
113 int (*get_latch_status) (struct hotplug_slot *slot, u8 *value); 81 int (*get_latch_status) (struct hotplug_slot *slot, u8 *value);
114 int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value); 82 int (*get_adapter_status) (struct hotplug_slot *slot, u8 *value);
115 int (*get_max_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value);
116 int (*get_cur_bus_speed) (struct hotplug_slot *slot, enum pci_bus_speed *value);
117}; 83};
118 84
119/** 85/**
120 * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot 86 * struct hotplug_slot_info - used to notify the hotplug pci core of the state of the slot
121 * @power: if power is enabled or not (1/0) 87 * @power_status: if power is enabled or not (1/0)
122 * @attention_status: if the attention light is enabled or not (1/0) 88 * @attention_status: if the attention light is enabled or not (1/0)
123 * @latch_status: if the latch (if any) is open or closed (1/0) 89 * @latch_status: if the latch (if any) is open or closed (1/0)
124 * @adapter_present: if there is a pci board present in the slot or not (1/0) 90 * @adapter_status: if there is a pci board present in the slot or not (1/0)
125 * @address: (domain << 16 | bus << 8 | dev)
126 * 91 *
127 * Used to notify the hotplug pci core of the status of a specific slot. 92 * Used to notify the hotplug pci core of the status of a specific slot.
128 */ 93 */
@@ -131,8 +96,6 @@ struct hotplug_slot_info {
131 u8 attention_status; 96 u8 attention_status;
132 u8 latch_status; 97 u8 latch_status;
133 u8 adapter_status; 98 u8 adapter_status;
134 enum pci_bus_speed max_bus_speed;
135 enum pci_bus_speed cur_bus_speed;
136}; 99};
137 100
138/** 101/**
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index cca8a044e2b6..0be824320580 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2417,6 +2417,9 @@
2417#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 2417#define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21
2418#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 2418#define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30
2419#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 2419#define PCI_DEVICE_ID_INTEL_IOAT 0x1a38
2420#define PCI_DEVICE_ID_INTEL_CPT_SMBUS 0x1c22
2421#define PCI_DEVICE_ID_INTEL_CPT_LPC1 0x1c42
2422#define PCI_DEVICE_ID_INTEL_CPT_LPC2 0x1c43
2420#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 2423#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410
2421#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 2424#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411
2422#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 2425#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413