Skip to content

Commit

Permalink
Merge branch 'pci/myron-pcibios_setup' into next
Browse files Browse the repository at this point in the history
* pci/myron-pcibios_setup:
  xtensa/PCI: factor out pcibios_setup()
  x86/PCI: adjust section annotations for pcibios_setup()
  unicore32/PCI: adjust section annotations for pcibios_setup()
  tile/PCI: factor out pcibios_setup()
  sparc/PCI: factor out pcibios_setup()
  sh/PCI: adjust section annotations for pcibios_setup()
  sh/PCI: factor out pcibios_setup()
  powerpc/PCI: factor out pcibios_setup()
  parisc/PCI: factor out pcibios_setup()
  MIPS/PCI: adjust section annotations for pcibios_setup()
  MIPS/PCI: factor out pcibios_setup()
  microblaze/PCI: factor out pcibios_setup()
  ia64/PCI: factor out pcibios_setup()
  cris/PCI: factor out pcibios_setup()
  alpha/PCI: factor out pcibios_setup()
  PCI: pull pcibios_setup() up into core
  • Loading branch information
Bjorn Helgaas committed Jul 5, 2012
2 parents 35e7f73 + 29e8d7b commit 85a00dd
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 96 deletions.
6 changes: 0 additions & 6 deletions arch/alpha/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,6 @@ pcibios_init(void)

subsys_initcall(pcibios_init);

char * __devinit
pcibios_setup(char *str)
{
return str;
}

#ifdef ALPHA_RESTORE_SRM_SETUP
static struct pdev_srm_saved_conf *srm_saved_configs;

Expand Down
5 changes: 0 additions & 5 deletions arch/cris/arch-v32/drivers/pci/bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b)
{
}

char * __devinit pcibios_setup(char *str)
{
return NULL;
}

void pcibios_set_master(struct pci_dev *dev)
{
u8 lat;
Expand Down
9 changes: 0 additions & 9 deletions arch/ia64/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,15 +498,6 @@ pcibios_align_resource (void *data, const struct resource *res,
return res->start;
}

/*
* PCI BIOS setup, always defaults to SAL interface
*/
char * __init
pcibios_setup (char *str)
{
return str;
}

int
pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
enum pci_mmap_state mmap_state, int write_combine)
Expand Down
5 changes: 0 additions & 5 deletions arch/microblaze/pci/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,6 @@ void pcibios_set_master(struct pci_dev *dev)
/* No special bus mastering setup handling */
}

char __devinit *pcibios_setup(char *str)
{
return str;
}

/*
* Reads the interrupt pin to determine if interrupt is use by card.
* If the interrupt is used, then gets the interrupt line from the
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
vma->vm_end - vma->vm_start, vma->vm_page_prot);
}

char * (*pcibios_plat_setup)(char *str) __devinitdata;
char * (*pcibios_plat_setup)(char *str) __initdata;

char *__devinit pcibios_setup(char *str)
char *__init pcibios_setup(char *str)
{
if (pcibios_plat_setup)
return pcibios_plat_setup(str);
Expand Down
11 changes: 0 additions & 11 deletions arch/mips/pmc-sierra/yosemite/ht.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,17 +395,6 @@ void __init pcibios_init(void)
pci_scan_bus(3, &titan_pci_ops, NULL);
}

/*
* for parsing "pci=" kernel boot arguments.
*/
char *pcibios_setup(char *str)
{
printk(KERN_INFO "rr: pcibios_setup\n");
/* Nothing to do for now. */

return str;
}

unsigned __init int pcibios_assign_all_busses(void)
{
/* We want to use the PCI bus detection done by PMON */
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/txx9/generic/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return txx9_board_vec->pci_map_irq(dev, slot, pin);
}

char * (*txx9_board_pcibios_setup)(char *str) __devinitdata;
char * (*txx9_board_pcibios_setup)(char *str) __initdata;

char *__devinit txx9_pcibios_setup(char *str)
char *__init txx9_pcibios_setup(char *str)
{
if (txx9_board_pcibios_setup && !txx9_board_pcibios_setup(str))
return NULL;
Expand Down
5 changes: 0 additions & 5 deletions arch/parisc/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,6 @@ void pcibios_fixup_bus(struct pci_bus *bus)
}


char *pcibios_setup(char *str)
{
return str;
}

