Loading arch/alpha/include/asm/pci.h +1 −6 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include <linux/dma-mapping.h> #include <asm/scatterlist.h> #include <asm/machvec.h> #include <asm-generic/pci-bridge.h> /* * The following structure is used to manage multiple PCI busses. Loading Loading @@ -99,12 +100,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) return channel ? 15 : 14; } extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *, struct resource *); extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, struct pci_bus_region *region); #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index static inline int pci_proc_domain(struct pci_bus *bus) Loading arch/alpha/kernel/pci.c +11 −75 Original line number Diff line number Diff line Loading @@ -43,12 +43,10 @@ const char *const pci_mem_names[] = { const char pci_hae0_name[] = "HAE0"; /* Indicate whether we respect the PCI setup left by console. */ /* * Make this long-lived so that we know when shutting down * whether we probed only or not. * If PCI_PROBE_ONLY in pci_flags is set, we don't change any PCI resource * assignments. */ int pci_probe_only; /* * The PCI controller list. Loading Loading @@ -215,7 +213,7 @@ pdev_save_srm_config(struct pci_dev *dev) struct pdev_srm_saved_conf *tmp; static int printed = 0; if (!alpha_using_srm || pci_probe_only) if (!alpha_using_srm || pci_has_flag(PCI_PROBE_ONLY)) return; if (!printed) { Loading @@ -242,7 +240,7 @@ pci_restore_srm_config(void) struct pdev_srm_saved_conf *tmp; /* No need to restore if probed only. */ if (pci_probe_only) if (pci_has_flag(PCI_PROBE_ONLY)) return; /* Restore SRM config. */ Loading @@ -252,47 +250,18 @@ pci_restore_srm_config(void) } #endif void __devinit pcibios_fixup_resource(struct resource *res, struct resource *root) { res->start += root->start; res->end += root->start; } void __devinit pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus) { /* Update device resources. */ struct pci_controller *hose = (struct pci_controller *)bus->sysdata; int i; for (i = 0; i < PCI_NUM_RESOURCES; i++) { if (!dev->resource[i].start) continue; if (dev->resource[i].flags & IORESOURCE_IO) pcibios_fixup_resource(&dev->resource[i], hose->io_space); else if (dev->resource[i].flags & IORESOURCE_MEM) pcibios_fixup_resource(&dev->resource[i], hose->mem_space); } } void __devinit pcibios_fixup_bus(struct pci_bus *bus) { struct pci_dev *dev = bus->self; if (pci_probe_only && dev && if (pci_has_flag(PCI_PROBE_ONLY) && dev && (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { pci_read_bridge_bases(bus); pcibios_fixup_device_resources(dev, bus); } list_for_each_entry(dev, &bus->devices, bus_list) { pdev_save_srm_config(dev); if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) pcibios_fixup_device_resources(dev, bus); } } Loading @@ -302,42 +271,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq) pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); } void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, struct resource *res) { struct pci_controller *hose = (struct pci_controller *)dev->sysdata; unsigned long offset = 0; if (res->flags & IORESOURCE_IO) offset = hose->io_space->start; else if (res->flags & IORESOURCE_MEM) offset = hose->mem_space->start; region->start = res->start - offset; region->end = res->end - offset; } void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, struct pci_bus_region *region) { struct pci_controller *hose = (struct pci_controller *)dev->sysdata; unsigned long offset = 0; if (res->flags & IORESOURCE_IO) offset = hose->io_space->start; else if (res->flags & IORESOURCE_MEM) offset = hose->mem_space->start; res->start = region->start + offset; res->end = region->end + offset; } #ifdef CONFIG_HOTPLUG EXPORT_SYMBOL(pcibios_resource_to_bus); EXPORT_SYMBOL(pcibios_bus_to_resource); #endif int pcibios_enable_device(struct pci_dev *dev, int mask) { Loading Loading @@ -374,7 +307,8 @@ pcibios_claim_one_bus(struct pci_bus *b) if (r->parent || !r->start || !r->flags) continue; if (pci_probe_only || (r->flags & IORESOURCE_PCI_FIXED)) if (pci_has_flag(PCI_PROBE_ONLY) || (r->flags & IORESOURCE_PCI_FIXED)) pci_claim_resource(dev, i); } } Loading Loading @@ -416,8 +350,10 @@ common_init_pci(void) hose->mem_space->end = end; INIT_LIST_HEAD(&resources); pci_add_resource(&resources, hose->io_space); pci_add_resource(&resources, hose->mem_space); pci_add_resource_offset(&resources, hose->io_space, hose->io_space->start); pci_add_resource_offset(&resources, hose->mem_space, hose->mem_space->start); bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops, hose, &resources); Loading arch/alpha/kernel/pci_impl.h +0 −3 Original line number Diff line number Diff line Loading @@ -173,9 +173,6 @@ extern void pci_restore_srm_config(void); extern struct pci_controller *hose_head, **hose_tail; extern struct pci_controller *pci_isa_hose; /* Indicate that we trust the console to configure things properly. */ extern int pci_probe_only; extern unsigned long alpha_agpgart_size; extern void common_init_pci(void); Loading arch/alpha/kernel/sys_marvel.c +2 −1 Original line number Diff line number Diff line Loading @@ -384,7 +384,8 @@ marvel_init_pci(void) marvel_register_error_handlers(); pci_probe_only = 1; /* Indicate that we trust the console to configure things properly */ pci_set_flags(PCI_PROBE_ONLY); common_init_pci(); locate_and_init_vga(NULL); Loading arch/alpha/kernel/sys_titan.c +2 −1 Original line number Diff line number Diff line Loading @@ -331,7 +331,8 @@ titan_init_pci(void) */ titan_late_init(); pci_probe_only = 1; /* Indicate that we trust the console to configure things properly */ pci_set_flags(PCI_PROBE_ONLY); common_init_pci(); SMC669_Init(0); locate_and_init_vga(NULL); Loading Loading
arch/alpha/include/asm/pci.h +1 −6 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include <linux/dma-mapping.h> #include <asm/scatterlist.h> #include <asm/machvec.h> #include <asm-generic/pci-bridge.h> /* * The following structure is used to manage multiple PCI busses. Loading Loading @@ -99,12 +100,6 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) return channel ? 15 : 14; } extern void pcibios_resource_to_bus(struct pci_dev *, struct pci_bus_region *, struct resource *); extern void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, struct pci_bus_region *region); #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index static inline int pci_proc_domain(struct pci_bus *bus) Loading
arch/alpha/kernel/pci.c +11 −75 Original line number Diff line number Diff line Loading @@ -43,12 +43,10 @@ const char *const pci_mem_names[] = { const char pci_hae0_name[] = "HAE0"; /* Indicate whether we respect the PCI setup left by console. */ /* * Make this long-lived so that we know when shutting down * whether we probed only or not. * If PCI_PROBE_ONLY in pci_flags is set, we don't change any PCI resource * assignments. */ int pci_probe_only; /* * The PCI controller list. Loading Loading @@ -215,7 +213,7 @@ pdev_save_srm_config(struct pci_dev *dev) struct pdev_srm_saved_conf *tmp; static int printed = 0; if (!alpha_using_srm || pci_probe_only) if (!alpha_using_srm || pci_has_flag(PCI_PROBE_ONLY)) return; if (!printed) { Loading @@ -242,7 +240,7 @@ pci_restore_srm_config(void) struct pdev_srm_saved_conf *tmp; /* No need to restore if probed only. */ if (pci_probe_only) if (pci_has_flag(PCI_PROBE_ONLY)) return; /* Restore SRM config. */ Loading @@ -252,47 +250,18 @@ pci_restore_srm_config(void) } #endif void __devinit pcibios_fixup_resource(struct resource *res, struct resource *root) { res->start += root->start; res->end += root->start; } void __devinit pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus) { /* Update device resources. */ struct pci_controller *hose = (struct pci_controller *)bus->sysdata; int i; for (i = 0; i < PCI_NUM_RESOURCES; i++) { if (!dev->resource[i].start) continue; if (dev->resource[i].flags & IORESOURCE_IO) pcibios_fixup_resource(&dev->resource[i], hose->io_space); else if (dev->resource[i].flags & IORESOURCE_MEM) pcibios_fixup_resource(&dev->resource[i], hose->mem_space); } } void __devinit pcibios_fixup_bus(struct pci_bus *bus) { struct pci_dev *dev = bus->self; if (pci_probe_only && dev && if (pci_has_flag(PCI_PROBE_ONLY) && dev && (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { pci_read_bridge_bases(bus); pcibios_fixup_device_resources(dev, bus); } list_for_each_entry(dev, &bus->devices, bus_list) { pdev_save_srm_config(dev); if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI) pcibios_fixup_device_resources(dev, bus); } } Loading @@ -302,42 +271,6 @@ pcibios_update_irq(struct pci_dev *dev, int irq) pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); } void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, struct resource *res) { struct pci_controller *hose = (struct pci_controller *)dev->sysdata; unsigned long offset = 0; if (res->flags & IORESOURCE_IO) offset = hose->io_space->start; else if (res->flags & IORESOURCE_MEM) offset = hose->mem_space->start; region->start = res->start - offset; region->end = res->end - offset; } void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, struct pci_bus_region *region) { struct pci_controller *hose = (struct pci_controller *)dev->sysdata; unsigned long offset = 0; if (res->flags & IORESOURCE_IO) offset = hose->io_space->start; else if (res->flags & IORESOURCE_MEM) offset = hose->mem_space->start; res->start = region->start + offset; res->end = region->end + offset; } #ifdef CONFIG_HOTPLUG EXPORT_SYMBOL(pcibios_resource_to_bus); EXPORT_SYMBOL(pcibios_bus_to_resource); #endif int pcibios_enable_device(struct pci_dev *dev, int mask) { Loading Loading @@ -374,7 +307,8 @@ pcibios_claim_one_bus(struct pci_bus *b) if (r->parent || !r->start || !r->flags) continue; if (pci_probe_only || (r->flags & IORESOURCE_PCI_FIXED)) if (pci_has_flag(PCI_PROBE_ONLY) || (r->flags & IORESOURCE_PCI_FIXED)) pci_claim_resource(dev, i); } } Loading Loading @@ -416,8 +350,10 @@ common_init_pci(void) hose->mem_space->end = end; INIT_LIST_HEAD(&resources); pci_add_resource(&resources, hose->io_space); pci_add_resource(&resources, hose->mem_space); pci_add_resource_offset(&resources, hose->io_space, hose->io_space->start); pci_add_resource_offset(&resources, hose->mem_space, hose->mem_space->start); bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops, hose, &resources); Loading
arch/alpha/kernel/pci_impl.h +0 −3 Original line number Diff line number Diff line Loading @@ -173,9 +173,6 @@ extern void pci_restore_srm_config(void); extern struct pci_controller *hose_head, **hose_tail; extern struct pci_controller *pci_isa_hose; /* Indicate that we trust the console to configure things properly. */ extern int pci_probe_only; extern unsigned long alpha_agpgart_size; extern void common_init_pci(void); Loading
arch/alpha/kernel/sys_marvel.c +2 −1 Original line number Diff line number Diff line Loading @@ -384,7 +384,8 @@ marvel_init_pci(void) marvel_register_error_handlers(); pci_probe_only = 1; /* Indicate that we trust the console to configure things properly */ pci_set_flags(PCI_PROBE_ONLY); common_init_pci(); locate_and_init_vga(NULL); Loading
arch/alpha/kernel/sys_titan.c +2 −1 Original line number Diff line number Diff line Loading @@ -331,7 +331,8 @@ titan_init_pci(void) */ titan_late_init(); pci_probe_only = 1; /* Indicate that we trust the console to configure things properly */ pci_set_flags(PCI_PROBE_ONLY); common_init_pci(); SMC669_Init(0); locate_and_init_vga(NULL); Loading