From 9bbb08faa91db7711614c9cb0983644086b97aca Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Fri, 2 Aug 2013 11:59:06 -0400 Subject: tile PCI RC: cleanups for tilepro PCI RC - remove unneeded include in pci.c - eliminate unused pci_controller.first_busno field - prefer msleep to mdelay - remove stale comment about pci_scan_bus_parented() Signed-off-by: Chris Metcalf --- arch/tile/kernel/pci.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'arch/tile/kernel/pci.c') diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 67237d34c2e..1dae3b2183a 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -192,7 +191,6 @@ int __init tile_pci_init(void) controller->hv_cfg_fd[0] = hv_cfg_fd0; controller->hv_cfg_fd[1] = hv_cfg_fd1; controller->hv_mem_fd = hv_mem_fd; - controller->first_busno = 0; controller->last_busno = 0xff; controller->ops = &tile_cfg_ops; @@ -283,7 +281,7 @@ int __init pcibios_init(void) * known to require at least 20ms here, but we use a more * conservative value. */ - mdelay(250); + msleep(250); /* Scan all of the recorded PCI controllers. */ for (i = 0; i < TILE_NUM_PCIE; i++) { @@ -304,18 +302,10 @@ int __init pcibios_init(void) pr_info("PCI: initializing controller #%d\n", i); - /* - * This comes from the generic Linux PCI driver. - * - * It reads the PCI tree for this bus into the Linux - * data structures. - * - * This is inlined in linux/pci.h and calls into - * pci_scan_bus_parented() in probe.c. - */ pci_add_resource(&resources, &ioport_resource); pci_add_resource(&resources, &iomem_resource); - bus = pci_scan_root_bus(NULL, 0, controller->ops, controller, &resources); + bus = pci_scan_root_bus(NULL, 0, controller->ops, + controller, &resources); controller->root_bus = bus; controller->last_busno = bus->busn_res.end; } -- cgit v1.2.3-70-g09d2 From 2be705523fb3dd716d76ed371eaadaced55fe4a3 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Mon, 5 Aug 2013 15:02:03 -0400 Subject: tile PCI RC: support pci=off boot arg for tilepro Signed-off-by: Chris Metcalf --- arch/tile/kernel/pci.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'arch/tile/kernel/pci.c') diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 1dae3b2183a..af75835d6ed 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -51,6 +51,8 @@ * */ +static int pci_probe = 1; + /* * This flag tells if the platform is TILEmpower that needs * special configuration for the PLX switch chip. @@ -143,6 +145,11 @@ int __init tile_pci_init(void) { int i; + if (!pci_probe) { + pr_info("PCI: disabled by boot argument\n"); + return 0; + } + pr_info("PCI: Searching for controllers...\n"); /* Re-init number of PCIe controllers to support hot-plug feature. */ @@ -378,6 +385,16 @@ void pcibios_set_master(struct pci_dev *dev) /* No special bus mastering setup handling. */ } +/* Process any "pci=" kernel boot arguments. */ +char * __init pcibios_setup(char *str) +{ + if (!strcmp(str, "off")) { + pci_probe = 0; + return NULL; + } + return str; +} + /* * Enable memory and/or address decoding, as appropriate, for the * device described by the 'dev' struct. -- cgit v1.2.3-70-g09d2 From 7b770a6a0a8504327224ad891d6862893456290d Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Tue, 13 Aug 2013 15:17:38 -0400 Subject: tile: mark pcibios_init() as __init It was bombed away because it was previously marked as __devinit, but it should be an __init function. Signed-off-by: Chris Metcalf --- arch/tile/kernel/pci.c | 2 +- arch/tile/kernel/pci_gx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/tile/kernel/pci.c') diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index af75835d6ed..b7180e6e900 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c @@ -386,7 +386,7 @@ void pcibios_set_master(struct pci_dev *dev) } /* Process any "pci=" kernel boot arguments. */ -char * __init pcibios_setup(char *str) +char *__init pcibios_setup(char *str) { if (!strcmp(str, "off")) { pci_probe = 0; diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c index 48438818d69..66ef9db5c2f 100644 --- a/arch/tile/kernel/pci_gx.c +++ b/arch/tile/kernel/pci_gx.c @@ -1060,7 +1060,7 @@ void pcibios_fixup_bus(struct pci_bus *bus) } /* Process any "pci=" kernel boot arguments. */ -char *pcibios_setup(char *str) +char *__init pcibios_setup(char *str) { if (!strcmp(str, "off")) { pci_probe = 0; -- cgit v1.2.3-70-g09d2