From: Tom Rini Date: Fri, 23 Sep 2016 15:57:56 -0400 Subject: [U-Boot] [PATCH v2] common/xyzModem.c: Fix delay timeout calculation In-Reply-To: <20160920153949.11988-1-afd@ti.com> References: <20160920153949.11988-1-afd@ti.com> Message-ID: <20160923195756.GU4884@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Sep 20, 2016 at 10:39:49AM -0500, Andrew F. Davis wrote: > When waiting for input in CYGACC_COMM_IF_GETC_TIMEOUT we delay 2 > seconds by incrementing and checking a counter variable every 20 > uSeconds. The overhead in the loop calling tstc() thousands of times > causes the timeout to be closer to 20 seconds. Delay longer per iteration > to reduce overhead and bring the timeout back closer to the correct time. > > Signed-off-by: Andrew F. Davis Reviewed-by: Tom Rini -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: