Lines Matching refs:hpc_ptr

193 	struct controller *hpc_ptr;  in print_ebda_hpc()  local
196 list_for_each_entry(hpc_ptr, &ebda_hpc_head, ebda_hpc_list) { in print_ebda_hpc()
197 for (index = 0; index < hpc_ptr->slot_count; index++) { in print_ebda_hpc()
198 debug("%s - physical slot#: %x\n", __func__, hpc_ptr->slots[index].slot_num); in print_ebda_hpc()
199 debug("%s - pci bus# of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_bus_num); in print_ebda_hpc()
200 debug("%s - index into ctlr addr: %x\n", __func__, hpc_ptr->slots[index].ctl_index); in print_ebda_hpc()
201 debug("%s - cap of the slot: %x\n", __func__, hpc_ptr->slots[index].slot_cap); in print_ebda_hpc()
204 for (index = 0; index < hpc_ptr->bus_count; index++) in print_ebda_hpc()
205 …debug("%s - bus# of each bus controlled by this ctlr: %x\n", __func__, hpc_ptr->buses[index].bus_n… in print_ebda_hpc()
207 debug("%s - type of hpc: %x\n", __func__, hpc_ptr->ctlr_type); in print_ebda_hpc()
208 switch (hpc_ptr->ctlr_type) { in print_ebda_hpc()
210 debug("%s - bus: %x\n", __func__, hpc_ptr->u.pci_ctlr.bus); in print_ebda_hpc()
211 debug("%s - dev_fun: %x\n", __func__, hpc_ptr->u.pci_ctlr.dev_fun); in print_ebda_hpc()
212 debug("%s - irq: %x\n", __func__, hpc_ptr->irq); in print_ebda_hpc()
216 debug("%s - io_start: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_start); in print_ebda_hpc()
217 debug("%s - io_end: %x\n", __func__, hpc_ptr->u.isa_ctlr.io_end); in print_ebda_hpc()
218 debug("%s - irq: %x\n", __func__, hpc_ptr->irq); in print_ebda_hpc()
223 debug("%s - wpegbbar: %lx\n", __func__, hpc_ptr->u.wpeg_ctlr.wpegbbar); in print_ebda_hpc()
224 debug("%s - i2c_addr: %x\n", __func__, hpc_ptr->u.wpeg_ctlr.i2c_addr); in print_ebda_hpc()
225 debug("%s - irq: %x\n", __func__, hpc_ptr->irq); in print_ebda_hpc()
716 struct controller *hpc_ptr; in ebda_rsrc_controller() local
744 hpc_ptr = alloc_ebda_hpc(slot_num, bus_num); in ebda_rsrc_controller()
745 if (!hpc_ptr) { in ebda_rsrc_controller()
749 hpc_ptr->ctlr_id = ctlr_id; in ebda_rsrc_controller()
750 hpc_ptr->ctlr_relative_id = ctlr; in ebda_rsrc_controller()
751 hpc_ptr->slot_count = slot_num; in ebda_rsrc_controller()
752 hpc_ptr->bus_count = bus_num; in ebda_rsrc_controller()
755 debug("ctlr_relative_id: %x\n", hpc_ptr->ctlr_relative_id); in ebda_rsrc_controller()
760 slot_ptr = hpc_ptr->slots; in ebda_rsrc_controller()
784 bus_info_ptr1->controller_id = hpc_ptr->ctlr_id; in ebda_rsrc_controller()
802 bus_ptr = hpc_ptr->buses; in ebda_rsrc_controller()
825 hpc_ptr->ctlr_type = temp; in ebda_rsrc_controller()
827 switch (hpc_ptr->ctlr_type) { in ebda_rsrc_controller()
829 hpc_ptr->u.pci_ctlr.bus = readb(io_mem + addr); in ebda_rsrc_controller()
830 hpc_ptr->u.pci_ctlr.dev_fun = readb(io_mem + addr + 1); in ebda_rsrc_controller()
831 hpc_ptr->irq = readb(io_mem + addr + 2); in ebda_rsrc_controller()
834 hpc_ptr->u.pci_ctlr.bus, in ebda_rsrc_controller()
835 hpc_ptr->u.pci_ctlr.dev_fun, hpc_ptr->irq); in ebda_rsrc_controller()
839 hpc_ptr->u.isa_ctlr.io_start = readw(io_mem + addr); in ebda_rsrc_controller()
840 hpc_ptr->u.isa_ctlr.io_end = readw(io_mem + addr + 2); in ebda_rsrc_controller()
841 if (!request_region(hpc_ptr->u.isa_ctlr.io_start, in ebda_rsrc_controller()
842 (hpc_ptr->u.isa_ctlr.io_end - hpc_ptr->u.isa_ctlr.io_start + 1), in ebda_rsrc_controller()
847 hpc_ptr->irq = readb(io_mem + addr + 4); in ebda_rsrc_controller()
853 hpc_ptr->u.wpeg_ctlr.wpegbbar = readl(io_mem + addr); in ebda_rsrc_controller()
854 hpc_ptr->u.wpeg_ctlr.i2c_addr = readb(io_mem + addr + 4); in ebda_rsrc_controller()
855 hpc_ptr->irq = readb(io_mem + addr + 5); in ebda_rsrc_controller()
866 hpc_ptr->revision = 0xff; in ebda_rsrc_controller()
867 hpc_ptr->options = 0xff; in ebda_rsrc_controller()
868 hpc_ptr->starting_slot_num = hpc_ptr->slots[0].slot_num; in ebda_rsrc_controller()
869 hpc_ptr->ending_slot_num = hpc_ptr->slots[slot_num-1].slot_num; in ebda_rsrc_controller()
872 for (index = 0; index < hpc_ptr->slot_count; index++) { in ebda_rsrc_controller()
894 tmp_slot->capabilities = hpc_ptr->slots[index].slot_cap; in ebda_rsrc_controller()
895 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_133_MAX) == EBDA_SLOT_133_MAX) in ebda_rsrc_controller()
897 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_100_MAX) == EBDA_SLOT_100_MAX) in ebda_rsrc_controller()
899 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_66_MAX) == EBDA_SLOT_66_MAX) in ebda_rsrc_controller()
902 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_PCIX_CAP) == EBDA_SLOT_PCIX_CAP) in ebda_rsrc_controller()
908 tmp_slot->bus = hpc_ptr->slots[index].slot_bus_num; in ebda_rsrc_controller()
910 bus_info_ptr1 = ibmphp_find_same_bus_num(hpc_ptr->slots[index].slot_bus_num); in ebda_rsrc_controller()
918 tmp_slot->ctrl = hpc_ptr; in ebda_rsrc_controller()
920 tmp_slot->ctlr_index = hpc_ptr->slots[index].ctl_index; in ebda_rsrc_controller()
921 tmp_slot->number = hpc_ptr->slots[index].slot_num; in ebda_rsrc_controller()
941 list_add(&hpc_ptr->ebda_hpc_list, &ebda_hpc_head); in ebda_rsrc_controller()
962 free_ebda_hpc(hpc_ptr); in ebda_rsrc_controller()