aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 086a0e5a6318..5e84f2e8d54c 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -111,7 +111,8 @@ enum pcie_reset_state {
111 111
112typedef unsigned short __bitwise pci_bus_flags_t; 112typedef unsigned short __bitwise pci_bus_flags_t;
113enum pci_bus_flags { 113enum pci_bus_flags {
114 PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1, 114 PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
115 PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2,
115}; 116};
116 117
117struct pci_cap_saved_state { 118struct pci_cap_saved_state {
@@ -138,6 +139,7 @@ struct pci_dev {
138 unsigned short subsystem_vendor; 139 unsigned short subsystem_vendor;
139 unsigned short subsystem_device; 140 unsigned short subsystem_device;
140 unsigned int class; /* 3 bytes: (base,sub,prog-if) */ 141 unsigned int class; /* 3 bytes: (base,sub,prog-if) */
142 u8 revision; /* PCI revision, low byte of class word */
141 u8 hdr_type; /* PCI header type (`multi' flag masked out) */ 143 u8 hdr_type; /* PCI header type (`multi' flag masked out) */
142 u8 rom_base_reg; /* which config register controls the ROM */ 144 u8 rom_base_reg; /* which config register controls the ROM */
143 u8 pin; /* which interrupt pin this device uses */ 145 u8 pin; /* which interrupt pin this device uses */
@@ -313,7 +315,7 @@ struct pci_dynids {
313 315
314/* ---------------------------------------------------------------- */ 316/* ---------------------------------------------------------------- */
315/** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides 317/** PCI Error Recovery System (PCI-ERS). If a PCI device driver provides
316 * a set fof callbacks in struct pci_error_handlers, then that device driver 318 * a set of callbacks in struct pci_error_handlers, then that device driver
317 * will be notified of PCI bus errors, and will be driven to recovery 319 * will be notified of PCI bus errors, and will be driven to recovery
318 * when an error occurs. 320 * when an error occurs.
319 */ 321 */
@@ -370,7 +372,6 @@ struct pci_driver {
370 int (*suspend_late) (struct pci_dev *dev, pm_message_t state); 372 int (*suspend_late) (struct pci_dev *dev, pm_message_t state);
371 int (*resume_early) (struct pci_dev *dev); 373 int (*resume_early) (struct pci_dev *dev);
372 int (*resume) (struct pci_dev *dev); /* Device woken up */ 374 int (*resume) (struct pci_dev *dev); /* Device woken up */
373 int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */
374 void (*shutdown) (struct pci_dev *dev); 375 void (*shutdown) (struct pci_dev *dev);
375 376
376 struct pci_error_handlers *err_handler; 377 struct pci_error_handlers *err_handler;
@@ -431,6 +432,8 @@ extern struct bus_type pci_bus_type;
431 * code, or pci core code. */ 432 * code, or pci core code. */
432extern struct list_head pci_root_buses; /* list of all known PCI buses */ 433extern struct list_head pci_root_buses; /* list of all known PCI buses */
433extern struct list_head pci_devices; /* list of all devices */ 434extern struct list_head pci_devices; /* list of all devices */
435/* Some device drivers need know if pci is initiated */
436extern int no_pci_devices(void);
434 437
435void pcibios_fixup_bus(struct pci_bus *); 438void pcibios_fixup_bus(struct pci_bus *);
436int __must_check pcibios_enable_device(struct pci_dev *, int mask); 439int __must_check pcibios_enable_device(struct pci_dev *, int mask);
@@ -475,7 +478,7 @@ extern void pci_sort_breadthfirst(void);
475/* Generic PCI functions exported to card drivers */ 478/* Generic PCI functions exported to card drivers */
476 479
477struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); 480struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
478struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); 481struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn);
479int pci_find_capability (struct pci_dev *dev, int cap); 482int pci_find_capability (struct pci_dev *dev, int cap);
480int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); 483int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
481int pci_find_ext_capability (struct pci_dev *dev, int cap); 484int pci_find_ext_capability (struct pci_dev *dev, int cap);
@@ -544,11 +547,16 @@ void pci_set_master(struct pci_dev *dev);
544int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); 547int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
545#define HAVE_PCI_SET_MWI 548#define HAVE_PCI_SET_MWI
546int __must_check pci_set_mwi(struct pci_dev *dev); 549int __must_check pci_set_mwi(struct pci_dev *dev);
550int pci_try_set_mwi(struct pci_dev *dev);
547void pci_clear_mwi(struct pci_dev *dev); 551void pci_clear_mwi(struct pci_dev *dev);
548void pci_intx(struct pci_dev *dev, int enable); 552void pci_intx(struct pci_dev *dev, int enable);
549void pci_msi_off(struct pci_dev *dev); 553void pci_msi_off(struct pci_dev *dev);
550int pci_set_dma_mask(struct pci_dev *dev, u64 mask); 554int pci_set_dma_mask(struct pci_dev *dev, u64 mask);
551int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); 555int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask);
556int pcix_get_max_mmrbc(struct pci_dev *dev);
557int pcix_get_mmrbc(struct pci_dev *dev);
558int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc);
559int pcie_set_readrq(struct pci_dev *dev, int rq);
552void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); 560void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno);
553int __must_check pci_assign_resource(struct pci_dev *dev, int i); 561int __must_check pci_assign_resource(struct pci_dev *dev, int i);
554int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); 562int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i);
@@ -560,6 +568,7 @@ void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size);
560void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); 568void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size);
561void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); 569void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom);
562void pci_remove_rom(struct pci_dev *pdev); 570void pci_remove_rom(struct pci_dev *pdev);
571size_t pci_get_rom_size(void __iomem *rom, size_t size);
563 572
564/* Power management related routines */ 573/* Power management related routines */
565int pci_save_state(struct pci_dev *dev); 574int pci_save_state(struct pci_dev *dev);
@@ -717,6 +726,7 @@ static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *
717{ return NULL; } 726{ return NULL; }
718 727
719#define pci_dev_present(ids) (0) 728#define pci_dev_present(ids) (0)
729#define no_pci_devices() (1)
720#define pci_find_present(ids) (NULL) 730#define pci_find_present(ids) (NULL)
721#define pci_dev_put(dev) do { } while (0) 731#define pci_dev_put(dev) do { } while (0)
722 732
@@ -876,5 +886,7 @@ extern int pci_pci_problems;
876extern unsigned long pci_cardbus_io_size; 886extern unsigned long pci_cardbus_io_size;
877extern unsigned long pci_cardbus_mem_size; 887extern unsigned long pci_cardbus_mem_size;
878 888
889extern int pcibios_add_platform_entries(struct pci_dev *dev);
890
879#endif /* __KERNEL__ */ 891#endif /* __KERNEL__ */
880#endif /* LINUX_PCI_H */ 892#endif /* LINUX_PCI_H */