diff options
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 20 |
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 | ||
112 | typedef unsigned short __bitwise pci_bus_flags_t; | 112 | typedef unsigned short __bitwise pci_bus_flags_t; |
113 | enum pci_bus_flags { | 113 | enum 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 | ||
117 | struct pci_cap_saved_state { | 118 | struct 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. */ |
432 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ | 433 | extern struct list_head pci_root_buses; /* list of all known PCI buses */ |
433 | extern struct list_head pci_devices; /* list of all devices */ | 434 | extern struct list_head pci_devices; /* list of all devices */ |
435 | /* Some device drivers need know if pci is initiated */ | ||
436 | extern int no_pci_devices(void); | ||
434 | 437 | ||
435 | void pcibios_fixup_bus(struct pci_bus *); | 438 | void pcibios_fixup_bus(struct pci_bus *); |
436 | int __must_check pcibios_enable_device(struct pci_dev *, int mask); | 439 | int __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 | ||
477 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 480 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
478 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 481 | struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn); |
479 | int pci_find_capability (struct pci_dev *dev, int cap); | 482 | int pci_find_capability (struct pci_dev *dev, int cap); |
480 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 483 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
481 | int pci_find_ext_capability (struct pci_dev *dev, int cap); | 484 | int pci_find_ext_capability (struct pci_dev *dev, int cap); |
@@ -544,11 +547,16 @@ void pci_set_master(struct pci_dev *dev); | |||
544 | int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); | 547 | int 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 |
546 | int __must_check pci_set_mwi(struct pci_dev *dev); | 549 | int __must_check pci_set_mwi(struct pci_dev *dev); |
550 | int pci_try_set_mwi(struct pci_dev *dev); | ||
547 | void pci_clear_mwi(struct pci_dev *dev); | 551 | void pci_clear_mwi(struct pci_dev *dev); |
548 | void pci_intx(struct pci_dev *dev, int enable); | 552 | void pci_intx(struct pci_dev *dev, int enable); |
549 | void pci_msi_off(struct pci_dev *dev); | 553 | void pci_msi_off(struct pci_dev *dev); |
550 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 554 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
551 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 555 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
556 | int pcix_get_max_mmrbc(struct pci_dev *dev); | ||
557 | int pcix_get_mmrbc(struct pci_dev *dev); | ||
558 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | ||
559 | int pcie_set_readrq(struct pci_dev *dev, int rq); | ||
552 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | 560 | void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); |
553 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 561 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
554 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 562 | int __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); | |||
560 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); | 568 | void __iomem __must_check *pci_map_rom_copy(struct pci_dev *pdev, size_t *size); |
561 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); | 569 | void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom); |
562 | void pci_remove_rom(struct pci_dev *pdev); | 570 | void pci_remove_rom(struct pci_dev *pdev); |
571 | size_t pci_get_rom_size(void __iomem *rom, size_t size); | ||
563 | 572 | ||
564 | /* Power management related routines */ | 573 | /* Power management related routines */ |
565 | int pci_save_state(struct pci_dev *dev); | 574 | int 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; | |||
876 | extern unsigned long pci_cardbus_io_size; | 886 | extern unsigned long pci_cardbus_io_size; |
877 | extern unsigned long pci_cardbus_mem_size; | 887 | extern unsigned long pci_cardbus_mem_size; |
878 | 888 | ||
889 | extern 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 */ |