Eric Biederman | d1ea539 | 2003-06-28 06:49:45 +0000 | [diff] [blame] | 1 | static 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 Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 27 | |
Eric Biederman | d1ea539 | 2003-06-28 06:49:45 +0000 | [diff] [blame] | 28 | loops = 1000000; |
29 | while(--loops) | ||||
30 | ; | ||||
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 31 | end: |
Eric Biederman | d1ea539 | 2003-06-28 06:49:45 +0000 | [diff] [blame] | 32 | ; |
Stefan Reinauer | 14e2277 | 2010-04-27 06:56:47 +0000 | [diff] [blame] | 33 | |
Eric Biederman | d1ea539 | 2003-06-28 06:49:45 +0000 | [diff] [blame] | 34 | } |
35 | loops = 1000000; | ||||
36 | while(--loops) | ||||
37 | ; | ||||
38 | |||||
39 | if (latency > 0x250) { | ||||
40 | ; | ||||
41 | } | ||||
42 | |||||
43 | if (cur > 0x250) { | ||||
44 | } | ||||
45 | } | ||||
46 | |||||
47 | } |