blob: 464f26f9184aea0cf21dc5003d4a93b7d35e8c66 [file] [log] [blame]
Eric Biedermand1ea5392003-06-28 06:49:45 +00001static void spd_set_memclk(void)
2{
3
4 unsigned min;
5 unsigned device;
6
7
8 min = 0x250;
9
10
11 for(device = 0x80; device <= 0x81; device += 1)
12 {
13 unsigned cur;
14 int latency;
15 unsigned long loops;
16
17 cur = 5 | 0xa0;
18 latency = __builtin_inw(0xab);
19
20 if (latency > 0x250) {
21 loops = 1000000;
22 while(--loops)
23 ;
24 if (!loops) {
25 goto end;
26 }
Stefan Reinauer14e22772010-04-27 06:56:47 +000027
Eric Biedermand1ea5392003-06-28 06:49:45 +000028 loops = 1000000;
29 while(--loops)
30 ;
Stefan Reinauer14e22772010-04-27 06:56:47 +000031 end:
Eric Biedermand1ea5392003-06-28 06:49:45 +000032 ;
Stefan Reinauer14e22772010-04-27 06:56:47 +000033
Eric Biedermand1ea5392003-06-28 06:49:45 +000034 }
35 loops = 1000000;
36 while(--loops)
37 ;
38
39 if (latency > 0x250) {
40 ;
41 }
42
43 if (cur > 0x250) {
44 }
45 }
46
47}