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

📄 nand.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
 751              		.loc 1 177 0 752 04d0 033C0400 		sra	$7,$4,16 753              		.loc 1 175 0 754 04d4 0400C3A4 		sh	$3,4($6) 755              		.loc 1 176 0 756 04d8 02004010 		beq	$2,$0,$L69 757 04dc 00000000 		nop 758              	 759              		.loc 1 177 0 760 04e0 0400C7A4 		sh	$7,4($6) 761              	$L69: 762 04e4 0800E003 		j	$31 763 04e8 00000000 		nop 764              	 765              		.set	macro 766              		.set	reorder 767              	$LFE10: 768              		.end	nand_set_page_address 769              		.align	2 770              		.globl	nand_check_status 771              		.ent	nand_check_status 772              		.type	nand_check_status, @function 773              	nand_check_status: 774              	$LFB11: 178:/mnt/hgfs/boot/booter/source/nand.c **** } 179:/mnt/hgfs/boot/booter/source/nand.c ****  180:/mnt/hgfs/boot/booter/source/nand.c **** // Simple NAND device check for pass/fail for the operation 181:/mnt/hgfs/boot/booter/source/nand.c **** uint8 nand_check_status() 182:/mnt/hgfs/boot/booter/source/nand.c **** { 775              		.loc 1 182 0 776              		.frame	$sp,0,$31		# vars= 0, regs= 0/0, args= 0, gp= 0 777              		.mask	0x00000000,0 778              		.fmask	0x00000000,0 779              		.set	noreorder 780              		.set	nomacro 781              		GAS LISTING /tmp/cc4NTrNa.s 			page 18 183:/mnt/hgfs/boot/booter/source/nand.c ****     uint8 status; 184:/mnt/hgfs/boot/booter/source/nand.c ****     int i; 185:/mnt/hgfs/boot/booter/source/nand.c ****     NAND_REG_CMD = NAND_CMD_STATUS_READ1; 782              		.loc 1 185 0 783 04ec 0000053C 		lui	$5,%hi(nand_virtual_address) 784 04f0 0000A28C 		lw	$2,%lo(nand_virtual_address)($5) 785 04f4 70000324 		li	$3,112 786 04f8 0100043C 		li	$4,65536			# 0x10000 787 04fc 000043A4 		sh	$3,0($2) 788 0500 9F868434 		ori	$4,$4,0x869f 186:/mnt/hgfs/boot/booter/source/nand.c ****  187:/mnt/hgfs/boot/booter/source/nand.c ****     for(i=0;i<100000;i++) 789              		.loc 1 187 0 790 0504 21180000 		move	$3,$0 791 0508 01006324 		addiu	$3,$3,1 792              	$L77: 793 050c 2A108300 		slt	$2,$4,$3 794 0510 FEFF4010 		beq	$2,$0,$L77 795 0514 01006324 		addiu	$3,$3,1 796              	 188:/mnt/hgfs/boot/booter/source/nand.c ****         ;   	// 60ns min before status available 189:/mnt/hgfs/boot/booter/source/nand.c ****  190:/mnt/hgfs/boot/booter/source/nand.c ****     status = NAND_REG_DATA; 797              		.loc 1 190 0 798 0518 0000A38C 		lw	$3,%lo(nand_virtual_address)($5) 799 051c 20006294 		lhu	$2,32($3) 191:/mnt/hgfs/boot/booter/source/nand.c ****     return status; 192:/mnt/hgfs/boot/booter/source/nand.c **** } 800              		.loc 1 192 0 801 0520 0800E003 		j	$31 802 0524 FF004230 		andi	$2,$2,0x00ff 803              	 804              		.set	macro 805              		.set	reorder 806              	$LFE11: 807              		.end	nand_check_status 808              		.align	2 809              		.globl	nand_block_erase 810              		.ent	nand_block_erase 811              		.type	nand_block_erase, @function 812              	nand_block_erase: 813              	$LFB12: 193:/mnt/hgfs/boot/booter/source/nand.c ****  194:/mnt/hgfs/boot/booter/source/nand.c **** int nand_block_erase(int page) 195:/mnt/hgfs/boot/booter/source/nand.c **** { 814              		.loc 1 195 0 815              		.frame	$sp,32,$31		# vars= 0, regs= 3/0, args= 16, gp= 0 816              		.mask	0x80030000,-8 817              		.fmask	0x00000000,0 818              		.set	noreorder 819              		.set	nomacro 820              		 821 0528 E0FFBD27 		addiu	$sp,$sp,-32 822              	$LCFI10: 196:/mnt/hgfs/boot/booter/source/nand.c ****     int status; 197:/mnt/hgfs/boot/booter/source/nand.c ****      198:/mnt/hgfs/boot/booter/source/nand.c ****     gpioWrite(NAND_CE0, 0);GAS LISTING /tmp/cc4NTrNa.s 			page 19 823              		.loc 1 198 0 824 052c 21280000 		move	$5,$0 825              		.loc 1 195 0 826 0530 1400B1AF 		sw	$17,20($sp) 827              	$LCFI11: 828 0534 1000B0AF 		sw	$16,16($sp) 829              	$LCFI12: 830 0538 21888000 		move	$17,$4 199:/mnt/hgfs/boot/booter/source/nand.c ****     NAND_REG_CMD = NAND_CMD_AUTO_ERASE_SETUP; 831              		.loc 1 199 0 832 053c 0000103C 		lui	$16,%hi(nand_virtual_address) 833              		.loc 1 195 0 834 0540 1800BFAF 		sw	$31,24($sp) 835              	$LCFI13: 836              		.loc 1 198 0 837 0544 0000000C 		jal	gpioWrite 838 0548 15000424 		li	$4,21			# 0x15 839              	 840              		.loc 1 199 0 841 054c 0000038E 		lw	$3,%lo(nand_virtual_address)($16) 842 0550 60000224 		li	$2,96 200:/mnt/hgfs/boot/booter/source/nand.c ****     nand_set_page_address(page); 843              		.loc 1 200 0 844 0554 21202002 		move	$4,$17 845              		.loc 1 199 0 846 0558 000062A4 		sh	$2,0($3) 847              		.loc 1 200 0 848 055c 0000000C 		jal	nand_set_page_address 849 0560 00000000 		nop 850              	 201:/mnt/hgfs/boot/booter/source/nand.c ****     NAND_REG_CMD = NAND_CMD_ERASE; 851              		.loc 1 201 0 852 0564 0000038E 		lw	$3,%lo(nand_virtual_address)($16) 853 0568 D0000224 		li	$2,208 854 056c 000062A4 		sh	$2,0($3) 202:/mnt/hgfs/boot/booter/source/nand.c ****     nand_wait_busy(); 855              		.loc 1 202 0 856 0570 0000000C 		jal	nand_wait_busy 857 0574 00000000 		nop 858              	 203:/mnt/hgfs/boot/booter/source/nand.c ****     status = !(nand_check_status() & NAND_STATUS_ERASE_ERROR); 859              		.loc 1 203 0 860 0578 0000000C 		jal	nand_check_status 861 057c 00000000 		nop 862              	 863 0580 01005038 		xori	$16,$2,0x1 864 0584 01001032 		andi	$16,$16,0x1 204:/mnt/hgfs/boot/booter/source/nand.c ****     gpioWrite(NAND_CE0, 1); 865              		.loc 1 204 0 866 0588 15000424 		li	$4,21			# 0x15 867 058c 0000000C 		jal	gpioWrite 868 0590 01000524 		li	$5,1			# 0x1 869              	 205:/mnt/hgfs/boot/booter/source/nand.c ****     return status; 206:/mnt/hgfs/boot/booter/source/nand.c **** } 870              		.loc 1 206 0 871 0594 21100002 		move	$2,$16GAS LISTING /tmp/cc4NTrNa.s 			page 20 872 0598 1800BF8F 		lw	$31,24($sp) 873 059c 1400B18F 		lw	$17,20($sp) 874 05a0 1000B08F 		lw	$16,16($sp) 875 05a4 0800E003 		j	$31 876 05a8 2000BD27 		addiu	$sp,$sp,32 877              	 878              		.set	macro 879              		.set	reorder 880              	$LFE12: 881              		.end	nand_block_erase 882              		.align	2 883              		.globl	nand_program 884              		.ent	nand_program 885              		.type	nand_program, @function 886              	nand_program: 887              	$LFB13: 207:/mnt/hgfs/boot/booter/source/nand.c ****  208:/mnt/hgfs/boot/booter/source/nand.c **** int nand_program(char* source, int size, int page, int offset) 209:/mnt/hgfs/boot/booter/source/nand.c **** { 888              		.loc 1 209 0 889              		.frame	$sp,40,$31		# vars= 0, regs= 6/0, args= 16, gp= 0 890              		.mask	0x801f0000,-4 891              		.fmask	0x00000000,0 892              		.set	noreorder 893              		.set	nomacro 894              		 895 05ac D8FFBD27 		addiu	$sp,$sp,-40 896              	$LCFI14: 897 05b0 2000B4AF 		sw	$20,32($sp) 898              	$LCFI15: 899 05b4 1C00B3AF 		sw	$19,28($sp) 900              	$LCFI16: 901 05b8 1800B2AF 		sw	$18,24($sp) 902              	$LCFI17: 903 05bc 2198A000 		move	$19,$5 904 05c0 21908000 		move	$18,$4 210:/mnt/hgfs/boot/booter/source/nand.c ****     int bytes; 211:/mnt/hgfs/boot/booter/source/nand.c ****  212:/mnt/hgfs/boot/booter/source/nand.c ****     gpioWrite(NAND_CE0, 0); 905              		.loc 1 212 0 906 05c4 21280000 		move	$5,$0 907 05c8 15000424 		li	$4,21			# 0x15 213:/mnt/hgfs/boot/booter/source/nand.c ****  214:/mnt/hgfs/boot/booter/source/nand.c ****     NAND_REG_CMD = NAND_CMD_SEQ_DATA_INPUT; 908              		.loc 1 214 0 909 05cc 0000143C 		lui	$20,%hi(nand_virtual_address) 910              		.loc 1 209 0 911 05d0 2400BFAF 		sw	$31,36($sp) 912              	$LCFI18: 913 05d4 1400B1AF 		sw	$17,20($sp) 914              	$LCFI19: 915 05d8 1000B0AF 		sw	$16,16($sp) 916              	$LCFI20: 917              		.loc 1 209 0 918 05dc 2188C000 		move	$17,$6 919              		.loc 1 212 0 920 05e0 0000000C 		jal	gpioWriteGAS LISTING /tmp/cc4NTrNa.s 			page 21 921 05e4 2180E000 		move	$16,$7 922              	 923              		.loc 1 214 0 924 05e8 0000838E 		lw	$3,%lo(nand_virtual_address)($20) 925 05ec 80000224 		li	$2,128 215:/mnt/hgfs/boot/booter/source/nand.c ****     nand_set_column_address(offset); 926              		.loc 1 215 0 927 05f0 21200002 		move	$4,$16 928              		.loc 1 214 0 929 05f4 000062A4 		sh	$2,0($3) 216:/mnt/hgfs/boot/booter/source/nand.c ****     nand_set_page_address(page); 217:/mnt/hgfs/boot/booter/source/nand.c ****  218:/mnt/hgfs/boot/booter/source/nand.c ****     for(bytes = 0; bytes < size; ) 930              		.loc 1 218 0 931              		.loc 1 215 0 932 05f8 0000000C 		jal	nand_set_column_address 933 05fc 21800000 		move	$16,$0 934              	 935              		.loc 1 216 0 936 0600 0000000C 		jal	nand_set_page_address 937 0604 21202002 		move	$4,$17 938              	 939              		.loc 1 218 0 940 0608 1400601A 		blez	$19,$L88 941 060c 0000023C 		lui	$2,%hi(nand_device) 942              	 943 0610 0400438C 		lw	$3,%lo(nand_device)($2) 944 0614 0000848E 		lw	$4,%lo(nand_virtual_address)($20) 945 0618 08000524 		li	$5,8			# 0x8 946 061c 8E010008 		j	$L85 947 0620 10000624 		li	$6,16			# 0x10 948              	 949              	$L90: 219:/mnt/hgfs/boot/booter/source/nand.c ****     { 220:/mnt/hgfs/boot/booter/source/nand.c ****         switch(nand_device.data_width) 950              		.loc 1 220 0 951 0624 22006610 		beq	$3,$6,$L84 952 0628 00000000 		nop 953              	 954              		.loc 1 218 0 955 062c 2A101302 		slt	$2,$16,$19 221:/mnt/hgfs/boot/booter/source/nand.c ****         { 222:/mnt/hgfs/boot/booter/source/nand.c ****         case  8: 223:/mnt/hgfs/boot/booter/source/nand.c ****             NAND_REG_DATA = *((char*)source); 224:/mnt/hgfs/boot/booter/source/nand.c ****             source += 1; 225:/mnt/hgfs/boot/booter/source/nand.c ****             bytes += 1; 226:/mnt/hgfs/boot/booter/source/nand.c ****             break; 227:/mnt/hgfs/boot/booter/source/nand.c ****         case 16: 228:/mnt/hgfs/boot/booter/source/nand.c ****             NAND_REG_DATA = *((short*)source); 229:/mnt/hgfs/boot/booter/source/nand.c ****             source += 2; 230:/mnt/hgfs/boot/booter/source/nand.c ****             bytes += 2; 231:/mnt/hgfs/boot/booter/source/nand.c ****             break; 232:/mnt/hgfs/boot/booter/source/nand.c ****         } 233:/mnt/hgfs/boot/booter/source/nand.c ****     } 234:/mnt/hgfs/boot/booter/source/nand.c ****  235:/mnt/hgfs/boot/booter/source/nand.c ****     NAND_REG_CMD = NAND_CMD_PROGRAM; 956              		.loc 1 235 0GAS LISTING /tmp/cc4NTrNa.s 			page 22 957              		.loc 1 218 0 958 0630 0B004010 		beq	$2,$0,$L93 959 0634 0000828E 		lw	$2,%lo(nand_virtual_address)($20) 960              	 961              	$L85: 962              		.loc 1 220 0 963 0638 FAFF6514 		bne	$3,$5,$L90 964 063c 00000000 		nop 965              	 966              		.loc 1 223 0 967 0640 00004282 		lb	$2,0($18) 968              		.loc 1 225 0 969 0644 01001026 		addiu	$16,$16,1 970              		.loc 1 224 0 971 0648 01005226 		addiu	$18,$18,1 972              		.loc 1 228 0 973 064c 200082A4 		sh	$2,32($4) 974              		.loc 1 218 0 975 0650 2A101302 		slt	$2,$16,$19 976              	$L92: 977 0654 F8FF4014 		bne	$2,$0,$L85 978 0658 00000000 		nop 979              	 980              	$L88: 981              		.loc 1 235 0 982 065c 0000828E 		lw	$2,%lo(nand_virtual_address)($20) 983              	$L93: 984 0660 10000324 		li	$3,16 985 0664 000043A4 		sh	$3,0($2) 236:/mnt/hgfs/boot/booter/source/nand.c ****  237:/mnt/hgfs/boot/booter/source/nand.c ****     nand_wait_busy(); 986              		.loc 1 237 0 987 0668 0000000C 		jal	nand_wait_busy 988 066c 00000000 		nop 989              	 238:/mnt/hgfs/boot/booter/source/nand.c ****  239:/mnt/hgfs/boot/booter/source/nand.c ****     if(nand_check_status() & NAND_STATUS_PROGRAM_ERROR) 990              		.loc 1 239 0 991 0670 0000000C 		jal	nand_check_status 992 0674 00000000 		nop 993              	 994 0678 01004230 		andi	$2,$2,0x1 240:/mnt/hgfs/boot/booter/source/nand.c ****         bytes = 0; 995              		.loc 1 240 0 996 067c 0B800200 		movn	$16,$0,$2 241:/mnt/hgfs/boot/booter/source/nand.c ****  242:/mnt/hgfs/boot/booter/source/nand.c ****     gpioWrite(NAND_CE0, 1); 997              		.loc 1 242 0 998 0680 15000424 		li	$4,21			# 0x15

⌨️ 快捷键说明

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