aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMyron Stowe <myron.stowe@redhat.com>2012-06-25 23:30:57 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-26 08:22:31 -0400
commit2b6f2c3520124e8bad4bffa71f5b98e602b9cf03 (patch)
treef99110de830ffaa0e592d9d66294293ca0c3dd3e
parentcfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff)
PCI: pull pcibios_setup() up into core
Currently, all of the architectures implement their own pcibios_setup() routine. Most of the implementations do nothing so this patch introduces a generic (__weak) routine in the core that can be used by all architectures as a default. If necessary, it can be overridden by architecture-specific code. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/pci.c12
-rw-r--r--include/linux/pci.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 447e83472c01..c87d518acace 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2666,6 +2666,18 @@ static void __pci_set_master(struct pci_dev *dev, bool enable)
2666} 2666}
2667 2667
2668/** 2668/**
2669 * pcibios_setup - process "pci=" kernel boot arguments
2670 * @str: string used to pass in "pci=" kernel boot arguments
2671 *
2672 * Process kernel boot arguments. This is the default implementation.
2673 * Architecture specific implementations can override this as necessary.
2674 */
2675char * __weak __init pcibios_setup(char *str)
2676{
2677 return str;
2678}
2679
2680/**
2669 * pcibios_set_master - enable PCI bus-mastering for device dev 2681 * pcibios_set_master - enable PCI bus-mastering for device dev
2670 * @dev: the PCI device to enable 2682 * @dev: the PCI device to enable
2671 * 2683 *
diff --git a/include/linux/pci.h b/include/linux/pci.h
index d8c379dba6ad..f91143e86f85 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -642,6 +642,7 @@ extern int no_pci_devices(void);
642 642
643void pcibios_fixup_bus(struct pci_bus *); 643void pcibios_fixup_bus(struct pci_bus *);
644int __must_check pcibios_enable_device(struct pci_dev *, int mask); 644int __must_check pcibios_enable_device(struct pci_dev *, int mask);
645/* Architecture specific versions may override this (weak) */
645char *pcibios_setup(char *str); 646char *pcibios_setup(char *str);
646 647
647/* Used only when drivers/pci/setup.c is used */ 648/* Used only when drivers/pci/setup.c is used */