From: Tom Rini Date: Tue, 15 Jan 2019 21:43:53 -0500 Subject: [U-Boot] [U-Boot, v3] xyz-modem: Fix timeout loop waiting with WATCHDOG In-Reply-To: <20190108135835.3201-1-lokeshvutla@ti.com> References: <20190108135835.3201-1-lokeshvutla@ti.com> Message-ID: <20190116024353.GK27429@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, Jan 08, 2019 at 07:28:35PM +0530, Lokesh Vutla wrote: > Commit 2c77c0d6524eb ("xyz-modem: Change getc timeout loop waiting") > fixes the loop delay when using a hw watchdog, assuming that watchdog > kicking is taken care of by getc(). But the xyzmodem driver tries to > do a getc only after confirming that a character is available like below: > while (!tstc()) { > till timeout; > } > if (tstc()) > *c = getc(); > > and getc() does a watchdog reset only if it fails to see a character. > In this case, getc() always sees a character and never does a > watchdog reset. So to make sure that watchdog doesn't get reset > while loading the file, do a watchdog reset just before starting the > image loading. > > Signed-off-by: Lokesh Vutla > Signed-off-by: Vignesh R > Reviewed-by: Simon Glass Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: