📄 cs8950.cod
字号:
00020 e2833001 add r3, r3, #1
00024 e58d3000 str r3, [sp]
00028 |$L15566|
00028 e59d3000 ldr r3, [sp]
0002c e3530207 cmp r3, #7, 4
00030 aa000009 bge |$L15568|
; 796 : {
; 797 : Status=ReadByte( OpReg_MIISts );
00034 e59f3110 ldr r3, [pc, #0x110]
00038 e5933000 ldr r3, [r3]
0003c e2833018 add r3, r3, #0x18
00040 e5d33000 ldrb r3, [r3]
00044 e5cd3004 strb r3, [sp, #4]
; 798 : if ( !(Status & MIISts_Busy) ) break;
00048 e5dd3004 ldrb r3, [sp, #4]
0004c e3130001 tst r3, #1
00050 1a000000 bne |$L15570|
00054 ea000000 b |$L15568|
00058 |$L15570|
; 799 : }
00058 eaffffef b |$L15567|
0005c |$L15568|
; 800 : if ( x == MAXLOOP )
0005c e59d3000 ldr r3, [sp]
00060 e3530207 cmp r3, #7, 4
00064 1a000006 bne |$L15571|
; 801 : {
; 802 : EdbgOutputDebugString
; 803 : (
; 804 : "First PHY read failed, Address =0x%x, Register= 0x%x. \r\n",
; 805 : Address,
; 806 : Register
; 807 : );
00068 e1dd21bc ldrh r2, [sp, #0x1C]
0006c e1dd11b8 ldrh r1, [sp, #0x18]
00070 e59f00dc ldr r0, [pc, #0xDC]
00074 eb000000 bl EdbgOutputDebugString
; 808 : return FALSE;
00078 e3a03000 mov r3, #0
0007c e58d3008 str r3, [sp, #8]
00080 ea00002d b |$L15563|
00084 |$L15571|
; 809 : }
; 810 :
; 811 : /* Issue the command to read the register within the PHY */
; 812 : WriteWord(OpReg_MIICmd, (WORD)(MIICmd_Opcode_Read |(Address<<5)| Register));
00084 e1dd31b8 ldrh r3, [sp, #0x18]
00088 e1a03283 mov r3, r3, lsl #5
0008c e3832902 orr r2, r3, #2, 18
00090 e1dd31bc ldrh r3, [sp, #0x1C]
00094 e1823003 orr r3, r2, r3
00098 e1a02803 mov r2, r3, lsl #16
0009c e1a02822 mov r2, r2, lsr #16
000a0 e59f30a4 ldr r3, [pc, #0xA4]
000a4 e5933000 ldr r3, [r3]
000a8 e2833010 add r3, r3, #0x10
000ac e1c320b0 strh r2, [r3]
; 813 :
; 814 : /* Wait until the command is completed */
; 815 : for ( x=0; x<MAXLOOP; x++ )
000b0 e3a03000 mov r3, #0
000b4 e58d3000 str r3, [sp]
000b8 ea000002 b |$L15575|
000bc |$L15576|
000bc e59d3000 ldr r3, [sp]
000c0 e2833001 add r3, r3, #1
000c4 e58d3000 str r3, [sp]
000c8 |$L15575|
000c8 e59d3000 ldr r3, [sp]
000cc e3530207 cmp r3, #7, 4
000d0 aa000009 bge |$L15577|
; 816 : {
; 817 : Status=ReadByte( OpReg_MIISts);
000d4 e59f3070 ldr r3, [pc, #0x70]
000d8 e5933000 ldr r3, [r3]
000dc e2833018 add r3, r3, #0x18
000e0 e5d33000 ldrb r3, [r3]
000e4 e5cd3004 strb r3, [sp, #4]
; 818 : if ( !(Status & MIISts_Busy) )
000e8 e5dd3004 ldrb r3, [sp, #4]
000ec e3130001 tst r3, #1
000f0 1a000000 bne |$L15579|
; 819 : break;
000f4 ea000000 b |$L15577|
000f8 |$L15579|
; 820 : }
000f8 eaffffef b |$L15576|
000fc |$L15577|
; 821 : if ( x == MAXLOOP )
000fc e59d3000 ldr r3, [sp]
00100 e3530207 cmp r3, #7, 4
00104 1a000004 bne |$L15580|
; 822 : {
; 823 : EdbgOutputDebugString("Second PHY read failed!");
00108 e59f0040 ldr r0, [pc, #0x40]
0010c eb000000 bl EdbgOutputDebugString
; 824 : return MAC_FAILED;
00110 e3a03001 mov r3, #1
00114 e58d3008 str r3, [sp, #8]
00118 ea000007 b |$L15563|
0011c |$L15580|
; 825 : }
; 826 :
; 827 :
; 828 : /* Get the PHY data from the PHY Data register */
; 829 : *pValue=ReadWord( OpReg_MIIData );
0011c e59f3028 ldr r3, [pc, #0x28]
00120 e5933000 ldr r3, [r3]
00124 e2833014 add r3, r3, #0x14
00128 e1d320b0 ldrh r2, [r3]
0012c e59d3020 ldr r3, [sp, #0x20]
00130 e1c320b0 strh r2, [r3]
; 830 :
; 831 : return TRUE;
00134 e3a03001 mov r3, #1
00138 e58d3008 str r3, [sp, #8]
0013c |$L15563|
; 808 : return FALSE;
0013c e59d0008 ldr r0, [sp, #8]
; 832 : }
00140 e28dd00c add sp, sp, #0xC
00144 e89d6000 ldmia sp, {sp, lr}
00148 e12fff1e bx lr
0014c |$L16267|
0014c 00000000 DCD |gdwEthernetBase|
00150 00000000 DCD |??_C@_0BI@HIJCNAOF@Second?5PHY?5read?5failed?$CB?$AA@|
00154 00000000 DCD |??_C@_0DJ@KCNHBCHM@First?5PHY?5read?5failed?0?5Address?5?$DN@|
00158 |$M16263|
ENDP ; |ReadPHY|
EXPORT |??_C@_0EJ@MPOMKFGO@First?5PHY?5write?5failed?0?5Address?5@| [ DATA ] ; `string'
EXPORT |??_C@_0EK@LFNKILC@Second?5PHY?5write?5failed?0?5Address@| [ DATA ] ; `string'
00000 AREA |.text| { |WritePHY| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$WritePHY|, PDATA, SELECTION=5, ASSOC=|.text| { |WritePHY| } ; comdat associative
|$T16274| DCD |$L16273|
DCD 0x40005904
00000 AREA |.rdata| { |??_C@_0EK@LFNKILC@Second?5PHY?5write?5failed?0?5Address@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0EK@LFNKILC@Second?5PHY?5write?5failed?0?5Address@| DCB "Second PH"
DCB "Y write failed, Address = 0x%x, Register = 0x%x, Value ="
DCB " 0x%x.", 0xd, 0xa, 0x0 ; `string'
00000 AREA |.rdata| { |??_C@_0EJ@MPOMKFGO@First?5PHY?5write?5failed?0?5Address?5@| }, DATA, READONLY, SELECTION=2 ; comdat any
|??_C@_0EJ@MPOMKFGO@First?5PHY?5write?5failed?0?5Address?5@| DCB "First P"
DCB "HY write failed, Address = 0x%x, Register = 0x%x, Value "
DCB "= 0x%x.", 0xd, 0xa, 0x0 ; `string'
; Function compile flags: /Ods
00000 AREA |.text| { |WritePHY| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |WritePHY| PROC
; 841 : {
00000 |$L16273|
00000 e1a0c00d mov r12, sp
00004 e92d000f stmdb sp!, {r0 - r3}
00008 e92d5000 stmdb sp!, {r12, lr}
0000c e24dd00c sub sp, sp, #0xC
00010 |$M16271|
; 842 : BYTE Status;
; 843 : int x;
; 844 :
; 845 :
; 846 : /* Ensure that the PHY is not busy */
; 847 : for ( x=0; x<MAXLOOP; x++ )
00010 e3a03000 mov r3, #0
00014 e58d3000 str r3, [sp]
00018 ea000002 b |$L15594|
0001c |$L15595|
0001c e59d3000 ldr r3, [sp]
00020 e2833001 add r3, r3, #1
00024 e58d3000 str r3, [sp]
00028 |$L15594|
00028 e59d3000 ldr r3, [sp]
0002c e3530207 cmp r3, #7, 4
00030 aa000009 bge |$L15596|
; 848 : {
; 849 : Status=ReadByte( OpReg_MIISts);
00034 e59f3120 ldr r3, [pc, #0x120]
00038 e5933000 ldr r3, [r3]
0003c e2833018 add r3, r3, #0x18
00040 e5d33000 ldrb r3, [r3]
00044 e5cd3004 strb r3, [sp, #4]
; 850 : if ( !(Status & MIISts_Busy) ) break;
00048 e5dd3004 ldrb r3, [sp, #4]
0004c e3130001 tst r3, #1
00050 1a000000 bne |$L15598|
00054 ea000000 b |$L15596|
00058 |$L15598|
; 851 : }
00058 eaffffef b |$L15595|
0005c |$L15596|
; 852 : if ( x == MAXLOOP )
0005c e59d3000 ldr r3, [sp]
00060 e3530207 cmp r3, #7, 4
00064 1a000007 bne |$L15599|
; 853 : {
; 854 : EdbgOutputDebugString
; 855 : (
; 856 : "First PHY write failed, Address = 0x%x, Register = 0x%x, Value = 0x%x.\r\n",
; 857 : (ULONG)Address,
; 858 : (ULONG)Register,
; 859 : (ULONG)Value
; 860 : );
00068 e1dd32b0 ldrh r3, [sp, #0x20]
0006c e1dd21bc ldrh r2, [sp, #0x1C]
00070 e1dd11b8 ldrh r1, [sp, #0x18]
00074 e59f00e4 ldr r0, [pc, #0xE4]
00078 eb000000 bl EdbgOutputDebugString
; 861 : return FALSE;
0007c e3a03000 mov r3, #0
00080 e58d3008 str r3, [sp, #8]
00084 ea00002f b |$L15591|
00088 |$L15599|
; 862 : }
; 863 :
; 864 : /* Put the PHY data into the PHY Data register */
; 865 : WriteWord( OpReg_MIIData, Value );
00088 e59f30cc ldr r3, [pc, #0xCC]
0008c e5933000 ldr r3, [r3]
00090 e2832014 add r2, r3, #0x14
00094 e1dd32b0 ldrh r3, [sp, #0x20]
00098 e1c230b0 strh r3, [r2]
; 866 :
; 867 : /* Issue the command to write to the register within the PHY */
; 868 : WriteWord( OpReg_MIICmd,(WORD)(MIICmd_Opcode_Write |(Address<<5)| Register));
0009c e1dd31b8 ldrh r3, [sp, #0x18]
000a0 e1a03283 mov r3, r3, lsl #5
000a4 e3832901 orr r2, r3, #1, 18
000a8 e1dd31bc ldrh r3, [sp, #0x1C]
000ac e1823003 orr r3, r2, r3
000b0 e1a02803 mov r2, r3, lsl #16
000b4 e1a02822 mov r2, r2, lsr #16
000b8 e59f309c ldr r3, [pc, #0x9C]
000bc e5933000 ldr r3, [r3]
000c0 e2833010 add r3, r3, #0x10
000c4 e1c320b0 strh r2, [r3]
; 869 :
; 870 : /* Wait until the command is completed */
; 871 : for ( x=0; x<MAXLOOP; x++ )
000c8 e3a03000 mov r3, #0
000cc e58d3000 str r3, [sp]
000d0 ea000002 b |$L15607|
000d4 |$L15608|
000d4 e59d3000 ldr r3, [sp]
000d8 e2833001 add r3, r3, #1
000dc e58d3000 str r3, [sp]
000e0 |$L15607|
000e0 e59d3000 ldr r3, [sp]
000e4 e3530207 cmp r3, #7, 4
000e8 aa000009 bge |$L15609|
; 872 : {
; 873 : Status=ReadByte( OpReg_MIISts );
000ec e59f3068 ldr r3, [pc, #0x68]
000f0 e5933000 ldr r3, [r3]
000f4 e2833018 add r3, r3, #0x18
000f8 e5d33000 ldrb r3, [r3]
000fc e5cd3004 strb r3, [sp, #4]
; 874 : if ( !(Status & MIISts_Busy) )
00100 e5dd3004 ldrb r3, [sp, #4]
00104 e3130001 tst r3, #1
00108 1a000000 bne |$L15611|
; 875 : break;
0010c ea000000 b |$L15609|
00110 |$L15611|
; 876 : }
00110 eaffffef b |$L15608|
00114 |$L15609|
; 877 : if ( x == MAXLOOP )
00114 e59d3000 ldr r3, [sp]
00118 e3530207 cmp r3, #7, 4
0011c 1a000007 bne |$L15612|
; 878 : {
; 879 : EdbgOutputDebugString
; 880 : (
; 881 : "Second PHY write failed, Address = 0x%x, Register = 0x%x, Value = 0x%x.\r\n",
; 882 : (ULONG)Address,
; 883 : (ULONG)Register,
; 884 : (ULONG)Value
; 885 : );
00120 e1dd32b0 ldrh r3, [sp, #0x20]
00124 e1dd21bc ldrh r2, [sp, #0x1C]
00128 e1dd11b8 ldrh r1, [sp, #0x18]
0012c e59f0024 ldr r0, [pc, #0x24]
00130 eb000000 bl EdbgOutputDebugString
; 886 : return FALSE;
00134 e3a03000 mov r3, #0
00138 e58d3008 str r3, [sp, #8]
0013c ea000001 b |$L15591|
00140 |$L15612|
; 887 : }
; 888 :
; 889 : return TRUE;
00140 e3a03001 mov r3, #1
00144 e58d3008 str r3, [sp, #8]
00148 |$L15591|
; 861 : return FALSE;
00148 e59d0008 ldr r0, [sp, #8]
; 890 : }
0014c e28dd00c add sp, sp, #0xC
00150 e89d6000 ldmia sp, {sp, lr}
00154 e12fff1e bx lr
00158 |$L16276|
00158 00000000 DCD |??_C@_0EK@LFNKILC@Second?5PHY?5write?5failed?0?5Address@|
0015c 00000000 DCD |gdwEthernetBase|
00160 00000000 DCD |??_C@_0EJ@MPOMKFGO@First?5PHY?5write?5failed?0?5Address?5@|
00164 |$M16272|
ENDP ; |WritePHY|
00000 AREA |.text| { |Check_PHY_ID_Type| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 AREA |.pdata$$Check_PHY_ID_Type|, PDATA, SELECTION=5, ASSOC=|.text| { |Check_PHY_ID_Type| } ; comdat associative
|$T16283| DCD |$L16282|
DCD 0x4000ae04
; Function compile flags: /Ods
00000 AREA |.text| { |Check_PHY_ID_Type| }, CODE, ARM, SELECTION=1 ; comdat noduplicate
00000 |Check_PHY_ID_Type| PROC
; 894 : {
00000 |$L16282|
00000 e1a0c00d mov r12, sp
00004 e92d0003 stmdb sp!, {r0, r1}
00008 e92d5000 stmdb sp!, {r12, lr}
0000c e24dd018 sub sp, sp, #0x18
00010 |$M16280|
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -