Hi<br><br>I&#39;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>&nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp; &nbsp;* Convert trfc_clk to DDR controller fields.&nbsp; DDR I should<br>&nbsp;&nbsp;&nbsp; &nbsp;* fit in the REFREC field (16-19) of TIMING_CFG_1, but the
<br>&nbsp;&nbsp;&nbsp; &nbsp;* 8548 controller has an extended REFREC field of three bits.<br>&nbsp;&nbsp;&nbsp; &nbsp;* The controller automatically adds 8 clocks to this value,<br>&nbsp;&nbsp;&nbsp; &nbsp;* so preadjust it down 8 first before splitting it up.<br>&nbsp;&nbsp;&nbsp; &nbsp;*/<br>&nbsp;&nbsp;&nbsp; trfc_low = (trfc_clk - 8) &amp; 0xf;
<br>&nbsp;&nbsp;&nbsp; trfc_high = ((trfc_clk - 8) &gt;&gt; 4) &amp; 0x3;<br>/---- end of code ----/<br><br>there is inconsistency in code and comment&nbsp; - 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) &gt;&gt; 4) &amp; 0x7; ).<br><br>Is it a bug ? <br><br>-- <br>Best regards<br>Arcady Gilinsky