blob: 53aaf91aedf66a52b38b71412ae5e766c7841349 [file] [log] [blame]
Eric Biedermanf7a0ba82003-06-19 15:14:52 +00001static 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 }
Stefan Reinauer14e22772010-04-27 06:56:47 +000037
Eric Biedermanf7a0ba82003-06-19 15:14:52 +000038 tom &= ~0xff000000;
39
40 __builtin_outl(tom, 0x1234);
41}