/*
* Called by pci_set_master() - a driver interface.
*
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,6 @@ int pcibios_add_platform_entries(struct pci_dev *pdev)
return device_create_file(&pdev->dev, &dev_attr_devspec);
}

char __devinit *pcibios_setup(char *str)
{
return str;
}

/*
* Reads the interrupt pin to determine if interrupt is use by card.
* If the interrupt is used, then gets the interrupt line from the
Expand Down
4 changes: 2 additions & 2 deletions arch/sh/drivers/pci/fixups-sdk7786.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
* Misconfigurations can be detected through the FPGA via the slot
* resistors to determine card presence. Hotplug remains unsupported.
*/
static unsigned int slot4en __devinitdata;
static unsigned int slot4en __initdata;

char *__devinit pcibios_setup(char *str)
char *__init pcibios_setup(char *str)
{
if (strcmp(str, "slot4en") == 0) {
slot4en = 1;
Expand Down
5 changes: 0 additions & 5 deletions arch/sh/drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
}

char * __devinit __weak pcibios_setup(char *str)
{
return str;
}

static void __init
pcibios_bus_report_status_early(struct pci_channel *hose,
int top_bus, int current_bus,
Expand Down
8 changes: 0 additions & 8 deletions arch/sparc/kernel/leon_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,6 @@ void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
}
}

/*
* Other archs parse arguments here.
*/
char * __devinit pcibios_setup(char *str)
{
return str;
}

resource_size_t pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size, resource_size_t align)
{
Expand Down
5 changes: 0 additions & 5 deletions arch/sparc/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
return 0;
}

char * __devinit pcibios_setup(char *str)
{
return str;
}

/* Platform support for /proc/bus/pci/X/Y mmap()s. */

/* If the user uses a host-bridge as the PCI device, he may use
Expand Down
8 changes: 0 additions & 8 deletions arch/sparc/kernel/pcic.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,6 @@ static void watchdog_reset() {
}
#endif

/*
* Other archs parse arguments here.
*/
char * __devinit pcibios_setup(char *str)
{
return str;
}

resource_size_t pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size, resource_size_t align)
{
Expand Down
10 changes: 0 additions & 10 deletions arch/tile/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,16 +403,6 @@ void pcibios_set_master(struct pci_dev *dev)
/* No special bus mastering setup handling. */
}

/*
* This can be called from the generic PCI layer, but doesn't need to
* do anything.
*/
char __devinit *pcibios_setup(char *str)
{
/* Nothing needs to be done. */
return str;
}

/*
* This is called from the generic Linux layer.
*/
Expand Down
2 changes: 1 addition & 1 deletion arch/unicore32/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static int __init pci_common_init(void)
}
subsys_initcall(pci_common_init);

char * __devinit pcibios_setup(char *str)
char * __init pcibios_setup(char *str)
{
if (!strcmp(str, "debug")) {
debug_pci = 1;
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/pci/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ int __init pcibios_init(void)
return 0;
}

char * __devinit pcibios_setup(char *str)
char * __init pcibios_setup(char *str)
{
if (!strcmp(str, "off")) {
pci_probe = 0;
Expand Down
6 changes: 0 additions & 6 deletions arch/xtensa/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
* pcibios_fixups
* pcibios_align_resource
* pcibios_fixup_bus
* pcibios_setup
* pci_bus_add_device
* pci_mmap_page_range
*/
Expand Down Expand Up @@ -206,11 +205,6 @@ void __init pcibios_fixup_bus(struct pci_bus *bus)
}
}

char __init *pcibios_setup(char *str)
{
return str;
}

void pcibios_set_master(struct pci_dev *dev)
{
/* No special bus mastering setup handling */
Expand Down
12 changes: 12 additions & 0 deletions drivers/pci/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2792,6 +2792,18 @@ static void __pci_set_master(struct pci_dev *dev, bool enable)
dev->is_busmaster = enable;
}

/**
* pcibios_setup - process "pci=" kernel boot arguments
* @str: string used to pass in "pci=" kernel boot arguments
*
* Process kernel boot arguments. This is the default implementation.
* Architecture specific implementations can override this as necessary.
*/
char * __weak __init pcibios_setup(char *str)
{
return str;
}

/**
* pcibios_set_master - enable PCI bus-mastering for device dev
* @dev: the PCI device to enable
Expand Down
1 change: 1 addition & 0 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ extern int no_pci_devices(void);

void pcibios_fixup_bus(struct pci_bus *);
int __must_check pcibios_enable_device(struct pci_dev *, int mask);
/* Architecture specific versions may override this (weak) */
char *pcibios_setup(char *str);

/* Used only when drivers/pci/setup.c is used */
Expand Down

0 comments on commit 85a00dd

Please sign in to comment.