while others dislike them being extra commits, let's clean them up once and for all for the existing code. If it's ugly, let it only be ugly once :-) Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5507 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
		
			
				
	
	
		
			48 lines
		
	
	
		
			668 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			668 B
		
	
	
	
		
			C
		
	
	
	
	
	
| static void spd_set_memclk(void)
 | |
| {
 | |
| 
 | |
|         unsigned min;
 | |
|         unsigned device;
 | |
| 
 | |
| 
 | |
| 	min = 0x250;
 | |
| 
 | |
| 
 | |
|         for(device = 0x80; device <= 0x81; device += 1)
 | |
|         {
 | |
|                 unsigned cur;
 | |
|                 int latency;
 | |
| 		unsigned long loops;
 | |
| 
 | |
| 		cur = 5 | 0xa0;
 | |
| 		latency = __builtin_inw(0xab);
 | |
| 
 | |
|                 if (latency > 0x250) {
 | |
| 			loops = 1000000;
 | |
| 			while(--loops)
 | |
| 				;
 | |
| 			if (!loops) {
 | |
| 				goto end;
 | |
| 			}
 | |
| 
 | |
| 			loops = 1000000;
 | |
| 			while(--loops)
 | |
| 				;
 | |
| 		end:
 | |
| 			;
 | |
| 
 | |
|                 }
 | |
| 		loops = 1000000;
 | |
| 		while(--loops)
 | |
| 			;
 | |
| 
 | |
|                 if (latency > 0x250) {
 | |
| 			;
 | |
|                 }
 | |
| 
 | |
|                 if (cur > 0x250) {
 | |
|                 }
 | |
|         }
 | |
| 
 | |
| }
 |