Hi<br><br>I'm working with MPC8548 based board and use U-Boot 1.2.0.<br>I use hard-coded values for memory controller,<br>but in nearest future I want to use SPD based initialization, <br>so there is a question related to SPD code.
<br><br>Looking at spd_sdram function at next code:<br>/---- start of code ----/<br> /*<br> * Convert trfc_clk to DDR controller fields. DDR I should<br> * fit in the REFREC field (16-19) of TIMING_CFG_1, but the
<br> * 8548 controller has an extended REFREC field of three bits.<br> * The controller automatically adds 8 clocks to this value,<br> * so preadjust it down 8 first before splitting it up.<br> */<br> trfc_low = (trfc_clk - 8) & 0xf;
<br> trfc_high = ((trfc_clk - 8) >> 4) & 0x3;<br>/---- end of code ----/<br><br>there is inconsistency in code and comment - the value of REFREC extended field (EXT_REFREC)<br>stored at trfc_high variable and contains only two bits of calculation,
<br>but comments above and spec of MPC8548 say that the EXT_REFREC field is 3 bit long<br>(i.e. should be trfc_high = ((trfc_clk - 8) >> 4) & 0x7; ).<br><br>Is it a bug ? <br><br>-- <br>Best regards<br>Arcady Gilinsky