summaryrefslogtreecommitdiff
path: root/util/romcc/tests/simple_test36.c
blob: 9044bda7b97c745867232bd44f2091632d4e784e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
}