• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/powerpc/kernel/

Lines Matching refs:hose

103 static resource_size_t pcibios_io_size(const struct pci_controller *hose)
106 return hose->pci_io_size;
108 return hose->io_resource.end - hose->io_resource.start + 1;
115 struct pci_controller *hose;
119 list_for_each_entry(hose, &hose_list, list_node) {
120 size = pcibios_io_size(hose);
121 if (address >= hose->io_base_virt &&
122 address < (hose->io_base_virt + size)) {
133 struct pci_controller *hose;
138 list_for_each_entry(hose, &hose_list, list_node) {
139 size = pcibios_io_size(hose);
140 if (address >= hose->io_base_phys &&
141 address < (hose->io_base_phys + size)) {
143 (unsigned long)hose->io_base_virt - _IO_BASE;
144 ret = base + (address - hose->io_base_phys);
159 struct pci_controller *hose = pci_bus_to_host(bus);
161 return hose->global_number;
175 struct pci_controller *hose, *tmp;
176 list_for_each_entry_safe(hose, tmp, &hose_list, list_node)
177 if (hose->dn == node)
178 return hose;
295 struct pci_controller *hose = pci_bus_to_host(dev->bus);
299 if (hose == 0)
306 io_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
333 *offset += hose->io_base_phys - io_offset;
451 struct pci_controller *hose = pci_bus_to_host(bus);
452 struct resource *rp = &hose->io_resource;
460 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
467 addr = hose->io_base_virt + port;
491 struct pci_controller *hose = pci_bus_to_host(bus);
492 struct resource *rp = &hose->io_resource;
500 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
507 addr = hose->io_base_virt + port;
537 struct pci_controller *hose = pci_bus_to_host(bus);
557 if ((offset + size) > hose->isa_mem_size) {
565 offset += hose->isa_mem_phys;
567 unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE;
569 rp = &hose->io_resource;
574 offset += hose->io_base_phys;
589 struct pci_controller *hose = pci_bus_to_host(dev->bus);
592 if (hose == NULL)
596 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
622 * @hose: newly allocated pci_controller to be setup
653 void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
714 if (hose->pci_io_size) {
725 hose->io_base_virt = ioremap(cpu_addr, size);
730 (unsigned long)hose->io_base_virt;
735 hose->pci_io_size = pci_addr + size;
736 hose->io_base_phys = cpu_addr - pci_addr;
739 res = &hose->io_resource;
762 hose->isa_mem_phys = cpu_addr;
763 hose->isa_mem_size = size;
772 hose->pci_mem_offset == isa_mb))
773 hose->pci_mem_offset = cpu_addr - pci_addr;
775 hose->pci_mem_offset != cpu_addr - pci_addr) {
782 res = &hose->mem_resources[memno++];
802 if (isa_hole >= 0 && hose->pci_mem_offset != isa_mb) {
806 memmove(&hose->mem_resources[isa_hole],
807 &hose->mem_resources[next],
809 hose->mem_resources[--memno].flags = 0;
816 struct pci_controller *hose = pci_bus_to_host(bus);
821 return hose->global_number != 0;
829 struct pci_controller *hose = pci_bus_to_host(dev->bus);
831 if (!hose)
834 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
837 offset = hose->pci_mem_offset;
848 struct pci_controller *hose = pci_bus_to_host(dev->bus);
850 if (!hose)
853 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
856 offset = hose->pci_mem_offset;
865 struct pci_controller *hose = pci_bus_to_host(dev->bus);
869 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
872 offset = hose->pci_mem_offset;
884 struct pci_controller *hose = pci_bus_to_host(dev->bus);
887 if (!hose) {
942 struct pci_controller *hose = pci_bus_to_host(bus);
957 if (res->start != hose->pci_mem_offset)
972 if ((hose->mem_resources[i].flags & IORESOURCE_MEM) &&
973 hose->mem_resources[i].start == hose->pci_mem_offset)
983 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
1340 struct pci_controller *hose = pci_bus_to_host(bus);
1348 if (!(hose->io_resource.flags & IORESOURCE_IO))
1350 offset = (unsigned long)hose->io_base_virt - _IO_BASE;
1358 if (request_resource(&hose->io_resource, res)) {
1367 offset = hose->pci_mem_offset;
1368 pr_debug("hose mem offset: %016llx\n", (unsigned long long)offset);
1370 pres = &hose->mem_resources[i];
1373 pr_debug("hose mem res: %pR\n", pres);
1503 void __devinit pcibios_setup_phb_resources(struct pci_controller *hose)
1505 struct pci_bus *bus = hose->bus;
1510 bus->resource[0] = res = &hose->io_resource;
1515 hose->dn->full_name, hose->global_number);
1517 res->start = (unsigned long)hose->io_base_virt - isa_io_base;
1530 res = &hose->mem_resources[i];
1536 hose->dn->full_name, hose->global_number);
1538 res->start = hose->pci_mem_offset;
1552 (unsigned long long)hose->pci_mem_offset);
1554 (unsigned long)hose->io_base_virt - _IO_BASE);
1560 * find a hose.
1594 fake_pci_bus(struct pci_controller *hose, int busnr)
1598 if (hose == 0) {
1599 printk(KERN_ERR "Can't find hose for PCI bus %d!\n", busnr);
1602 bus.sysdata = hose;
1603 bus.ops = hose? hose->ops: &null_pci_ops;
1608 int early_##rw##_config_##size(struct pci_controller *hose, int bus, \
1611 return pci_bus_##rw##_config_##size(fake_pci_bus(hose, bus), \
1623 int early_find_capability(struct pci_controller *hose, int bus, int devfn,
1626 return pci_bus_find_capability(fake_pci_bus(hose, bus), devfn, cap);
1631 * @hose: Pointer to the PCI host controller instance structure
1638 void __devinit pcibios_scan_phb(struct pci_controller *hose, void *sysdata)
1641 struct device_node *node = hose->dn;
1648 bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops,
1652 hose->global_number);
1655 bus->secondary = hose->first_busno;
1656 hose->bus = bus;
1659 pcibios_setup_phb_io_space(hose);
1662 pcibios_setup_phb_resources(hose);
1670 bus->subordinate = hose->last_busno;
1675 hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);