Enable -Werror for romcc
[coreboot.git] / util / romcc / tests / simple_test61.c
1 static void spd_set_nbxcfg(void)
2 {
3         /*
4          * Effects:     Uses serial presence detect to set the
5          *              ECC support flags in the NBXCFG register
6          * FIXME:       Check for illegal/unsupported ram configurations and abort
7          */
8         unsigned device;
9
10         for(device = 0x50; device <= 0x53; device += 1) {
11                 int byte;
12
13                 byte = 0; /* Disable ECC */
14                 /* 0 == None, 1 == Parity, 2 == ECC */
15                 if (byte != 2) continue;
16
17                 /* set the device I'm talking too */
18                 __builtin_outb(device, 0x1004);
19
20                 /* poll for transaction completion */
21                 byte = __builtin_inb(0x10);
22                 while(byte == 0) {
23                         byte = __builtin_inb(0x10);
24                 }
25         }
26 }