Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / util / romcc / tests / simple_test36.c
1 static void order_dimms(void)
2 {
3         unsigned long tom;
4
5         tom = 0;
6         for(;;) {
7
8                 unsigned csbase, csmask;
9                 unsigned size;
10                 unsigned index;
11                 csbase = 0;
12
13                 for(index = 0; index < 1; index++) {
14                         csbase = __builtin_inl(0x40);
15                 }
16                 if (csbase == 0) {
17                         break;
18                 }
19
20
21                 size = csbase;
22
23                 csbase = (tom << 21);
24
25                 tom += size;
26
27
28                 csmask = size;
29                 csmask |= 0xfe00;
30
31
32                 __builtin_outl(csbase, 0xCFC);
33
34                 __builtin_outl(0xc260, 0xCF8);
35                 __builtin_outl(csmask, 0xCFC);
36         }
37
38         tom &=  ~0xff000000;
39
40         __builtin_outl(tom, 0x1234);
41 }