Add detection/dump support for ServerEngines SE-SM 4210-P01.
[coreboot.git] / util / romcc / tests / simple_test60.c
1 struct mem_param {
2         unsigned char cycle_time;
3         unsigned char divisor;
4         unsigned char tRC;
5         unsigned char tRFC;
6         unsigned dch_memclk;
7         unsigned short dch_tref4k, dch_tref8k;
8         unsigned char dtl_twr;
9         char name[9];
10 };
11
12 static void test(void)
13 {
14         static const struct mem_param param0 = {
15                 .name = "166Mhz\r\n",
16                 .cycle_time = 0x60,
17                 .divisor = (6<<1),
18                 .tRC = 0x3C,
19                 .tRFC = 0x48,
20                 .dch_memclk = 5 << 20,
21                 .dch_tref4k = 0x02,
22                 .dch_tref8k = 0x0A,
23                 .dtl_twr = 3,
24         };
25         int value;
26         unsigned clocks;
27         const struct mem_param *param;
28         param = &param0;
29         value = 0x48;
30 #warning "this generated word loads instead of byte loads"
31         clocks = (value + (param->divisor << 1) - 1)/(param->divisor << 1);
32 }