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

📄 psc_i2c.lst

📁 au1200下的boot代码
💻 LST
📖 第 1 页 / 共 5 页
字号:
GAS LISTING /tmp/ccmjNVoP.s 			page 1   1              		.section .mdebug.abi32   2              		.previous   3              		.section	.debug_abbrev,"",@progbits   4              	$Ldebug_abbrev0:   5              		.section	.debug_info,"",@progbits   6              	$Ldebug_info0:   7              		.section	.debug_line,"",@progbits   8              	$Ldebug_line0:   9 0000 9F010000 		.text   9      0200A600    9      00000101    9      FB0E0A00    9      01010101   10              	$Ltext0:  11              		.data  12              		.align	2  13              		.type	smb, @object  14              		.size	smb, 4  15              	smb:  16 0000 0000B0B1 		.word	-1313865728  17              		.align	2  18              		.type	sys, @object  19              		.size	sys, 4  20              	sys:  21 0004 000090B1 		.word	-1315962880  22 0008 00000000 		.text  22      00000000   23              		.align	2  24              		.ent	i2c_wait_status  25              		.type	i2c_wait_status, @function  26              	i2c_wait_status:  27              	$LFB2:  28              		.file 1 "/mnt/hgfs/boot/booter/source/psc_i2c.c"   1:/mnt/hgfs/boot/booter/source/psc_i2c.c **** #if defined(DB1200)   2:/mnt/hgfs/boot/booter/source/psc_i2c.c ****    3:/mnt/hgfs/boot/booter/source/psc_i2c.c **** #include "example.h"   4:/mnt/hgfs/boot/booter/source/psc_i2c.c **** #include "i2c.h"   5:/mnt/hgfs/boot/booter/source/psc_i2c.c ****    6:/mnt/hgfs/boot/booter/source/psc_i2c.c **** static PSC_SMB	*smb = (PSC_SMB *)KSEG1(SMBUS_PSC_BASE);   7:/mnt/hgfs/boot/booter/source/psc_i2c.c **** static AU1X00_SYS	*sys = (AU1X00_SYS *)KSEG1(SYS_PHYS_ADDR);   8:/mnt/hgfs/boot/booter/source/psc_i2c.c ****    9:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   10:/mnt/hgfs/boot/booter/source/psc_i2c.c **** static int i2c_wait_status(uint32 status, int set_or_clear, uint32 timeout)  11:/mnt/hgfs/boot/booter/source/psc_i2c.c **** {  29              		.loc 1 11 0  30              		.frame	$sp,40,$31		# vars= 0, regs= 6/0, args= 16, gp= 0  31              		.mask	0x801f0000,-4  32              		.fmask	0x00000000,0  33              		.set	noreorder  34              		.set	nomacro  35              		  36 0000 D8FFBD27 		addiu	$sp,$sp,-40  37              	$LCFI0:  38 0004 2000B4AF 		sw	$20,32($sp)  39              	$LCFI1:  40 0008 1C00B3AF 		sw	$19,28($sp)  41              	$LCFI2:GAS LISTING /tmp/ccmjNVoP.s 			page 2  42 000c 1800B2AF 		sw	$18,24($sp)  43              	$LCFI3:  44 0010 1400B1AF 		sw	$17,20($sp)  45              	$LCFI4:  46 0014 1000B0AF 		sw	$16,16($sp)  47              	$LCFI5:  48 0018 2400BFAF 		sw	$31,36($sp)  49              	$LCFI6:  12:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	int time = 0;  13:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	//printf("shuaiwen:smb=%x\n",smb);  14:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	while(!(smb->sts & status))  15:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	{  16:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		if(set_or_clear)  17:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		{  18:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 			if(smb->sts & status)  19:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 				break;  20:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		}  21:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		else  22:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		{  23:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 			if(!(smb->sts & status))  24:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 				break;  25:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		}  26:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   27:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		if(++time > timeout)  28:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 			return 0;  29:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		msdelay(10);  50              		.loc 1 29 0  51 001c 0000123C 		lui	$18,%hi(smb)  52 0020 0000438E 		lw	$3,%lo(smb)($18)  53              		.loc 1 11 0  54 0024 2198C000 		move	$19,$6  55 0028 21888000 		move	$17,$4  56              		.loc 1 29 0  57 002c 1400628C 		lw	$2,20($3)  58              		.loc 1 11 0  59 0030 21A0A000 		move	$20,$5  60              		.loc 1 12 0  61 0034 21800000 		move	$16,$0  62              		.loc 1 29 0  63 0038 24104400 		and	$2,$2,$4  64 003c 14004014 		bne	$2,$0,$L3  65 0040 21304002 		move	$6,$18  66              	  67              		.loc 1 27 0  68 0044 01001026 		addiu	$16,$16,1  69              	$L17:  70              		.loc 1 29 0  71 0048 0A000424 		li	$4,10			# 0xa  72              		.loc 1 27 0  73              		.loc 1 16 0  74 004c 19008012 		beq	$20,$0,$L4  75 0050 2B287002 		sltu	$5,$19,$16  76              	  77              		.loc 1 18 0  78 0054 0000C38C 		lw	$3,%lo(smb)($6)  79 0058 1400628C 		lw	$2,20($3)  80 005c 24105100 		and	$2,$2,$17GAS LISTING /tmp/ccmjNVoP.s 			page 3  30:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	}  31:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   32:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	return 1;  33:/mnt/hgfs/boot/booter/source/psc_i2c.c **** }  81              		.loc 1 33 0  82              		.loc 1 18 0  83 0060 0C004014 		bne	$2,$0,$L15  84 0064 2400BF8F 		lw	$31,36($sp)  85              	  86              		.loc 1 27 0  87 0068 1900A014 		bne	$5,$0,$L16  88 006c 00000000 		nop  89              	  90              	$L8:  91              		.loc 1 29 0  92 0070 0000000C 		jal	msdelay  93 0074 00000000 		nop  94              	  95 0078 0000438E 		lw	$3,%lo(smb)($18)  96 007c 0000063C 		lui	$6,%hi(smb)  97 0080 1400628C 		lw	$2,20($3)  98 0084 24105100 		and	$2,$2,$17  99              		.loc 1 27 0 100              		.loc 1 29 0 101 0088 EFFF4010 		beq	$2,$0,$L17 102 008c 01001026 		addiu	$16,$16,1 103              	 104              	$L3: 105              		.loc 1 33 0 106 0090 2400BF8F 		lw	$31,36($sp) 107              	$L15: 108 0094 2000B48F 		lw	$20,32($sp) 109 0098 1C00B38F 		lw	$19,28($sp) 110 009c 1800B28F 		lw	$18,24($sp) 111 00a0 1400B18F 		lw	$17,20($sp) 112 00a4 1000B08F 		lw	$16,16($sp) 113              		.loc 1 32 0 114 00a8 01000224 		li	$2,1			# 0x1 115              		.loc 1 33 0 116 00ac 0800E003 		j	$31 117 00b0 2800BD27 		addiu	$sp,$sp,40 118              	 119              	$L4: 120              		.loc 1 23 0 121 00b4 0000438E 		lw	$3,%lo(smb)($18) 122 00b8 1400628C 		lw	$2,20($3) 123 00bc 24105100 		and	$2,$2,$17 124              		.loc 1 33 0 125              		.loc 1 23 0 126 00c0 F4FF4010 		beq	$2,$0,$L15 127 00c4 2400BF8F 		lw	$31,36($sp) 128              	 129              		.loc 1 27 0 130 00c8 E9FFA010 		beq	$5,$0,$L8 131 00cc 00000000 		nop 132              	 133              	$L16:GAS LISTING /tmp/ccmjNVoP.s 			page 4 134              		.loc 1 33 0 135 00d0 2000B48F 		lw	$20,32($sp) 136 00d4 1C00B38F 		lw	$19,28($sp) 137 00d8 1800B28F 		lw	$18,24($sp) 138 00dc 1400B18F 		lw	$17,20($sp) 139 00e0 1000B08F 		lw	$16,16($sp) 140              		.loc 1 28 0 141 00e4 21100000 		move	$2,$0 142              		.loc 1 33 0 143 00e8 0800E003 		j	$31 144 00ec 2800BD27 		addiu	$sp,$sp,40 145              	 146              		.set	macro 147              		.set	reorder 148              	$LFE2: 149              		.end	i2c_wait_status 150              		.align	2 151              		.ent	i2c_start 152              		.type	i2c_start, @function 153              	i2c_start: 154              	$LFB4:  34:/mnt/hgfs/boot/booter/source/psc_i2c.c ****      35:/mnt/hgfs/boot/booter/source/psc_i2c.c **** static int i2c_wait_event(uint32 event, uint32 timeout)  36:/mnt/hgfs/boot/booter/source/psc_i2c.c **** {  37:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	int time = 0;  38:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	  39:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	while(!(smb->evnt & event))  40:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	{  41:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		if(++time > timeout)  42:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		{  43:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 			DPRINTF("TIMEOUT waiting for event=0x%2x\n", event);  44:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 			return 0;  45:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		}  46:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		msdelay(10);  47:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	}  48:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	smb->evnt = event;  49:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   50:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	return 1;  51:/mnt/hgfs/boot/booter/source/psc_i2c.c **** }  52:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   53:/mnt/hgfs/boot/booter/source/psc_i2c.c **** static int i2c_start()  54:/mnt/hgfs/boot/booter/source/psc_i2c.c **** { 155              		.loc 1 54 0 156              		.frame	$sp,24,$31		# vars= 0, regs= 1/0, args= 16, gp= 0 157              		.mask	0x80000000,-8 158              		.fmask	0x00000000,0 159              		.set	noreorder 160              		.set	nomacro 161              		 162 00f0 E8FFBD27 		addiu	$sp,$sp,-24 163              	$LCFI7:  55:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	if(!i2c_wait_status(PSC_SMB_STS_BB, 0, I2C_CMD_TIMEOUT)) 164              		.loc 1 55 0 165 00f4 21280000 		move	$5,$0 166 00f8 0010043C 		li	$4,268435456			# 0x10000000 167              		.loc 1 54 0 168 00fc 1000BFAF 		sw	$31,16($sp)GAS LISTING /tmp/ccmjNVoP.s 			page 5 169              	$LCFI8: 170              		.loc 1 55 0 171 0100 0000000C 		jal	i2c_wait_status 172 0104 64000624 		li	$6,100			# 0x64 173              	  56:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		return 0; 174              		.loc 1 56 0 175              		.loc 1 55 0 176 0108 0B004010 		beq	$2,$0,$L18 177 010c 21280000 		move	$5,$0 178              	  57:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   58:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	smb->evnt = PSC_SMB_EVENT_ALL;	// clear events 179              		.loc 1 58 0 180 0110 0000023C 		lui	$2,%hi(smb) 181 0114 0000448C 		lw	$4,%lo(smb)($2) 182 0118 0170023C 		li	$2,1879113728			# 0x70010000 183 011c 301B4234 		ori	$2,$2,0x1b30 184 0120 180082AC 		sw	$2,24($4)  59:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	smb->pcr = PSC_SMB_PCR_DC;	// clear FIFOs 185              		.loc 1 59 0 186 0124 04000324 		li	$3,4			# 0x4  60:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	smb->pcr = PSC_SMB_PCR_MS;	// start transfer 187              		.loc 1 60 0 188 0128 01000224 		li	$2,1			# 0x1 189              		.loc 1 59 0 190 012c 100083AC 		sw	$3,16($4)  61:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   62:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	return 1; 191              		.loc 1 62 0 192 0130 01000524 		li	$5,1			# 0x1 193              		.loc 1 60 0 194 0134 100082AC 		sw	$2,16($4) 195              	$L18:  63:/mnt/hgfs/boot/booter/source/psc_i2c.c **** } 196              		.loc 1 63 0 197 0138 1000BF8F 		lw	$31,16($sp) 198 013c 2110A000 		move	$2,$5 199 0140 0800E003 		j	$31 200 0144 1800BD27 		addiu	$sp,$sp,24 201              	 202              		.set	macro 203              		.set	reorder 204              	$LFE4: 205              		.end	i2c_start 206              		.align	2 207              		.ent	i2c_write_data 208              		.type	i2c_write_data, @function 209              	i2c_write_data: 210              	$LFB5:  64:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   65:/mnt/hgfs/boot/booter/source/psc_i2c.c **** static int i2c_write_data(uint8* data, int len, int stop)  66:/mnt/hgfs/boot/booter/source/psc_i2c.c **** { 211              		.loc 1 66 0 212              		.frame	$sp,56,$31		# vars= 0, regs= 10/0, args= 16, gp= 0 213              		.mask	0xc0ff0000,-4 214              		.fmask	0x00000000,0GAS LISTING /tmp/ccmjNVoP.s 			page 6 215              		.set	noreorder 216              		.set	nomacro 217              		 218 0148 C8FFBD27 		addiu	$sp,$sp,-56 219              	$LCFI9: 220 014c 2400B5AF 		sw	$21,36($sp) 221              	$LCFI10: 222 0150 1800B2AF 		sw	$18,24($sp) 223              	$LCFI11: 224 0154 1400B1AF 		sw	$17,20($sp) 225              	$LCFI12: 226 0158 1000B0AF 		sw	$16,16($sp) 227              	$LCFI13: 228 015c 3400BFAF 		sw	$31,52($sp) 229              	$LCFI14: 230 0160 3000BEAF 		sw	$fp,48($sp) 231              	$LCFI15: 232 0164 2C00B7AF 		sw	$23,44($sp) 233              	$LCFI16: 234 0168 2800B6AF 		sw	$22,40($sp) 235              	$LCFI17: 236 016c 2000B4AF 		sw	$20,32($sp) 237              	$LCFI18: 238 0170 1C00B3AF 		sw	$19,28($sp) 239              	$LCFI19: 240              		.loc 1 66 0 241 0174 2190A000 		move	$18,$5 242 0178 21808000 		move	$16,$4 243 017c 21A8C000 		move	$21,$6  67:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	int i;  68:/mnt/hgfs/boot/booter/source/psc_i2c.c ****   69:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	for(i = 0; i < len; i++) 244              		.loc 1 69 0 245 0180 1800A018 		blez	$5,$L33 246 0184 21880000 		move	$17,$0 247              	 248 0188 FFFFB424 		addiu	$20,$5,-1 249 018c 01001624 		li	$22,1			# 0x1 250 0190 0000133C 		lui	$19,%hi(smb) 251 0194 00201E3C 		li	$fp,536870912			# 0x20000000 252 0198 0010173C 		li	$23,268435456			# 0x10000000  70:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 	{  71:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		// Wait tx fifo not full  72:/mnt/hgfs/boot/booter/source/psc_i2c.c **** 		if(!i2c_wait_status(PSC_SMB_STS_TF, 0, I2C_CMD_TIMEOUT)) 253              		.loc 1 72 0 254 019c 00040424 		li	$4,1024			# 0x400 255              	$L39: 256 01a0 21280000 		move	$5,$0 257 01a4 0000000C 		jal	i2c_wait_status 258 01a8 64000624 		li	$6,100			# 0x64 259              	

⌨️ 快捷键说明

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