summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-11 21:50:26 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-11 21:50:26 -0500
commit7b67e751479d50b7f84d1a3cc5216eed5e534b66 (patch)
treea1a6746857cf65f04dde739fe271bf4143d55eaf /include
parent9f13a1fd452f11c18004ba2422a6384b424ec8a9 (diff)
parent76ccc297018d25d55b789bbd508861ef1e2cdb0c (diff)
Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits) x86/PCI: Expand the x86_msi_ops to have a restore MSIs. PCI: Increase resource array mask bit size in pcim_iomap_regions() PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT) PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB x86/PCI: amd: factor out MMCONFIG discovery PCI: Enable ATS at the device state restore PCI: msi: fix imbalanced refcount of msi irq sysfs objects PCI: kconfig: English typo in pci/pcie/Kconfig PCI/PM/Runtime: make PCI traces quieter PCI: remove pci_create_bus() xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus() x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented() x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources sparc/PCI: convert to pci_create_root_bus() sh/PCI: convert to pci_scan_root_bus() for correct root bus resources powerpc/PCI: convert to pci_create_root_bus() powerpc/PCI: split PHB part out of pcibios_map_io_space() ... Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due to the same patches being applied in other branches.
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h50
-rw-r--r--include/linux/pci_ids.h23
-rw-r--r--include/linux/pci_regs.h2
3 files changed, 54 insertions, 21 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 84225c756bd1..a16b1df3deff 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -111,7 +111,7 @@ enum {
111 PCI_NUM_RESOURCES, 111 PCI_NUM_RESOURCES,
112 112
113 /* preserve this for compatibility */ 113 /* preserve this for compatibility */
114 DEVICE_COUNT_RESOURCE 114 DEVICE_COUNT_RESOURCE = PCI_NUM_RESOURCES,
115}; 115};
116 116
117typedef int __bitwise pci_power_t; 117typedef int __bitwise pci_power_t;
@@ -308,7 +308,7 @@ struct pci_dev {
308 unsigned int is_added:1; 308 unsigned int is_added:1;
309 unsigned int is_busmaster:1; /* device is busmaster */ 309 unsigned int is_busmaster:1; /* device is busmaster */
310 unsigned int no_msi:1; /* device may not use msi */ 310 unsigned int no_msi:1; /* device may not use msi */
311 unsigned int block_ucfg_access:1; /* userspace config space access is blocked */ 311 unsigned int block_cfg_access:1; /* config space access is blocked */
312 unsigned int broken_parity_status:1; /* Device generates false positive parity */ 312 unsigned int broken_parity_status:1; /* Device generates false positive parity */
313 unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */ 313 unsigned int irq_reroute_variant:2; /* device needs IRQ rerouting variant */
314 unsigned int msi_enabled:1; 314 unsigned int msi_enabled:1;
@@ -661,17 +661,13 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr);
661void pci_bus_add_devices(const struct pci_bus *bus); 661void pci_bus_add_devices(const struct pci_bus *bus);
662struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, 662struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus,
663 struct pci_ops *ops, void *sysdata); 663 struct pci_ops *ops, void *sysdata);
664static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops, 664struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata);
665 void *sysdata) 665struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
666{ 666 struct pci_ops *ops, void *sysdata,
667 struct pci_bus *root_bus; 667 struct list_head *resources);
668 root_bus = pci_scan_bus_parented(NULL, bus, ops, sysdata); 668struct pci_bus * __devinit pci_scan_root_bus(struct device *parent, int bus,
669 if (root_bus) 669 struct pci_ops *ops, void *sysdata,
670 pci_bus_add_devices(root_bus); 670 struct list_head *resources);
671 return root_bus;
672}
673struct pci_bus *pci_create_bus(struct device *parent, int bus,
674 struct pci_ops *ops, void *sysdata);
675struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, 671struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev,
676 int busnr); 672 int busnr);
677void pcie_update_link_speed(struct pci_bus *bus, u16 link_status); 673void pcie_update_link_speed(struct pci_bus *bus, u16 link_status);
@@ -795,8 +791,11 @@ static inline int pci_is_managed(struct pci_dev *pdev)
795} 791}
796 792
797void pci_disable_device(struct pci_dev *dev); 793void pci_disable_device(struct pci_dev *dev);
794
795extern unsigned int pcibios_max_latency;
798void pci_set_master(struct pci_dev *dev); 796void pci_set_master(struct pci_dev *dev);
799void pci_clear_master(struct pci_dev *dev); 797void pci_clear_master(struct pci_dev *dev);
798
800int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state); 799int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state);
801int pci_set_cacheline_size(struct pci_dev *dev); 800int pci_set_cacheline_size(struct pci_dev *dev);
802#define HAVE_PCI_SET_MWI 801#define HAVE_PCI_SET_MWI
@@ -804,6 +803,9 @@ int __must_check pci_set_mwi(struct pci_dev *dev);
804int pci_try_set_mwi(struct pci_dev *dev); 803int pci_try_set_mwi(struct pci_dev *dev);
805void pci_clear_mwi(struct pci_dev *dev); 804void pci_clear_mwi(struct pci_dev *dev);
806void pci_intx(struct pci_dev *dev, int enable); 805void pci_intx(struct pci_dev *dev, int enable);
806bool pci_intx_mask_supported(struct pci_dev *dev);
807bool pci_check_and_mask_intx(struct pci_dev *dev);
808bool pci_check_and_unmask_intx(struct pci_dev *dev);
807void pci_msi_off(struct pci_dev *dev); 809void pci_msi_off(struct pci_dev *dev);
808int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size); 810int pci_set_dma_max_seg_size(struct pci_dev *dev, unsigned int size);
809int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask); 811int pci_set_dma_seg_boundary(struct pci_dev *dev, unsigned long mask);
@@ -911,6 +913,8 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *);
911void pci_release_selected_regions(struct pci_dev *, int); 913void pci_release_selected_regions(struct pci_dev *, int);
912 914
913/* drivers/pci/bus.c */ 915/* drivers/pci/bus.c */
916void pci_add_resource(struct list_head *resources, struct resource *res);
917void pci_free_resource_list(struct list_head *resources);
914void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags); 918void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags);
915struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n); 919struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
916void pci_bus_remove_resources(struct pci_bus *bus); 920void pci_bus_remove_resources(struct pci_bus *bus);
@@ -1085,8 +1089,9 @@ int ht_create_irq(struct pci_dev *dev, int idx);
1085void ht_destroy_irq(unsigned int irq); 1089void ht_destroy_irq(unsigned int irq);
1086#endif /* CONFIG_HT_IRQ */ 1090#endif /* CONFIG_HT_IRQ */
1087 1091
1088extern void pci_block_user_cfg_access(struct pci_dev *dev); 1092extern void pci_cfg_access_lock(struct pci_dev *dev);
1089extern void pci_unblock_user_cfg_access(struct pci_dev *dev); 1093extern bool pci_cfg_access_trylock(struct pci_dev *dev);
1094extern void pci_cfg_access_unlock(struct pci_dev *dev);
1090 1095
1091/* 1096/*
1092 * PCI domain support. Sometimes called PCI segment (eg by ACPI), 1097 * PCI domain support. Sometimes called PCI segment (eg by ACPI),
@@ -1283,10 +1288,13 @@ static inline void pci_release_regions(struct pci_dev *dev)
1283 1288
1284#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) 1289#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
1285 1290
1286static inline void pci_block_user_cfg_access(struct pci_dev *dev) 1291static inline void pci_block_cfg_access(struct pci_dev *dev)
1287{ } 1292{ }
1288 1293
1289static inline void pci_unblock_user_cfg_access(struct pci_dev *dev) 1294static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev)
1295{ return 0; }
1296
1297static inline void pci_unblock_cfg_access(struct pci_dev *dev)
1290{ } 1298{ }
1291 1299
1292static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from) 1300static inline struct pci_bus *pci_find_next_bus(const struct pci_bus *from)
@@ -1424,10 +1432,10 @@ static inline void pci_fixup_device(enum pci_fixup_pass pass,
1424void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen); 1432void __iomem *pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
1425void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr); 1433void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
1426void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); 1434void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
1427int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name); 1435int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
1428int pcim_iomap_regions_request_all(struct pci_dev *pdev, u16 mask, 1436int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
1429 const char *name); 1437 const char *name);
1430void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask); 1438void pcim_iounmap_regions(struct pci_dev *pdev, int mask);
1431 1439
1432extern int pci_pci_problems; 1440extern int pci_pci_problems;
1433#define PCIPCI_FAIL 1 /* No PCI PCI DMA */ 1441#define PCIPCI_FAIL 1 /* No PCI PCI DMA */
@@ -1446,8 +1454,10 @@ extern u8 pci_cache_line_size;
1446extern unsigned long pci_hotplug_io_size; 1454extern unsigned long pci_hotplug_io_size;
1447extern unsigned long pci_hotplug_mem_size; 1455extern unsigned long pci_hotplug_mem_size;
1448 1456
1457/* Architecture specific versions may override these (weak) */
1449int pcibios_add_platform_entries(struct pci_dev *dev); 1458int pcibios_add_platform_entries(struct pci_dev *dev);
1450void pcibios_disable_device(struct pci_dev *dev); 1459void pcibios_disable_device(struct pci_dev *dev);
1460void pcibios_set_master(struct pci_dev *dev);
1451int pcibios_set_pcie_reset_state(struct pci_dev *dev, 1461int pcibios_set_pcie_reset_state(struct pci_dev *dev,
1452 enum pcie_reset_state state); 1462 enum pcie_reset_state state);
1453 1463
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 2aaee0ca9da8..31d77af2ef42 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -776,6 +776,29 @@
776#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 776#define PCI_DEVICE_ID_ELSA_QS3000 0x3000
777 777
778#define PCI_VENDOR_ID_STMICRO 0x104A 778#define PCI_VENDOR_ID_STMICRO 0x104A
779#define PCI_DEVICE_ID_STMICRO_USB_HOST 0xCC00
780#define PCI_DEVICE_ID_STMICRO_USB_OHCI 0xCC01
781#define PCI_DEVICE_ID_STMICRO_USB_OTG 0xCC02
782#define PCI_DEVICE_ID_STMICRO_UART_HWFC 0xCC03
783#define PCI_DEVICE_ID_STMICRO_UART_NO_HWFC 0xCC04
784#define PCI_DEVICE_ID_STMICRO_SOC_DMA 0xCC05
785#define PCI_DEVICE_ID_STMICRO_SATA 0xCC06
786#define PCI_DEVICE_ID_STMICRO_I2C 0xCC07
787#define PCI_DEVICE_ID_STMICRO_SPI_HS 0xCC08
788#define PCI_DEVICE_ID_STMICRO_MAC 0xCC09
789#define PCI_DEVICE_ID_STMICRO_SDIO_EMMC 0xCC0A
790#define PCI_DEVICE_ID_STMICRO_SDIO 0xCC0B
791#define PCI_DEVICE_ID_STMICRO_GPIO 0xCC0C
792#define PCI_DEVICE_ID_STMICRO_VIP 0xCC0D
793#define PCI_DEVICE_ID_STMICRO_AUDIO_ROUTER_DMA 0xCC0E
794#define PCI_DEVICE_ID_STMICRO_AUDIO_ROUTER_SRCS 0xCC0F
795#define PCI_DEVICE_ID_STMICRO_AUDIO_ROUTER_MSPS 0xCC10
796#define PCI_DEVICE_ID_STMICRO_CAN 0xCC11
797#define PCI_DEVICE_ID_STMICRO_MLB 0xCC12
798#define PCI_DEVICE_ID_STMICRO_DBP 0xCC13
799#define PCI_DEVICE_ID_STMICRO_SATA_PHY 0xCC14
800#define PCI_DEVICE_ID_STMICRO_ESRAM 0xCC15
801#define PCI_DEVICE_ID_STMICRO_VIC 0xCC16
779 802
780#define PCI_VENDOR_ID_BUSLOGIC 0x104B 803#define PCI_VENDOR_ID_BUSLOGIC 0x104B
781#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 804#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index 28fe380cb19d..e41a10f5ae83 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -392,7 +392,7 @@
392#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */ 392#define PCI_EXP_TYPE_DOWNSTREAM 0x6 /* Downstream Port */
393#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */ 393#define PCI_EXP_TYPE_PCI_BRIDGE 0x7 /* PCI/PCI-X Bridge */
394#define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */ 394#define PCI_EXP_TYPE_RC_END 0x9 /* Root Complex Integrated Endpoint */
395#define PCI_EXP_TYPE_RC_EC 0x10 /* Root Complex Event Collector */ 395#define PCI_EXP_TYPE_RC_EC 0xa /* Root Complex Event Collector */
396#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */ 396#define PCI_EXP_FLAGS_SLOT 0x0100 /* Slot implemented */
397#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */ 397#define PCI_EXP_FLAGS_IRQ 0x3e00 /* Interrupt message number */
398#define PCI_EXP_DEVCAP 4 /* Device capabilities */ 398#define PCI_EXP_DEVCAP 4 /* Device capabilities */