blob: 35ab61158376655a29a918706bc6bb82e21ccb31 [file] [log] [blame]
Richard Smith924f92f2006-07-29 17:40:36 +00001
Uwe Hermann1683cef2008-11-27 00:47:07 +00002static void dump_spd_registers(void)
Richard Smith924f92f2006-07-29 17:40:36 +00003{
4 int i;
5 print_debug("\r\n");
Uwe Hermann1683cef2008-11-27 00:47:07 +00006 for(i = 0; i < DIMM_SOCKETS; i++) {
Richard Smith924f92f2006-07-29 17:40:36 +00007 unsigned device;
Uwe Hermann1683cef2008-11-27 00:47:07 +00008 device = DIMM_SPD_BASE + i;
Richard Smith924f92f2006-07-29 17:40:36 +00009 if (device) {
10 int j;
11 print_debug("dimm: ");
12 print_debug_hex8(i);
13 print_debug(".0: ");
14 print_debug_hex8(device);
15 for(j = 0; j < 256; j++) {
16 int status;
17 unsigned char byte;
18 if ((j & 0xf) == 0) {
19 print_debug("\r\n");
20 print_debug_hex8(j);
21 print_debug(": ");
22 }
23 status = spd_read_byte(device, j);
24 if (status < 0) {
25 print_debug("bad device\r\n");
26 break;
27 }
28 byte = status & 0xff;
29 print_debug_hex8(byte);
30 print_debug_char(' ');
31 }
32 print_debug("\r\n");
33 }
Richard Smith924f92f2006-07-29 17:40:36 +000034 }
35}
36
37#if 0
38void dump_spd_registers(void)
39{
40 unsigned device;
41 device = SMBUS_MEM_DEVICE_START;
42 printk_debug("\n");
43 while(device <= SMBUS_MEM_DEVICE_END) {
44 int status = 0;
45 int i;
46 printk_debug("dimm %02x", device);
47 for(i = 0; (i < 256) && (status == 0); i++) {
48 unsigned char byte;
49 if ((i % 20) == 0) {
50 printk_debug("\n%3d: ", i);
51 }
52 status = smbus_read_byte(device, i, &byte);
53 if (status != 0) {
54 printk_debug("bad device\n");
55 continue;
56 }
57 printk_debug("%02x ", byte);
58 }
59 device += SMBUS_MEM_DEVICE_INC;
60 printk_debug("\n");
61 }
62}
63#endif