aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-22 19:39:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-22 19:39:28 -0500
commite1ba84597c9012b9f9075aac283ac7537d7561ba (patch)
tree41ab1a74c71ce55e72ef73424346e8e0a7f4616e /arch/parisc
parent60eaa0190f6b39dce18eb1975d9773ed8bc9a534 (diff)
parentcef09b808e584c13b7126b83dc37c80b00234137 (diff)
Merge tag 'pci-v3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas: "PCI changes for the v3.14 merge window: Resource management - Change pci_bus_region addresses to dma_addr_t (Bjorn Helgaas) - Support 64-bit AGP BARs (Bjorn Helgaas, Yinghai Lu) - Add pci_bus_address() to get bus address of a BAR (Bjorn Helgaas) - Use pci_resource_start() for CPU address of AGP BARs (Bjorn Helgaas) - Enforce bus address limits in resource allocation (Yinghai Lu) - Allocate 64-bit BARs above 4G when possible (Yinghai Lu) - Convert pcibios_resource_to_bus() to take pci_bus, not pci_dev (Yinghai Lu) PCI device hotplug - Major rescan/remove locking update (Rafael J. Wysocki) - Make ioapic builtin only (not modular) (Yinghai Lu) - Fix release/free issues (Yinghai Lu) - Clean up pciehp (Bjorn Helgaas) - Announce pciehp slot info during enumeration (Bjorn Helgaas) MSI - Add pci_msi_vec_count(), pci_msix_vec_count() (Alexander Gordeev) - Add pci_enable_msi_range(), pci_enable_msix_range() (Alexander Gordeev) - Deprecate "tri-state" interfaces: fail/success/fail+info (Alexander Gordeev) - Export MSI mode using attributes, not kobjects (Greg Kroah-Hartman) - Drop "irq" param from *_restore_msi_irqs() (DuanZhenzhong) SR-IOV - Clear NumVFs when disabling SR-IOV in sriov_init() (ethan.zhao) Virtualization - Add support for save/restore of extended capabilities (Alex Williamson) - Add Virtual Channel to save/restore support (Alex Williamson) - Never treat a VF as a multifunction device (Alex Williamson) - Add pci_try_reset_function(), et al (Alex Williamson) AER - Ignore non-PCIe error sources (Betty Dall) - Support ACPI HEST error sources for domains other than 0 (Betty Dall) - Consolidate HEST error source parsers (Bjorn Helgaas) - Add a TLP header print helper (Borislav Petkov) Freescale i.MX6 - Remove unnecessary code (Fabio Estevam) - Make reset-gpio optional (Marek Vasut) - Report "link up" only after link training completes (Marek Vasut) - Start link in Gen1 before negotiating for Gen2 mode (Marek Vasut) - Fix PCIe startup code (Richard Zhu) Marvell MVEBU - Remove duplicate of_clk_get_by_name() call (Andrew Lunn) - Drop writes to bridge Secondary Status register (Jason Gunthorpe) - Obey bridge PCI_COMMAND_MEM and PCI_COMMAND_IO bits (Jason Gunthorpe) - Support a bridge with no IO port window (Jason Gunthorpe) - Use max_t() instead of max(resource_size_t,) (Jingoo Han) - Remove redundant of_match_ptr (Sachin Kamat) - Call pci_ioremap_io() at startup instead of dynamically (Thomas Petazzoni) NVIDIA Tegra - Disable Gen2 for Tegra20 and Tegra30 (Eric Brower) Renesas R-Car - Add runtime PM support (Valentine Barshak) - Fix rcar_pci_probe() return value check (Wei Yongjun) Synopsys DesignWare - Fix crash in dw_msi_teardown_irq() (Bjørn Erik Nilsen) - Remove redundant call to pci_write_config_word() (Bjørn Erik Nilsen) - Fix missing MSI IRQs (Harro Haan) - Add dw_pcie prefix before cfg_read/write (Pratyush Anand) - Fix I/O transfers by using CPU (not realio) address (Pratyush Anand) - Whitespace cleanup (Jingoo Han) EISA - Call put_device() if device_register() fails (Levente Kurusa) - Revert EISA initialization breakage ((Bjorn Helgaas) Miscellaneous - Remove unused code, including PCIe 3.0 interfaces (Stephen Hemminger) - Prevent bus conflicts while checking for bridge apertures (Bjorn Helgaas) - Stop clearing bridge Secondary Status when setting up I/O aperture (Bjorn Helgaas) - Use dev_is_pci() to identify PCI devices (Yijing Wang) - Deprecate DEFINE_PCI_DEVICE_TABLE (Joe Perches) - Update documentation 00-INDEX (Erik Ekman)" * tag 'pci-v3.14-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (119 commits) Revert "EISA: Initialize device before its resources" Revert "EISA: Log device resources in dmesg" vfio-pci: Use pci "try" reset interface PCI: Check parent kobject in pci_destroy_dev() xen/pcifront: Use global PCI rescan-remove locking powerpc/eeh: Use global PCI rescan-remove locking PCI: Fix pci_check_and_unmask_intx() comment typos PCI: Add pci_try_reset_function(), pci_try_reset_slot(), pci_try_reset_bus() MPT / PCI: Use pci_stop_and_remove_bus_device_locked() platform / x86: Use global PCI rescan-remove locking PCI: hotplug: Use global PCI rescan-remove locking pcmcia: Use global PCI rescan-remove locking ACPI / hotplug / PCI: Use global PCI rescan-remove locking ACPI / PCI: Use global PCI rescan-remove locking in PCI root hotplug PCI: Add global pci_lock_rescan_remove() PCI: Cleanup pci.h whitespace PCI: Reorder so actual code comes before stubs PCI/AER: Support ACPI HEST AER error sources for PCI domains other than 0 ACPICA: Add helper macros to extract bus/segment numbers from HEST table. PCI: Make local functions static ...
Diffstat (limited to 'arch/parisc')
-rw-r--r--arch/parisc/kernel/drivers.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index 14285caec71a..dba508fe1683 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -282,18 +282,6 @@ find_pa_parent_type(const struct parisc_device *padev, int type)
282 return NULL; 282 return NULL;
283} 283}
284 284
285#ifdef CONFIG_PCI
286static inline int is_pci_dev(struct device *dev)
287{
288 return dev->bus == &pci_bus_type;
289}
290#else
291static inline int is_pci_dev(struct device *dev)
292{
293 return 0;
294}
295#endif
296
297/* 285/*
298 * get_node_path fills in @path with the firmware path to the device. 286 * get_node_path fills in @path with the firmware path to the device.
299 * Note that if @node is a parisc device, we don't fill in the 'mod' field. 287 * Note that if @node is a parisc device, we don't fill in the 'mod' field.
@@ -306,7 +294,7 @@ static void get_node_path(struct device *dev, struct hardware_path *path)
306 int i = 5; 294 int i = 5;
307 memset(&path->bc, -1, 6); 295 memset(&path->bc, -1, 6);
308 296
309 if (is_pci_dev(dev)) { 297 if (dev_is_pci(dev)) {
310 unsigned int devfn = to_pci_dev(dev)->devfn; 298 unsigned int devfn = to_pci_dev(dev)->devfn;
311 path->mod = PCI_FUNC(devfn); 299 path->mod = PCI_FUNC(devfn);
312 path->bc[i--] = PCI_SLOT(devfn); 300 path->bc[i--] = PCI_SLOT(devfn);
@@ -314,7 +302,7 @@ static void get_node_path(struct device *dev, struct hardware_path *path)
314 } 302 }
315 303
316 while (dev != &root) { 304 while (dev != &root) {
317 if (is_pci_dev(dev)) { 305 if (dev_is_pci(dev)) {
318 unsigned int devfn = to_pci_dev(dev)->devfn; 306 unsigned int devfn = to_pci_dev(dev)->devfn;
319 path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5); 307 path->bc[i--] = PCI_SLOT(devfn) | (PCI_FUNC(devfn)<< 5);
320 } else if (dev->bus == &parisc_bus_type) { 308 } else if (dev->bus == &parisc_bus_type) {
@@ -695,7 +683,7 @@ static int check_parent(struct device * dev, void * data)
695 if (dev->bus == &parisc_bus_type) { 683 if (dev->bus == &parisc_bus_type) {
696 if (match_parisc_device(dev, d->index, d->modpath)) 684 if (match_parisc_device(dev, d->index, d->modpath))
697 d->dev = dev; 685 d->dev = dev;
698 } else if (is_pci_dev(dev)) { 686 } else if (dev_is_pci(dev)) {
699 if (match_pci_device(dev, d->index, d->modpath)) 687 if (match_pci_device(dev, d->index, d->modpath))
700 d->dev = dev; 688 d->dev = dev;
701 } else if (dev->bus == NULL) { 689 } else if (dev->bus == NULL) {
@@ -753,7 +741,7 @@ struct device *hwpath_to_device(struct hardware_path *modpath)
753 if (!parent) 741 if (!parent)
754 return NULL; 742 return NULL;
755 } 743 }
756 if (is_pci_dev(parent)) /* pci devices already parse MOD */ 744 if (dev_is_pci(parent)) /* pci devices already parse MOD */
757 return parent; 745 return parent;
758 else 746 else
759 return parse_tree_node(parent, 6, modpath); 747 return parse_tree_node(parent, 6, modpath);
@@ -772,7 +760,7 @@ void device_to_hwpath(struct device *dev, struct hardware_path *path)
772 padev = to_parisc_device(dev); 760 padev = to_parisc_device(dev);
773 get_node_path(dev->parent, path); 761 get_node_path(dev->parent, path);
774 path->mod = padev->hw_path; 762 path->mod = padev->hw_path;
775 } else if (is_pci_dev(dev)) { 763 } else if (dev_is_pci(dev)) {
776 get_node_path(dev, path); 764 get_node_path(dev, path);
777 } 765 }
778} 766}