Quoting Myles Watson myles@pel.cs.byu.edu:
static int spd_read_byte(unsigned device, unsigned address) { int i;
if (device == 0x50){ return do_smbus_read_byte(device, address); } else if (device == 0x51){ for (i=0; i < (sizeof spd_table/sizeof spd_table[0]); i++){ if (spd_table[i].address == address){ return spd_table[i].data; } }
return 0xFF; /* This line returns 0xFF when address not found */
} else { return 0xFF; /* returns 0xFF on any failures */ }
}
Hmm, This isn't working. In raminit.c the spd_read_byte() uses ctrl->channel0[i] not device (0x51). Example:
smbus_read_byte(ctrl->channel0[i], 2)
I will have to investigate what this tranlates to. Does anyone know off the top of their head what ctrl->channel0[i] translates to?
Thanks - Joe