Commit 9bbb08faa91db7711614c9cb0983644086b97aca

Authored by Chris Metcalf
1 parent 5916700c76

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>

Showing 2 changed files with 3 additions and 14 deletions Side-by-side Diff

arch/tile/include/asm/pci.h
... ... @@ -29,7 +29,6 @@
29 29 int index; /* PCI domain number */
30 30 struct pci_bus *root_bus;
31 31  
32   - int first_busno;
33 32 int last_busno;
34 33  
35 34 int hv_cfg_fd[2]; /* config{0,1} fds for this PCIe controller */
arch/tile/kernel/pci.c
... ... @@ -20,7 +20,6 @@
20 20 #include <linux/capability.h>
21 21 #include <linux/sched.h>
22 22 #include <linux/errno.h>
23   -#include <linux/bootmem.h>
24 23 #include <linux/irq.h>
25 24 #include <linux/io.h>
26 25 #include <linux/uaccess.h>
... ... @@ -192,7 +191,6 @@
192 191 controller->hv_cfg_fd[0] = hv_cfg_fd0;
193 192 controller->hv_cfg_fd[1] = hv_cfg_fd1;
194 193 controller->hv_mem_fd = hv_mem_fd;
195   - controller->first_busno = 0;
196 194 controller->last_busno = 0xff;
197 195 controller->ops = &tile_cfg_ops;
198 196  
... ... @@ -283,7 +281,7 @@
283 281 * known to require at least 20ms here, but we use a more
284 282 * conservative value.
285 283 */
286   - mdelay(250);
  284 + msleep(250);
287 285  
288 286 /* Scan all of the recorded PCI controllers. */
289 287 for (i = 0; i < TILE_NUM_PCIE; i++) {
290 288  
... ... @@ -304,18 +302,10 @@
304 302  
305 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 305 pci_add_resource(&resources, &ioport_resource);
317 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 309 controller->root_bus = bus;
320 310 controller->last_busno = bus->busn_res.end;
321 311 }