From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 20 Jan 2005 08:20:49 -0500 Subject: [U-Boot-Users] Query regarding PSDMR register values. In-Reply-To: <3D9FDCA910DD4445896A0BE5ECF009D40259A5B1@bla.satyam.com> References: <3D9FDCA910DD4445896A0BE5ECF009D40259A5B1@bla.satyam.com> Message-ID: <41EFB031.4050901@smiths-aerospace.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Apoorv_Sangal wrote: > Hello All, > I am customizing Uboot for PowerQuiccII 8266 based PMC card. > Can anyone please let me know how the value of the PSDMR register is > obtained / calculated? > We are using MT48LC16M16A2 SDRAM (SODIMM). Specifically, we are looking or > the values of RFRC, PRETOACT, ACTTORW, LDOTOPRE and WRC fields in PSDMR. The > datasheet of SDRAM gives those values in nanoseconds. > But the PSDMR register in Uboot needs values in clock cycles. > Can anyone please tell me how to calculate the values for the required > fields (in clock cycles) from the values in the datasheet (in nanosecs)? > > Thanks & Regards, > Apoorv Sangal. freq = 1/time time = 1/freq clock cycles = time * freq Pick the one that matches the problem and use consistent units. Read the 8266 User's Manual and your board documentation/schematic to determine the frequency that your CPU is clocked at. Use the "ceiling" function on your clock cycles calculation (i.e. "round up"). gvb