Lines Matching refs:hpc_ptr
243 struct controller *hpc_ptr; in print_ebda_hpc() local
249 hpc_ptr = list_entry (ptr1, struct controller, ebda_hpc_list); in print_ebda_hpc()
251 for (index = 0; index < hpc_ptr->slot_count; index++) { in print_ebda_hpc()
252 debug ("%s - physical slot#: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_num); in print_ebda_hpc()
253 debug ("%s - pci bus# of the slot: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_bus_num); in print_ebda_hpc()
254 debug ("%s - index into ctlr addr: %x\n", __FUNCTION__, hpc_ptr->slots[index].ctl_index); in print_ebda_hpc()
255 debug ("%s - cap of the slot: %x\n", __FUNCTION__, hpc_ptr->slots[index].slot_cap); in print_ebda_hpc()
258 for (index = 0; index < hpc_ptr->bus_count; index++) { in print_ebda_hpc()
259 …debug ("%s - bus# of each bus controlled by this ctlr: %x\n", __FUNCTION__, hpc_ptr->buses[index].… in print_ebda_hpc()
262 debug ("%s - type of hpc: %x\n", __FUNCTION__, hpc_ptr->ctlr_type); in print_ebda_hpc()
263 switch (hpc_ptr->ctlr_type) { in print_ebda_hpc()
265 debug ("%s - bus: %x\n", __FUNCTION__, hpc_ptr->u.pci_ctlr.bus); in print_ebda_hpc()
266 debug ("%s - dev_fun: %x\n", __FUNCTION__, hpc_ptr->u.pci_ctlr.dev_fun); in print_ebda_hpc()
267 debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq); in print_ebda_hpc()
271 debug ("%s - io_start: %x\n", __FUNCTION__, hpc_ptr->u.isa_ctlr.io_start); in print_ebda_hpc()
272 debug ("%s - io_end: %x\n", __FUNCTION__, hpc_ptr->u.isa_ctlr.io_end); in print_ebda_hpc()
273 debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq); in print_ebda_hpc()
278 debug ("%s - wpegbbar: %lx\n", __FUNCTION__, hpc_ptr->u.wpeg_ctlr.wpegbbar); in print_ebda_hpc()
279 debug ("%s - i2c_addr: %x\n", __FUNCTION__, hpc_ptr->u.wpeg_ctlr.i2c_addr); in print_ebda_hpc()
280 debug ("%s - irq: %x\n", __FUNCTION__, hpc_ptr->irq); in print_ebda_hpc()
748 struct controller *hpc_ptr; in ebda_rsrc_controller() local
776 hpc_ptr = alloc_ebda_hpc (slot_num, bus_num); in ebda_rsrc_controller()
777 if (!hpc_ptr ) { in ebda_rsrc_controller()
781 hpc_ptr->ctlr_id = ctlr_id; in ebda_rsrc_controller()
782 hpc_ptr->ctlr_relative_id = ctlr; in ebda_rsrc_controller()
783 hpc_ptr->slot_count = slot_num; in ebda_rsrc_controller()
784 hpc_ptr->bus_count = bus_num; in ebda_rsrc_controller()
787 debug ("ctlr_relative_id: %x\n", hpc_ptr->ctlr_relative_id); in ebda_rsrc_controller()
792 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()
936 tmp_slot->capabilities = hpc_ptr->slots[index].slot_cap; in ebda_rsrc_controller()
937 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_133_MAX) == EBDA_SLOT_133_MAX) in ebda_rsrc_controller()
939 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_100_MAX) == EBDA_SLOT_100_MAX) in ebda_rsrc_controller()
941 else if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_66_MAX) == EBDA_SLOT_66_MAX) in ebda_rsrc_controller()
944 if ((hpc_ptr->slots[index].slot_cap & EBDA_SLOT_PCIX_CAP) == EBDA_SLOT_PCIX_CAP) in ebda_rsrc_controller()
950 tmp_slot->bus = hpc_ptr->slots[index].slot_bus_num; in ebda_rsrc_controller()
952 bus_info_ptr1 = ibmphp_find_same_bus_num (hpc_ptr->slots[index].slot_bus_num); in ebda_rsrc_controller()
959 tmp_slot->ctrl = hpc_ptr; in ebda_rsrc_controller()
961 tmp_slot->ctlr_index = hpc_ptr->slots[index].ctl_index; in ebda_rsrc_controller()
962 tmp_slot->number = hpc_ptr->slots[index].slot_num; in ebda_rsrc_controller()
982 list_add (&hpc_ptr->ebda_hpc_list, &ebda_hpc_head ); in ebda_rsrc_controller()
1006 free_ebda_hpc (hpc_ptr); in ebda_rsrc_controller()