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
		
			
				
	
	
		
			42 lines
		
	
	
		
			740 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			42 lines
		
	
	
		
			740 B
		
	
	
	
		
			C
		
	
	
	
	
	
| static void order_dimms(void)
 | |
| {
 | |
|         unsigned long tom;
 | |
| 
 | |
|         tom = 0;
 | |
|         for(;;) {
 | |
| 
 | |
|                 unsigned csbase, csmask;
 | |
|                 unsigned size;
 | |
| 		unsigned index;
 | |
|                 csbase = 0;
 | |
| 
 | |
|                 for(index = 0; index < 1; index++) {
 | |
| 			csbase = __builtin_inl(0x40);
 | |
|                 }
 | |
|                 if (csbase == 0) {
 | |
|                         break;
 | |
|                 }
 | |
| 
 | |
| 
 | |
|                 size = csbase;
 | |
| 
 | |
|                 csbase = (tom << 21);
 | |
| 
 | |
|                 tom += size;
 | |
| 
 | |
| 
 | |
|                 csmask = size;
 | |
|                 csmask |= 0xfe00;
 | |
| 
 | |
| 
 | |
| 		__builtin_outl(csbase, 0xCFC);
 | |
| 
 | |
| 		__builtin_outl(0xc260, 0xCF8);
 | |
| 		__builtin_outl(csmask, 0xCFC);
 | |
|         }
 | |
| 
 | |
| 	tom &=  ~0xff000000;
 | |
| 
 | |
| 	__builtin_outl(tom, 0x1234);
 | |
| }
 |