⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 usb_isr.bin

📁 RDC R2886 USB Ehci ohc测试源码,paradigm c++上运行测试
💻 BIN
📖 第 1 页 / 共 5 页
字号:
7000:692B  push  ax
7000:692C  mov   ax,0x047e
7000:692F  push  ds
7000:6930  push  ax
7000:6931  mov   cx,0x001c
7000:6934  call  scopy@
#usbhost#958: ints=inport(INT_INSERV);    //read in-service register
7000:6939  mov   dx,0xff2c
7000:693C  in    ax,dx
7000:693D  mov   word ptr [bp-0x02],0x0000
7000:6942  mov   [ints],ax
#usbhost#961: if(HighSpeed_Owner == TRUE){
7000:6945  cmp   word ptr [_highspeed_owner],0x01
7000:694A  jz    #usbhost#963
7000:694C  jmp   #usbhost#1047
#usbhost#963: ints = DWordRead(&ehci_regs->status);
7000:694F  mov   ax,[_ehci_regs]
7000:6952  add   ax,0x0004
7000:6955  push  [0x0fca]
7000:6959  push  ax
7000:695A  call  _dwordread
7000:695F  pop   cx
7000:6960  pop   cx
7000:6961  mov   [bp-0x02],dx
7000:6964  mov   [ints],ax
#usbhost#965: if (ints == ~(u32)0)
7000:6967  cmp   word ptr [bp-0x02],-0x01
7000:696B  jnz   #usbhost#968
7000:696D  cmp   [ints],-0x01
7000:6971  jnz   #usbhost#968
#usbhost#966: goto Exit_INTA_ISR;
7000:6973  jmp   #usbhost#1142
#usbhost#968: if (ints & STS_FLR) {
7000:6976  test  [ints],0x0008
7000:697B  jz    #usbhost#971
#usbhost#969: DWordWrite(&ehci_regs->status, STS_FLR);
7000:697D  xor   ax,ax
7000:697F  mov   dx,0x0008
7000:6982  push  ax
7000:6983  push  dx
7000:6984  mov   ax,[_ehci_regs]
7000:6987  add   ax,0x0004
7000:698A  push  [0x0fca]
7000:698E  push  ax
7000:698F  call  _dwordwrite
7000:6994  add   sp,0x08
#usbhost#971: if (ints & STS_PCD) {  //Port change detect
7000:6997  test  [ints],0x0004
7000:699C  jnz   #usbhost#973
7000:699E  jmp   #usbhost#1029
#usbhost#973: rhpt1s = DWordRead(&ehci_regs->port_status[0]);
7000:69A1  mov   ax,[_ehci_regs]
7000:69A4  add   ax,0x0044
7000:69A7  push  [0x0fca]
7000:69AB  push  ax
7000:69AC  call  _dwordread
7000:69B1  pop   cx
7000:69B2  pop   cx
7000:69B3  mov   [bp-0x0a],dx
7000:69B6  mov   [rhpt1s],ax
#usbhost#981: if(rhpt1s & PORT_CSC)  //Connect status change
7000:69B9  test  [rhpt1s],0x0002
7000:69BE  jz    #usbhost#983
#usbhost#982: DWordWrite(&ehci_regs->port_status[0], (EHCI_PORT_INIT|PORT_CSC));
7000:69C0  mov   ax,0x0070
7000:69C3  mov   dx,0x1002
7000:69C6  push  ax
7000:69C7  push  dx
7000:69C8  mov   ax,[_ehci_regs]
7000:69CB  add   ax,0x0044
7000:69CE  push  [0x0fca]
7000:69D2  push  ax
7000:69D3  call  _dwordwrite
7000:69D8  add   sp,0x08
#usbhost#983: if(rhpt1s & PORT_CONNECT) {
7000:69DB  test  [rhpt1s],0x0001
7000:69E0  jnz   #usbhost#985
7000:69E2  jmp   #usbhost#1015
#usbhost#985: DWordWrite(&ehci_regs->command, (0x00080000L | CMD_RUN)); //CMD_ASE
7000:69E5  mov   ax,0x0008
7000:69E8  mov   dx,0x0001
7000:69EB  push  ax
7000:69EC  push  dx
7000:69ED  push  [0x0fca]
7000:69F1  push  [_ehci_regs]
7000:69F5  call  _dwordwrite
7000:69FA  add   sp,0x08
#usbhost#986: do{} while((ehci_regs->status & CMD_RUN) == CMD_RUN);
7000:69FD  les   bx,[_ehci_regs]
7000:6A01  mov   dx,es:[bx+0x06]
7000:6A05  mov   ax,es:[bx+0x04]
7000:6A09  and   ax,0x0001
7000:6A0C  and   dx,0x00
7000:6A0F  or    dx,dx
7000:6A11  jnz   #usbhost#989
7000:6A13  cmp   ax,0x0001
7000:6A16  jz    #usbhost#986
#usbhost#989: DWordWrite(&ehci_regs->port_status[0], (EHCI_PORT_INIT|PORT_RESET));
7000:6A18  mov   ax,0x0070
7000:6A1B  mov   dx,0x1100
7000:6A1E  push  ax
7000:6A1F  push  dx
7000:6A20  mov   ax,[_ehci_regs]
7000:6A23  add   ax,0x0044
7000:6A26  push  [0x0fca]
7000:6A2A  push  ax
7000:6A2B  call  _dwordwrite
7000:6A30  add   sp,0x08
#usbhost#990: mdelay(50);
7000:6A33  mov   ax,0x0032
7000:6A36  push  ax
7000:6A37  call  _mdelay
7000:6A3C  pop   cx
#usbhost#991: DWordWrite(&ehci_regs->port_status[0], (EHCI_PORT_INIT));
7000:6A3D  mov   ax,0x0070
7000:6A40  mov   dx,0x1000
7000:6A43  push  ax
7000:6A44  push  dx
7000:6A45  mov   ax,[_ehci_regs]
7000:6A48  add   ax,0x0044
7000:6A4B  push  [0x0fca]
7000:6A4F  push  ax
7000:6A50  call  _dwordwrite
7000:6A55  add   sp,0x08
#usbhost#994: do{} while((ehci_regs->port_status[0] & PORT_RESET) == PORT_RESET);
7000:6A58  les   bx,[_ehci_regs]
7000:6A5C  mov   dx,es:[bx+0x46]
7000:6A60  mov   ax,es:[bx+0x44]
7000:6A64  and   ax,0x0100
7000:6A67  and   dx,0x00
7000:6A6A  or    dx,dx
7000:6A6C  jnz   #usbhost#995
7000:6A6E  cmp   ax,0x0100
7000:6A71  jz    #usbhost#994
#usbhost#995: if((ehci_regs->port_status[0] & (PORT_CONNECT|PORT_PE)) == (PORT_CONNECT|PORT_PE)){
7000:6A73  les   bx,[_ehci_regs]
7000:6A77  mov   dx,es:[bx+0x46]
7000:6A7B  mov   ax,es:[bx+0x44]
7000:6A7F  and   ax,0x0005
7000:6A82  and   dx,0x00
7000:6A85  or    dx,dx
7000:6A87  jnz   #usbhost#1008
7000:6A89  cmp   ax,0x0005
7000:6A8C  jnz   #usbhost#1008
#usbhost#996: p=buf;
7000:6A8E  mov   si,0x0f84
#usbhost#997: q=buf1;
7000:6A91  lea   ax,[buf1]
7000:6A94  mov   di,ax
#usbhost#998: for(i=0;i<sizeof(buf1);i++)
7000:6A96  mov   [i],0x0000
7000:6A9B  jmp   +0x09
#usbhost#999: *p++ = *q++;
7000:6A9D  mov   al,[di]
7000:6A9F  mov   [si],al
7000:6AA1  inc   di
7000:6AA2  inc   si
#usbhost#998: for(i=0;i<sizeof(buf1);i++)
7000:6AA3  inc   [i]
7000:6AA6  cmp   [i],0x1c
7000:6AAA  jl    #usbhost#999
#usbhost#1000: *p++ = 10;
7000:6AAC  mov   byte ptr [si],0x0a
7000:6AAF  inc   si
#usbhost#1001: *p++ = 13;
7000:6AB0  mov   byte ptr [si],0x0d
7000:6AB3  inc   si
#usbhost#1002: UART_SendData(buf, sizeof(buf));
7000:6AB4  mov   ax,0x0020
7000:6AB7  push  ax
7000:6AB8  mov   ax,0x0f84
7000:6ABB  push  ax
7000:6ABC  call  _uart_senddata
7000:6AC1  pop   cx
7000:6AC2  pop   cx
#usbhost#1004: g_PortAttach = 1;
7000:6AC3  mov   byte ptr [_g_portattach],0x01
#usbhost#1005: }
7000:6AC8  jmp   #usbhost#1013
#usbhost#1008: == (PORT_J_State|PORT_CONNECT)){
7000:6ACA  les   bx,[_ehci_regs]
7000:6ACE  mov   dx,es:[bx+0x46]
7000:6AD2  mov   ax,es:[bx+0x44]
7000:6AD6  and   ax,0x0c05
7000:6AD9  and   dx,0x00
7000:6ADC  or    dx,dx
7000:6ADE  jnz   #usbhost#1013
7000:6AE0  cmp   ax,0x0801
7000:6AE3  jnz   #usbhost#1013
#usbhost#1009: DWordWrite(&ehci_regs->port_status[0], (EHCI_PORT_INIT|PORT_OWNER));
7000:6AE5  mov   ax,0x0070
7000:6AE8  mov   dx,0x3000
7000:6AEB  push  ax
7000:6AEC  push  dx
7000:6AED  mov   ax,[_ehci_regs]
7000:6AF0  add   ax,0x0044
7000:6AF3  push  [0x0fca]
7000:6AF7  push  ax
7000:6AF8  call  _dwordwrite
7000:6AFD  add   sp,0x08
#usbhost#1010: DWordWrite(&ehci_regs->port_status[0], (EHCI_PORT_INIT|PORT_OWNER|PORT_CSC));
7000:6B00  mov   ax,0x0070
7000:6B03  mov   dx,0x3002
7000:6B06  push  ax
7000:6B07  push  dx
7000:6B08  mov   ax,[_ehci_regs]
7000:6B0B  add   ax,0x0044
7000:6B0E  push  [0x0fca]
7000:6B12  push  ax
7000:6B13  call  _dwordwrite
7000:6B18  add   sp,0x08
#usbhost#1011: HighSpeed_Owner = FALSE;
7000:6B1B  mov   word ptr [_highspeed_owner],0x0000
#usbhost#1013: }
7000:6B21  jmp   #usbhost#1027
#usbhost#1015: p=buf;
7000:6B23  mov   si,0x0f84
#usbhost#1016: q=buf2;
7000:6B26  lea   ax,[buf2]
7000:6B29  mov   di,ax
#usbhost#1017: for(i=0;i<sizeof(buf2);i++)
7000:6B2B  mov   [i],0x0000
7000:6B30  jmp   +0x09
#usbhost#1018: *p++ = *q++;
7000:6B32  mov   al,[di]
7000:6B34  mov   [si],al
7000:6B36  inc   di
7000:6B37  inc   si
#usbhost#1017: for(i=0;i<sizeof(buf2);i++)
7000:6B38  inc   [i]
7000:6B3B  cmp   [i],0x1c
7000:6B3F  jl    #usbhost#1018
#usbhost#1019: *p++ = 10;
7000:6B41  mov   byte ptr [si],0x0a
7000:6B44  inc   si
#usbhost#1020: *p++ = 13;
7000:6B45  mov   byte ptr [si],0x0d
7000:6B48  inc   si
#usbhost#1021: UART_SendData(buf, sizeof(buf));
7000:6B49  mov   ax,0x0020
7000:6B4C  push  ax
7000:6B4D  mov   ax,0x0f84
7000:6B50  push  ax
7000:6B51  call  _uart_senddata
7000:6B56  pop   cx
7000:6B57  pop   cx
#usbhost#1023: g_PortAttach = 0;
7000:6B58  mov   byte ptr [_g_portattach],0x00
#usbhost#1024: DeviceAttach_Init = FALSE;
7000:6B5D  mov   word ptr [_deviceattach_init],0x0000
#usbhost#1027: DWordWrite(&ehci_regs->status, STS_PCD); //Clear Port change detect
7000:6B63  xor   ax,ax
7000:6B65  mov   dx,0x0004
7000:6B68  push  ax
7000:6B69  push  dx
7000:6B6A  mov   ax,[_ehci_regs]
7000:6B6D  add   ax,0x0004
7000:6B70  push  [0x0fca]
7000:6B74  push  ax
7000:6B75  call  _dwordwrite
7000:6B7A  add   sp,0x08
#usbhost#1029: if (ints & STS_INT) {
7000:6B7D  test  [ints],0x0001
7000:6B82  jz    #usbhost#1033
#usbhost#1030: Do_TD_Complete = 1;
7000:6B84  mov   word ptr [_do_td_complete],0x0001
#usbhost#1031: DWordWrite(&ehci_regs->status, STS_INT); //Clear USBINT
7000:6B8A  xor   ax,ax
7000:6B8C  mov   dx,0x0001
7000:6B8F  push  ax
7000:6B90  push  dx
7000:6B91  mov   ax,[_ehci_regs]
7000:6B94  add   ax,0x0004
7000:6B97  push  [0x0fca]
7000:6B9B  push  ax
7000:6B9C  call  _dwordwrite
7000:6BA1  add   sp,0x08
#usbhost#1033: if (ints & STS_ERR) {
7000:6BA4  test  [ints],0x0002
7000:6BA9  jz    #usbhost#1043
#usbhost#1034: if((ehci_Ctl_TD1->hw_token & 0xFF) != 0)
7000:6BAB  les   bx,[_ehci_ctl_td1]
7000:6BAF  test  word ptr es:[bx+0x08],0x00ff
7000:6BB5  jz    #usbhost#1036
#usbhost#1035: ErrorCnt = 1;
7000:6BB7  mov   word ptr [_errorcnt],0x0001
7000:6BBD  jmp   #usbhost#1041
#usbhost#1036: else if((ehci_Ctl_TD2->hw_token & 0xFF) != 0)
7000:6BBF  les   bx,[_ehci_ctl_td2]
7000:6BC3  test  word ptr es:[bx+0x08],0x00ff
7000:6BC9  jz    #usbhost#1038
#usbhost#1037: ErrorCnt = 2;
7000:6BCB  mov   word ptr [_errorcnt],0x0002
7000:6BD1  jmp   #usbhost#1041
#usbhost#1038: else if((ehci_Ctl_TD3->hw_token & 0xFF) != 0)
7000:6BD3  les   bx,[_ehci_ctl_td3]
7000:6BD7  test  word ptr es:[bx+0x08],0x00ff
7000:6BDD  jz    #usbhost#1041
#usbhost#1039: ErrorCnt = 3;
7000:6BDF  mov   word ptr [_errorcnt],0x0003
#usbhost#1041: DWordWrite(&ehci_regs->status, STS_ERR); //Clear USBINT
7000:6BE5  xor   ax,ax
7000:6BE7  mov   dx,0x0002
7000:6BEA  push  ax
7000:6BEB  push  dx
7000:6BEC  mov   ax,[_ehci_regs]
7000:6BEF  add   ax,0x0004
7000:6BF2  push  [0x0fca]
7000:6BF6  push  ax
7000:6BF7  call  _dwordwrite
7000:6BFC  add   sp,0x08
#usbhost#1043: }
7000:6BFF  jmp   #usbhost#1137
#usbhost#1047: p=buf;
7000:6C02  mov   si,0x0f84
#usbhost#1048: q=buf3;
7000:6C05  lea   ax,[buf3]
7000:6C08  mov   di,ax
#usbhost#1049: for(i=0;i<sizeof(buf3);i++)
7000:6C0A  mov   [i],0x0000
7000:6C0F  jmp   +0x09
#usbhost#1050: *p++ = *q++;
7000:6C11  mov   al,[di]
7000:6C13  mov   [si],al
7000:6C15  inc   di
7000:6C16  inc   si
#usbhost#1049: for(i=0;i<sizeof(buf3);i++)
7000:6C17  inc   [i]
7000:6C1A  cmp   [i],0x1c
7000:6C1E  jl    #usbhost#1050
#usbhost#1051: *p++ = 10;
7000:6C20  mov   byte ptr [si],0x0a
7000:6C23  inc   si
#usbhost#1052: *p++ = 13;
7000:6C24  mov   byte ptr [si],0x0d
7000:6C27  inc   si
#usbhost#1055: ints = DWordRead(&ohci_regs->intrstatus);
7000:6C28  mov   ax,[_ohci_regs]
7000:6C2B  add   ax,0x000c
7000:6C2E  push  [0x126c]
7000:6C32  push  ax
7000:6C33  call  _dwordread
7000:6C38  pop   cx
7000:6C39  pop   cx
7000:6C3A  mov   [bp-0x02],dx
7000:6C3D  mov   [ints],ax
#usbhost#1057: if (ints == ~(u32)0)
7000:6C40  cmp   word ptr [bp-0x02],-0x01
7000:6C44  jnz   #usbhost#1060
7000:6C46  cmp   [ints],-0x01
7000:6C4A  jnz   #usbhost#1060
#usbhost#1058: goto Exit_INTB_ISR;
7000:6C4C  jmp   #usbhost#1137
#usbhost#1060: if (ints & OHCI_INTR_UE) {
7000:6C4F  test  [ints],0x0010
7000:6C54  jz    #usbhost#1065
#usbhost#1065: if (ints & OHCI_INTR_WDH) {
7000:6C56  test  [ints],0x0002
7000:6C5B  jz    #usbhost#1072
#usbhost#1066: DWordWrite(&ohci_regs->intrdisable, OHCI_INTR_WDH);
7000:6C5D  xor   ax,ax
7000:6C5F  mov   dx,0x0002
7000:6C62  push  ax
7000:6C63  push  dx
7000:6C64  mov   ax,[_ohci_regs]
7000:6C67  add   ax,0x0014
7000:6C6A  push  [0x126c]
7000:6C6E  push  ax
7000:6C6F  call  _dwordwrite
7000:6C74  add   sp,0x08
#usbhost#1067: DH_Status = dl_done_list();
7000:6C77  call  _dl_done_list
7000:6C7C  mov   [_dh_status],ax
#usbhost#1068: DWordWrite(&ohci_regs->intrenable, OHCI_INTR_WDH);
7000:6C7F  xor   ax,ax
7000:6C81  mov   dx,0x0002
7000:6C84  push  ax
7000:6C85  push  dx
7000:6C86  mov   ax,[_ohci_regs]
7000:6C89  add   ax,0x0010
7000:6C8C  push  [0x126c]
7000:6C90  push  ax
7000:6C91  call  _dwordwrite
7000:6C96  add   sp,0x08
#usbhost#1072: if (ints & OHCI_INTR_SO) {
7000:6C99  test  [ints],0x0001
7000:6C9E  jz    #usbhost#1077
#usbhost#1073: DWordWrite(&ohci_regs->intrstatus, OHCI_INTR_SO);
7000:6CA0  xor   ax,ax
7000:6CA2  mov   dx,0x0001
7000:6CA5  push  ax
7000:6CA6  push  dx
7000:6CA7  mov   ax,[_ohci_regs]
7000:6CAA  add   ax,0x000c
7000:6CAD  push  [0x126c]
7000:6CB1  push  ax
7000:6CB2  call  _dwordwrite
7000:6CB7  add   sp,0x08
#usbhost#1077: if (ints & OHCI_INTR_SF) {
7000:6CBA  test  [ints],0x0004
7000:6CBF  jz    #usbhost#1082
#usbhost#1078: DWordWrite(&ohci_regs->intrstatus, OHCI_INTR_SF);
7000:6CC1  xor   ax,ax
7000:6CC3  mov   dx,0x0004
7000:6CC6  push  ax
7000:6CC7  push  dx
7000:6CC8  mov   ax,[_ohci_regs]
7000:6CCB  add   ax,0x000c
7000:6CCE  push  [0x126c]
7000:6CD2  push  ax
7000:6CD3  call  _dwordwrite
7000:6CD8  add   sp,0x08
#usbhost#1082: if (ints & OHCI_INTR_FNO) {
7000:6CDB  test  [ints],0x0020
7000:6CE0  jz    #usbhost#1087
#usbhost#1083: DWordWrite(&ohci_regs->intrstatus, OHCI_INTR_FNO);
7000:6CE2  xor   ax,ax
7000:6CE4  mov   dx,0x0020
7000:6CE7  push  ax
7000:6CE8  push  dx
7000:6CE9  mov   ax,[_ohci_regs]
7000:6CEC  add   ax,0x000c
7000:6CEF  push  [0x126c]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -