From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Date: Fri, 16 Jan 2015 20:04:20 +0100 Subject: [U-Boot] [PATCHv1 01/22] arm: socfpga: spl: Add main sdram code In-Reply-To: <201501150034.16486.marex@denx.de> References: <1421253662-27222-1-git-send-email-dinguyen@opensource.altera.com> <1421253662-27222-2-git-send-email-dinguyen@opensource.altera.com> <201501150034.16486.marex@denx.de> Message-ID: <20150116190420.GD8425@amd> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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? Endless loop should trigger watchdog, anyway, no? Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html