Commit 9bbb08fa authored by Chris Metcalf's avatar Chris Metcalf

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: default avatarChris Metcalf <cmetcalf@tilera.com>
parent 5916700c
...@@ -29,7 +29,6 @@ struct pci_controller { ...@@ -29,7 +29,6 @@ struct pci_controller {
int index; /* PCI domain number */ int index; /* PCI domain number */
struct pci_bus *root_bus; struct pci_bus *root_bus;
int first_busno;
int last_busno; int last_busno;
int hv_cfg_fd[2]; /* config{0,1} fds for this PCIe controller */ int hv_cfg_fd[2]; /* config{0,1} fds for this PCIe controller */
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/bootmem.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
...@@ -192,7 +191,6 @@ int __init tile_pci_init(void) ...@@ -192,7 +191,6 @@ int __init tile_pci_init(void)
controller->hv_cfg_fd[0] = hv_cfg_fd0; controller->hv_cfg_fd[0] = hv_cfg_fd0;
controller->hv_cfg_fd[1] = hv_cfg_fd1; controller->hv_cfg_fd[1] = hv_cfg_fd1;
controller->hv_mem_fd = hv_mem_fd; controller->hv_mem_fd = hv_mem_fd;
controller->first_busno = 0;
controller->last_busno = 0xff; controller->last_busno = 0xff;
controller->ops = &tile_cfg_ops; controller->ops = &tile_cfg_ops;
...@@ -283,7 +281,7 @@ int __init pcibios_init(void) ...@@ -283,7 +281,7 @@ int __init pcibios_init(void)
* known to require at least 20ms here, but we use a more * known to require at least 20ms here, but we use a more
* conservative value. * conservative value.
*/ */
mdelay(250); msleep(250);
/* Scan all of the recorded PCI controllers. */ /* Scan all of the recorded PCI controllers. */
for (i = 0; i < TILE_NUM_PCIE; i++) { for (i = 0; i < TILE_NUM_PCIE; i++) {
...@@ -304,18 +302,10 @@ int __init pcibios_init(void) ...@@ -304,18 +302,10 @@ int __init pcibios_init(void)
pr_info("PCI: initializing controller #%d\n", i); 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, &ioport_resource);
pci_add_resource(&resources, &iomem_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->root_bus = bus;
controller->last_busno = bus->busn_res.end; controller->last_busno = bus->busn_res.end;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment