Lines Matching refs:IoAdapter

28 extern void prepare_qBri_functions(PISDN_ADAPTER IoAdapter);
29 extern void prepare_qBri2_functions(PISDN_ADAPTER IoAdapter);
33 extern int qBri_FPGA_download(PISDN_ADAPTER IoAdapter);
34 extern void start_qBri_hardware(PISDN_ADAPTER IoAdapter);
69 static int diva_4bri_reset_adapter(PISDN_ADAPTER IoAdapter);
70 static int diva_4bri_write_sdram_block(PISDN_ADAPTER IoAdapter,
74 static int diva_4bri_start_adapter(PISDN_ADAPTER IoAdapter,
76 static int check_qBri_interrupt(PISDN_ADAPTER IoAdapter);
833 void diva_os_set_qBri_functions(PISDN_ADAPTER IoAdapter) in diva_os_set_qBri_functions() argument
837 void diva_os_set_qBri2_functions(PISDN_ADAPTER IoAdapter) in diva_os_set_qBri2_functions() argument
858 static int diva_4bri_reset_adapter(PISDN_ADAPTER IoAdapter) in diva_4bri_reset_adapter() argument
863 if (!IoAdapter->Address || !IoAdapter->reset) { in diva_4bri_reset_adapter()
866 if (IoAdapter->Initialized) { in diva_4bri_reset_adapter()
868 IoAdapter->ANum)) in diva_4bri_reset_adapter()
875 for (i = 0; ((i < IoAdapter->tasks) && IoAdapter->QuadroList); i++) { in diva_4bri_reset_adapter()
876 Slave = IoAdapter->QuadroList->QuadroAdapter[i]; in diva_4bri_reset_adapter()
910 diva_4bri_write_sdram_block(PISDN_ADAPTER IoAdapter, in diva_4bri_write_sdram_block() argument
914 byte __iomem *p = DIVA_OS_MEM_ATTACH_ADDRESS(IoAdapter); in diva_4bri_write_sdram_block()
918 DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, p); in diva_4bri_write_sdram_block()
920 IoAdapter->ANum, address + length)) in diva_4bri_write_sdram_block()
929 DIVA_OS_MEM_DETACH_ADDRESS(IoAdapter, p); in diva_4bri_write_sdram_block()
934 diva_4bri_start_adapter(PISDN_ADAPTER IoAdapter, in diva_4bri_start_adapter() argument
945 start_qBri_hardware(IoAdapter); in diva_4bri_start_adapter()
947 p = DIVA_OS_MEM_ATTACH_RAM(IoAdapter); in diva_4bri_start_adapter()
963 for (i = 1; i < IoAdapter->tasks; i++) { in diva_4bri_start_adapter()
964 IoAdapter->QuadroList->QuadroAdapter[i]->features = in diva_4bri_start_adapter()
965 IoAdapter->features; in diva_4bri_start_adapter()
966 IoAdapter->QuadroList->QuadroAdapter[i]->a. in diva_4bri_start_adapter()
967 protocol_capabilities = IoAdapter->features; in diva_4bri_start_adapter()
972 IoAdapter->Properties.Name, in diva_4bri_start_adapter()
974 DIVA_OS_MEM_DETACH_RAM(IoAdapter, p); in diva_4bri_start_adapter()
975 (*(IoAdapter->trapFnc)) (IoAdapter); in diva_4bri_start_adapter()
976 IoAdapter->stop(IoAdapter); in diva_4bri_start_adapter()
979 DIVA_OS_MEM_DETACH_RAM(IoAdapter, p); in diva_4bri_start_adapter()
981 for (i = 0; i < IoAdapter->tasks; i++) { in diva_4bri_start_adapter()
982 IoAdapter->QuadroList->QuadroAdapter[i]->Initialized = 1; in diva_4bri_start_adapter()
983 IoAdapter->QuadroList->QuadroAdapter[i]->IrqCount = 0; in diva_4bri_start_adapter()
986 if (check_qBri_interrupt(IoAdapter)) { in diva_4bri_start_adapter()
988 IoAdapter->ANum)) in diva_4bri_start_adapter()
989 for (i = 0; i < IoAdapter->tasks; i++) { in diva_4bri_start_adapter()
990 IoAdapter->QuadroList->QuadroAdapter[i]->Initialized = 0; in diva_4bri_start_adapter()
992 IoAdapter->stop(IoAdapter); in diva_4bri_start_adapter()
996 IoAdapter->Properties.Features = (word) features; in diva_4bri_start_adapter()
997 diva_xdi_display_adapter_features(IoAdapter->ANum); in diva_4bri_start_adapter()
999 for (i = 0; i < IoAdapter->tasks; i++) { in diva_4bri_start_adapter()
1001 IoAdapter->QuadroList->QuadroAdapter[i]->ANum, in diva_4bri_start_adapter()
1002 (IoAdapter->tasks == 1) ? "BRI 2.0" : "4BRI")) in diva_4bri_start_adapter()
1003 diva_xdi_didd_register_adapter(IoAdapter->QuadroList->QuadroAdapter[i]->ANum); in diva_4bri_start_adapter()
1004 IoAdapter->QuadroList->QuadroAdapter[i]->Properties.Features = (word) features; in diva_4bri_start_adapter()
1010 static int check_qBri_interrupt(PISDN_ADAPTER IoAdapter) in check_qBri_interrupt() argument
1014 ADAPTER *a = &IoAdapter->a; in check_qBri_interrupt()
1017 IoAdapter->IrqCount = 0; in check_qBri_interrupt()
1019 if (IoAdapter->ControllerNumber > 0) in check_qBri_interrupt()
1022 p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); in check_qBri_interrupt()
1024 DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); in check_qBri_interrupt()
1031 for (i = 100; !IoAdapter->IrqCount && (i-- > 0); diva_os_wait(10)); in check_qBri_interrupt()
1033 return ((IoAdapter->IrqCount > 0) ? 0 : -1); in check_qBri_interrupt()
1040 IoAdapter->IrqCount = 0; in check_qBri_interrupt()
1041 p = DIVA_OS_MEM_ATTACH_CTLREG(IoAdapter); in check_qBri_interrupt()
1043 (IoAdapter-> in check_qBri_interrupt()
1048 DIVA_OS_MEM_DETACH_CTLREG(IoAdapter, p); in check_qBri_interrupt()
1050 p = DIVA_OS_MEM_ATTACH_RESET(IoAdapter); in check_qBri_interrupt()
1052 DIVA_OS_MEM_DETACH_RESET(IoAdapter, p); in check_qBri_interrupt()
1062 PISDN_ADAPTER IoAdapter = &a->xdi_adapter; in diva_4bri_clear_interrupts() local
1067 IoAdapter->disIrq(IoAdapter); in diva_4bri_clear_interrupts()
1069 IoAdapter->tst_irq(&IoAdapter->a); in diva_4bri_clear_interrupts()
1070 IoAdapter->clr_irq(&IoAdapter->a); in diva_4bri_clear_interrupts()
1071 IoAdapter->tst_irq(&IoAdapter->a); in diva_4bri_clear_interrupts()
1076 diva_os_cancel_soft_isr(&IoAdapter->req_soft_isr); in diva_4bri_clear_interrupts()
1077 diva_os_cancel_soft_isr(&IoAdapter->isr_soft_isr); in diva_4bri_clear_interrupts()
1082 PISDN_ADAPTER IoAdapter = &a->xdi_adapter; in diva_4bri_stop_adapter() local
1085 if (!IoAdapter->ram) { in diva_4bri_stop_adapter()
1089 if (!IoAdapter->Initialized) { in diva_4bri_stop_adapter()
1091 IoAdapter->ANum)) in diva_4bri_stop_adapter()
1095 for (i = 0; i < IoAdapter->tasks; i++) { in diva_4bri_stop_adapter()
1096 IoAdapter->QuadroList->QuadroAdapter[i]->Initialized = 0; in diva_4bri_stop_adapter()
1102 for (i = 0; i < IoAdapter->tasks; i++) { in diva_4bri_stop_adapter()
1103 diva_xdi_didd_remove_adapter(IoAdapter->QuadroList->QuadroAdapter[i]->ANum); in diva_4bri_stop_adapter()
1112 IoAdapter->a.ReadyInt = 1; in diva_4bri_stop_adapter()
1113 IoAdapter->a.ram_inc(&IoAdapter->a, &PR_RAM->ReadyInt); in diva_4bri_stop_adapter()
1122 IoAdapter->ANum)) in diva_4bri_stop_adapter()
1124 IoAdapter->a.ReadyInt = 0; in diva_4bri_stop_adapter()
1129 IoAdapter->stop(IoAdapter); in diva_4bri_stop_adapter()