2 * This code is derived from the Opteron boards' debug.c.
3 * It should go away either there or here, depending what fits better.
6 static void dump_spd_registers(const struct mem_controller *ctrl)
10 for(i = 0; i < 4; i++) {
12 device = ctrl->channel0[i];
15 print_debug("dimm: ");
18 print_debug_hex8(device);
19 for(j = 0; j < 256; j++) {
27 status = spd_read_byte(device, j);
29 print_debug("bad device\n");
33 print_debug_hex8(byte);
34 print_debug_char(' ');
38 device = ctrl->channel1[i];
41 print_debug("dimm: ");
44 print_debug_hex8(device);
45 for(j = 0; j < 256; j++) {
53 status = spd_read_byte(device, j);
55 print_debug("bad device\n");
59 print_debug_hex8(byte);
60 print_debug_char(' ');
68 void dump_spd_registers(void)
71 device = SMBUS_MEM_DEVICE_START;
72 printk(BIOS_DEBUG, "\n");
73 while(device <= SMBUS_MEM_DEVICE_END) {
76 printk(BIOS_DEBUG, "dimm %02x", device);
77 for(i = 0; (i < 256) && (status == 0); i++) {
80 printk(BIOS_DEBUG, "\n%3d: ", i);
82 status = smbus_read_byte(device, i, &byte);
84 printk(BIOS_DEBUG, "bad device\n");
87 printk(BIOS_DEBUG, "%02x ", byte);
89 device += SMBUS_MEM_DEVICE_INC;
90 printk(BIOS_DEBUG, "\n");