mirror of
				https://review.coreboot.org/flashrom.git
				synced 2025-10-31 21:30:42 +01:00 
			
		
		
		
	Debug print actual time base calculated by myusec_calibrate_delay()
Corresponding to flashrom svn r314 and coreboot v2 svn r3569. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
This commit is contained in:
		
							
								
								
									
										8
									
								
								udelay.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								udelay.c
									
									
									
									
									
								
							| @@ -55,6 +55,12 @@ void myusec_calibrate_delay() | |||||||
| 	// compute one microsecond. That will be count / time | 	// compute one microsecond. That will be count / time | ||||||
| 	micro = count / timeusec; | 	micro = count / timeusec; | ||||||
|  |  | ||||||
| 	printf_debug("%ldM loops per second. ", (unsigned long)micro); | 	gettimeofday(&start, 0); | ||||||
|  | 	myusec_delay(100); | ||||||
|  | 	gettimeofday(&end, 0); | ||||||
|  | 	timeusec = 1000000 * (end.tv_sec - start.tv_sec) + | ||||||
|  | 	    (end.tv_usec - start.tv_usec); | ||||||
|  | 	printf_debug("%ldM loops per second, 100 myus = %ld us. ", | ||||||
|  | 	    (unsigned long)micro, timeusec); | ||||||
| 	printf("OK.\n"); | 	printf("OK.\n"); | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Peter Stuge
					Peter Stuge