Add detection/dump support for ServerEngines SE-SM 4210-P01.
[coreboot.git] / util / romcc / tests / simple_test33.c
1 static void main(void)
2 {
3         unsigned long loops0, loops1, loops2;
4         unsigned long accum;
5
6         accum = 0;
7
8         loops0 = 10;
9         do {
10                 unsigned short val;
11                 val = __builtin_inw(0x10e0);
12                 if (((val & 0x08) == 0)  || (val == 1)) {
13                         break;
14                 }
15         } while(--loops0);
16         if (loops0 < 0) return;
17         accum += loops0;
18
19
20         loops1 = 20;
21         do {
22                 unsigned short val;
23                 val = __builtin_inw(0x10e0);
24                 if (((val & 0x08) == 0)  || (val == 1)) {
25                         break;
26                 }
27         } while(--loops1);
28
29         loops2 = 30;
30         do {
31                 unsigned short val;
32                 val = __builtin_inw(0x10e0);
33                 if (((val & 0x08) == 0)  || (val == 1)) {
34                         break;
35                 }
36         } while(--loops2);
37
38         accum += loops1 + loops0;
39 }
40
41