Lines Matching refs:func
81 int ibmphp_configure_card (struct pci_func *func, u8 slotno) in ibmphp_configure_card() argument
95 debug ("inside configure_card, func->busno = %x \n", func->busno); in ibmphp_configure_card()
97 device = func->device; in ibmphp_configure_card()
98 cur_func = func; in ibmphp_configure_card()
193 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ in ibmphp_configure_card()
201 if (func->devices[i]) { in ibmphp_configure_card()
223 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ in ibmphp_configure_card()
265 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ in ibmphp_configure_card()
275 if (func->devices[i]) { in ibmphp_configure_card()
299 func->bus = 1; /* To indicate to the unconfigure function that this is a PPB */ in ibmphp_configure_card()
345 static int configure_device (struct pci_func *func) in configure_device() argument
369 device = func->device; in configure_device()
370 function = func->function; in configure_device()
387 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_device()
388 …pci_read_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], &… in configure_device()
393 debug ("Device %x BAR %d wants %x\n", func->device, count, bar[count]); in configure_device()
412 io[count]->busno = func->busno; in configure_device()
413 io[count]->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_device()
417 func->io[count] = io[count]; in configure_device()
420 func->busno, func->device, func->function, len[count]); in configure_device()
424 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_device()
427 debug ("b4 writing, the IO address is %x\n", func->io[count]->start); in configure_device()
428 …pci_read_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], &… in configure_device()
450 pfmem[count]->busno = func->busno; in configure_device()
451 pfmem[count]->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_device()
456 func->pfmem[count] = pfmem[count]; in configure_device()
477 func->pfmem[count] = pfmem[count]; in configure_device()
480 func->busno, func->device, len[count]); in configure_device()
487 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_device()
490 debug ("b4 writing, start addres is %x\n", func->pfmem[count]->start); in configure_device()
491 …pci_read_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], &… in configure_device()
499 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_device()
517 mem[count]->busno = func->busno; in configure_device()
518 mem[count]->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_device()
522 func->mem[count] = mem[count]; in configure_device()
525 func->busno, func->device, len[count]); in configure_device()
529 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_device()
531 debug ("b4 writing, start address is %x\n", func->mem[count]->start); in configure_device()
532 …pci_read_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], &… in configure_device()
541 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_device()
547 func->bus = 0; /* To indicate that this is not a PPB */ in configure_device()
548 …pci_read_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_INTERRUPT_PIN,… in configure_device()
550 …ci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_INTERRUPT_LINE… in configure_device()
552 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_CACHE_LINE_SI… in configure_device()
553 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_LATENCY_TIMER… in configure_device()
555 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_ROM_ADDRESS, … in configure_device()
556 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_COMMAND, DEVI… in configure_device()
595 struct pci_func *func = *func_passed; in configure_bridge() local
603 function = func->function; in configure_bridge()
604 device = func->device; in configure_bridge()
610 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PRIMARY_BUS, … in configure_bridge()
618 sec_number = find_sec_number (func->busno, slotno); in configure_bridge()
625 debug ("AFTER FIND_SEC_NUMBER, func->busno IS %x\n", func->busno); in configure_bridge()
627 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_SECONDARY_BUS… in configure_bridge()
634 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_SUBORDINATE_B… in configure_bridge()
641 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_CACHE_LINE_SI… in configure_bridge()
642 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_LATENCY_TIMER… in configure_bridge()
643 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_SEC_LATENCY_T… in configure_bridge()
645 debug ("func->busno is %x\n", func->busno); in configure_bridge()
656 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_bridge()
657 …pci_read_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], &… in configure_bridge()
684 bus_io[count]->busno = func->busno; in configure_bridge()
685 bus_io[count]->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_bridge()
689 func->io[count] = bus_io[count]; in configure_bridge()
692 func->busno, func->device, len[count]); in configure_bridge()
697 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_bridge()
716 bus_pfmem[count]->busno = func->busno; in configure_bridge()
717 bus_pfmem[count]->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_bridge()
722 func->pfmem[count] = bus_pfmem[count]; in configure_bridge()
740 func->pfmem[count] = bus_pfmem[count]; in configure_bridge()
743 func->busno, func->device, len[count]); in configure_bridge()
750 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_bridge()
756 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_bridge()
774 bus_mem[count]->busno = func->busno; in configure_bridge()
775 bus_mem[count]->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_bridge()
779 func->mem[count] = bus_mem[count]; in configure_bridge()
782 func->busno, func->device, len[count]); in configure_bridge()
787 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_bridge()
793 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, address[count], … in configure_bridge()
801 amount_needed = scan_behind_bridge (func, sec_number); in configure_bridge()
817 func->io[count] = NULL; in configure_bridge()
820 func->pfmem[count] = NULL; in configure_bridge()
823 func->mem[count] = NULL; in configure_bridge()
844 io->busno = func->busno; in configure_bridge()
845 io->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_bridge()
867 mem->busno = func->busno; in configure_bridge()
868 mem->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_bridge()
890 pfmem->busno = func->busno; in configure_bridge()
891 pfmem->devfunc = ((func->device << 3) | (func->function & 0x7)); in configure_bridge()
939 rc = add_new_bus (bus, io, mem, pfmem, func->busno); in configure_bridge()
949 ibmphp_remove_bus (bus, func->busno); in configure_bridge()
955 …pci_read_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_BASE, &io_b… in configure_bridge()
956 …pci_read_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_MEMORY_BA… in configure_bridge()
968 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_BASE, 0x00… in configure_bridge()
969 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_LIMIT, 0x0… in configure_bridge()
979 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_BASE_UPPER… in configure_bridge()
980 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_LIMIT_UPPE… in configure_bridge()
983 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_BASE, 0x00… in configure_bridge()
984 …pci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_IO_LIMIT, 0x0… in configure_bridge()
988 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_MEMORY_BASE, … in configure_bridge()
989 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_MEMORY_LIMIT,… in configure_bridge()
999 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_MEMORY_BASE, … in configure_bridge()
1000 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_MEMORY_LIMIT,… in configure_bridge()
1003 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_MEMORY_B… in configure_bridge()
1004 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_MEMORY_L… in configure_bridge()
1014 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_BASE_UP… in configure_bridge()
1015 …pci_write_config_dword_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_LIMIT_U… in configure_bridge()
1018 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_MEMORY_B… in configure_bridge()
1019 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_PREF_MEMORY_L… in configure_bridge()
1024 …pci_read_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_INTERRUPT_PIN,… in configure_bridge()
1026 …ci_write_config_byte_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_INTERRUPT_LINE… in configure_bridge()
1033 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_COMMAND, DEVI… in configure_bridge()
1034 …pci_write_config_word_nodev (ibmphp_pci_root_ops, func->busno, device, function, PCI_BRIDGE_CONTRO… in configure_bridge()
1038 func->devices[i] = 1; in configure_bridge()
1041 func->bus = 1; /* For unconfiguring, to indicate it's PPB */ in configure_bridge()
1042 func_passed = &func; in configure_bridge()
1043 debug ("func->busno b4 returning is %x\n", func->busno); in configure_bridge()
1066 func->io[i] = NULL; in configure_bridge()
1069 func->pfmem[i] = NULL; in configure_bridge()
1072 func->mem[i] = NULL; in configure_bridge()
1084 static struct res_needed *scan_behind_bridge (struct pci_func * func, u8 busno) in scan_behind_bridge() argument
1595 if (sl->func) { in ibmphp_unconfigure_card()
1596 cur_func = sl->func; in ibmphp_unconfigure_card()
1633 sl->func = NULL; in ibmphp_unconfigure_card()