aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2013-08-02 11:59:06 -0400
committerChris Metcalf <cmetcalf@tilera.com>2013-08-05 16:12:38 -0400
commit9bbb08faa91db7711614c9cb0983644086b97aca (patch)
tree0dbbc038a9aa049451db3dbdebabae1757d8a40e /arch
parent5916700c768803546b6fe7d093dcba40d22fcf57 (diff)
tile PCI RC: cleanups for tilepro PCI RC
- remove unneeded <linux/bootmem.h> 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 <cmetcalf@tilera.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/tile/include/asm/pci.h1
-rw-r--r--arch/tile/kernel/pci.c16
2 files changed, 3 insertions, 14 deletions
diff --git a/arch/tile/include/asm/pci.h b/arch/tile/include/asm/pci.h
index 54a924208d3c..cd10e654916e 100644
--- a/arch/tile/include/asm/pci.h
+++ b/arch/tile/include/asm/pci.h
@@ -29,7 +29,6 @@ struct pci_controller {
29 int index; /* PCI domain number */ 29 int index; /* PCI domain number */
30 struct pci_bus *root_bus; 30 struct pci_bus *root_bus;
31 31
32 int first_busno;
33 int last_busno; 32 int last_busno;
34 33
35 int hv_cfg_fd[2]; /* config{0,1} fds for this PCIe controller */ 34 int hv_cfg_fd[2]; /* config{0,1} fds for this PCIe controller */
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index 67237d34c2e2..1dae3b2183a0 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -20,7 +20,6 @@
20#include <linux/capability.h> 20#include <linux/capability.h>
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/errno.h> 22#include <linux/errno.h>
23#include <linux/bootmem.h>
24#include <linux/irq.h> 23#include <linux/irq.h>
25#include <linux/io.h> 24#include <linux/io.h>
26#include <linux/uaccess.h> 25#include <linux/uaccess.h>
@@ -192,7 +191,6 @@ int __init tile_pci_init(void)
192 controller->hv_cfg_fd[0] = hv_cfg_fd0; 191 controller->hv_cfg_fd[0] = hv_cfg_fd0;
193 controller->hv_cfg_fd[1] = hv_cfg_fd1; 192 controller->hv_cfg_fd[1] = hv_cfg_fd1;
194 controller->hv_mem_fd = hv_mem_fd; 193 controller->hv_mem_fd = hv_mem_fd;
195 controller->first_busno = 0;
196 controller->last_busno = 0xff; 194 controller->last_busno = 0xff;
197 controller->ops = &tile_cfg_ops; 195 controller->ops = &tile_cfg_ops;
198 196
@@ -283,7 +281,7 @@ int __init pcibios_init(void)
283 * known to require at least 20ms here, but we use a more 281 * known to require at least 20ms here, but we use a more
284 * conservative value. 282 * conservative value.
285 */ 283 */
286 mdelay(250); 284 msleep(250);
287 285
288 /* Scan all of the recorded PCI controllers. */ 286 /* Scan all of the recorded PCI controllers. */
289 for (i = 0; i < TILE_NUM_PCIE; i++) { 287 for (i = 0; i < TILE_NUM_PCIE; i++) {
@@ -304,18 +302,10 @@ int __init pcibios_init(void)
304 302
305 pr_info("PCI: initializing controller #%d\n", i); 303 pr_info("PCI: initializing controller #%d\n", i);
306 304
307 /*
308 * This comes from the generic Linux PCI driver.
309 *
310 * It reads the PCI tree for this bus into the Linux
311 * data structures.
312 *
313 * This is inlined in linux/pci.h and calls into
314 * pci_scan_bus_parented() in probe.c.
315 */
316 pci_add_resource(&resources, &ioport_resource); 305 pci_add_resource(&resources, &ioport_resource);
317 pci_add_resource(&resources, &iomem_resource); 306 pci_add_resource(&resources, &iomem_resource);
318 bus = pci_scan_root_bus(NULL, 0, controller->ops, controller, &resources); 307 bus = pci_scan_root_bus(NULL, 0, controller->ops,
308 controller, &resources);
319 controller->root_bus = bus; 309 controller->root_bus = bus;
320 controller->last_busno = bus->busn_res.end; 310 controller->last_busno = bus->busn_res.end;
321 } 311 }