Lines Matching refs:hpc_ptr
207 struct controller *hpc_ptr; in print_ebda_hpc() local
210 list_for_each_entry(hpc_ptr, &ebda_hpc_head, ebda_hpc_list) { in print_ebda_hpc()
211 for (index = 0; index < hpc_ptr->slot_count; index++) { in print_ebda_hpc()
212 debug ("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num); in print_ebda_hpc()
213 debug ("%s - pci bus# of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_bus_num); in print_ebda_hpc()
214 debug ("%s - index into ctlr addr: %x\n", __func__, hpc_ptr->slots[index].ctl_index); in print_ebda_hpc()
215 debug ("%s - cap of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_cap); in print_ebda_hpc()
218 for (index = 0; index < hpc_ptr->bus_count; index++) in print_ebda_hpc()
219 …debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __func__, hpc_ptr->buses[index].bus_… in print_ebda_hpc()
221 debug ("%s - type of hpc: %x\n", __func__, hpc_ptr->ctlr_type); in print_ebda_hpc()
222 switch (hpc_ptr->ctlr_type) { in print_ebda_hpc()
224 debug ("%s - bus: %x\n", __func__, hpc_ptr->u.pci_ctlr.bus); in print_ebda_hpc()
225 debug ("%s - dev_fun: %x\n", __func__, hpc_ptr->u.pci_ctlr.dev_fun); in print_ebda_hpc()
226 debug ("%s - irq: %x\n", __func__, hpc_ptr->irq); in print_ebda_hpc()
230 debug ("%s - io_start: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_start); in print_ebda_hpc()
231 debug ("%s - io_end: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_end); in print_ebda_hpc()
232 debug ("%s - irq: %x\n", __func__, hpc_ptr->irq); in print_ebda_hpc()
237 debug ("%s - wpegbbar: %lx\n", __func__, hpc_ptr->u.wpeg_ctlr.wpegbbar); in print_ebda_hpc()
238 debug ("%s - i2c_addr: %x\n", __func__, hpc_ptr->u.wpeg_ctlr.i2c_addr); in print_ebda_hpc()
239 debug ("%s - irq: %x\n", __func__, hpc_ptr->irq); in print_ebda_hpc()
749 struct controller *hpc_ptr; in ebda_rsrc_controller() local
777 hpc_ptr = alloc_ebda_hpc (slot_num, bus_num); in ebda_rsrc_controller()
778 if (!hpc_ptr ) { in ebda_rsrc_controller()
782 hpc_ptr->ctlr_id = ctlr_id; in ebda_rsrc_controller()
783 hpc_ptr->ctlr_relative_id = ctlr; in ebda_rsrc_controller()
784 hpc_ptr->slot_count = slot_num; in ebda_rsrc_controller()
785 hpc_ptr->bus_count = bus_num; in ebda_rsrc_controller()
788 debug ("ctlr_relative_id: %x\n", hpc_ptr->ctlr_relative_id); in ebda_rsrc_controller()
793 slot_ptr = hpc_ptr->slots; in ebda_rsrc_controller()
817 bus_info_ptr1->controller_id = hpc_ptr->ctlr_id; in ebda_rsrc_controller()
835 bus_ptr = hpc_ptr->buses; in ebda_rsrc_controller()
858 hpc_ptr->ctlr_type = temp; in ebda_rsrc_controller()
860 switch (hpc_ptr->ctlr_type) { in ebda_rsrc_controller()
862 hpc_ptr->u.pci_ctlr.bus = readb (io_mem + addr); in ebda_rsrc_controller()
863 hpc_ptr->u.pci_ctlr.dev_fun = readb (io_mem + addr + 1); in ebda_rsrc_controller()
864 hpc_ptr->irq = readb (io_mem + addr + 2); in ebda_rsrc_controller()
867 hpc_ptr->u.pci_ctlr.bus, in ebda_rsrc_controller()
868 hpc_ptr->u.pci_ctlr.dev_fun, hpc_ptr->irq); in ebda_rsrc_controller()
872 hpc_ptr->u.isa_ctlr.io_start = readw (io_mem + addr); in ebda_rsrc_controller()
873 hpc_ptr->u.isa_ctlr.io_end = readw (io_mem + addr + 2); in ebda_rsrc_controller()
874 if (!request_region (hpc_ptr->u.isa_ctlr.io_start, in ebda_rsrc_controller()
875 (hpc_ptr->u.isa_ctlr.io_end - hpc_ptr->u.isa_ctlr.io_start + 1), in ebda_rsrc_controller()
880 hpc_ptr->irq = readb (io_mem + addr + 4); in ebda_rsrc_controller()
886 hpc_ptr->u.wpeg_ctlr.wpegbbar = readl (io_mem + addr); in ebda_rsrc_controller()
887 hpc_ptr->u.wpeg_ctlr.i2c_addr = readb (io_mem + addr + 4); in ebda_rsrc_controller()
888 hpc_ptr->irq = readb (io_mem + addr + 5); in ebda_rsrc_controller()
899 hpc_ptr->revision = 0xff; in ebda_rsrc_controller()
900 hpc_ptr->options = 0xff; in ebda_rsrc_controller()
901 hpc_ptr->starting_slot_num = hpc_ptr->slots[0].slot_num; in ebda_rsrc_controller()
902 hpc_ptr->ending_slot_num = hpc_ptr->slots[slot_num-1].slot_num; in ebda_rsrc_controller()
905 for (index = 0; index < hpc_ptr->slot_count; index++) { in ebda_rsrc_controller()
927 tmp_slot->capabilities = hpc_ptr->slots[index].slot_cap; in ebda_rsrc_controller()
928 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_133_MAX) == EBDA_SLOT_133_MAX) in ebda_rsrc_controller()
930 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_100_MAX) == EBDA_SLOT_100_MAX) in ebda_rsrc_controller()
932 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_66_MAX) == EBDA_SLOT_66_MAX) in ebda_rsrc_controller()
935 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_PCIX_CAP) == EBDA_SLOT_PCIX_CAP) in ebda_rsrc_controller()
941 tmp_slot->bus = hpc_ptr->slots[index].slot_bus_num; in ebda_rsrc_controller()
943 bus_info_ptr1 = ibmphp_find_same_bus_num (hpc_ptr->slots[index].slot_bus_num); in ebda_rsrc_controller()
951 tmp_slot->ctrl = hpc_ptr; in ebda_rsrc_controller()
953 tmp_slot->ctlr_index = hpc_ptr->slots[index].ctl_index; in ebda_rsrc_controller()
954 tmp_slot->number = hpc_ptr->slots[index].slot_num; in ebda_rsrc_controller()
975 list_add (&hpc_ptr->ebda_hpc_list, &ebda_hpc_head ); in ebda_rsrc_controller()
996 free_ebda_hpc (hpc_ptr); in ebda_rsrc_controller()