44ee197284a4e2b36327fe082ad2cca8ba30726f
[coreboot.git] / src / northbridge / intel / i82810 / debug.c
1 #include "raminit.h"
2
3 void dump_spd_registers(void)
4 {
5 #if CONFIG_DEBUG_RAM_SETUP
6         int i;
7         print_debug("\n");
8         for(i = 0; i < DIMM_SOCKETS; i++) {
9                 unsigned device;
10                 device = DIMM_SPD_BASE + i;
11                 if (device) {
12                         int j;
13                         print_debug("dimm: ");
14                         print_debug_hex8(i);
15                         print_debug(".0: ");
16                         print_debug_hex8(device);
17                         for(j = 0; j < 256; j++) {
18                                 int status;
19                                 unsigned char byte;
20                                 if ((j & 0xf) == 0) {
21                                         print_debug("\n");
22                                         print_debug_hex8(j);
23                                         print_debug(": ");
24                                 }
25                                 status = smbus_read_byte(device, j);
26                                 if (status < 0) {
27                                         print_debug("bad device\n");
28                                         break;
29                                 }
30                                 byte = status & 0xff;
31                                 print_debug_hex8(byte);
32                                 print_debug_char(' ');
33                         }
34                         print_debug("\n");
35                 }
36         }
37 #endif
38 }