On Fri, 2012-01-13 at 15:08 -0800, Stephen Warren wrote: > On 01/13/2012 04:05 PM, Simon Glass wrote: > > On Fri, Jan 13, 2012 at 2:04 PM, Yen Lin <ye...@nvidia.com> wrote: > >> On Fri, 2012-01-13 at 11:34 -0800, Simon Glass wrote: > >>> On Tue, Jan 10, 2012 at 10:30 AM, Stephen Warren <swar...@nvidia.com> > >>> wrote: > >>>> On 12/26/2011 12:33 PM, Simon Glass wrote: > ... > >>> But there a few questions here. Firstly it seems that it saves some > >>> memory speed info to scratch2 but never restores it. Then it restores > >>> CPU speed from scratch3 but I can't see where it saves it. Does Yen > >>> have any comments on that? Apparently it works because we have been > >>> using it, but... If it is saving things that are never restored I > >>> could dump that and reduce the code size. > >>> > >> > >> U-boot code saves sdram parameters to scratch2, scratch4, and scratch 24 > >> registers, so when system resumes, bootrom can restore sdram parameters > >> from these registers. > >> > >> The scratch3 register content was saved by kernel before suspend, and is > >> used by the warmboot code to restore PLLX settings. > > > > Thanks for the info. > > > > On resume I do not see it using scratch2, 4 or 24 within U-Boot. Are > > those used in the kernel? > > The Tegra boot ROM (which contains the power-on code for the AVP) is > what interprets these, according to Yen above. > > One question for Yen: Why doesn't the boot ROM read the SDRAM parameters > from the BCT like it does during a cold boot? Perhaps there's some > interaction with clock settings, so the boot ROM needs to know the > clock/voltage/... state the kernel was in when suspending, rather than > just using the "usual" cold boot settings? >
This is to reduce latency. During resume, Bootrom will not read BCT (from SPI or EMMC) to set SDRAM parameters. Instead, it reads directly from those scratch registers to set SDRAM. > > I should add something to document this so the kernel people can match > > up when that side of it goes up stream. > ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot