[U-Boot-Users] Question about spd_sdram function

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