[U-Boot] [PATCH 24/29] dm: serial: Reset the watchdog when outputting characters

Simon Glass sjg at chromium.org
Thu Dec 15 04:27:55 CET 2016


In some cases it can take a enough time to output serial characters that
the watchdog triggers. Add a reset call to avoid this. This mirrors a
similar call on input.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/serial/serial-uclass.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 43c028e..489bbcc 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -134,6 +134,8 @@ static void _serial_putc(struct udevice *dev, char ch)
 
 	do {
 		err = ops->putc(dev, ch);
+		if (err == -EAGAIN)
+			WATCHDOG_RESET();
 	} while (err == -EAGAIN);
 }
 
-- 
2.8.0.rc3.226.g39d4020



More information about the U-Boot mailing list