[U-Boot] [PATCHv1 01/22] arm: socfpga: spl: Add main sdram code

Pavel Machek
2015-02-04T13:36:28Z

On Sat 2015-01-17 03:39:46, Marek Vasut wrote:
> On Friday, January 16, 2015 at 08:04:20 PM, Pavel Machek wrote:
> > Hi!
>
> Hi!
>
> > > > +void wait_di_buffer(void)
> > > > +{
> > > > + if (debug_data->di_report.cur_samples == NUM_DI_SAMPLE) {
> > > > + debug_data->di_report.flags |= DI_REPORT_FLAGS_READY;
> > > > + while (debug_data->di_report.cur_samples != 0)
> > > > + ;
> > >
> > > Please get rid of such endless loops, since the platform might get stuck
> > > forever in them.
> >
> > What would you propose in case of timeout? Message on serial console
> > and reboot?
>
> Yes, reboot and try again would work I suspect.
>
> > Endless loop should trigger watchdog, anyway, no?
>
> If and only if the WDT is enabled, which is not necessarily the case.

Reasonable solution for SPL woul be "always enable the wdt",
then. Probably less overhead than adding timeouts to all the loops...
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html