summaryrefslogtreecommitdiff
path: root/drivers/serial/atmel_usart.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-03-27 23:26:42 +0100
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2009-04-04 20:42:19 +0200
commit843a2654bce74192de2b5a43474fdc27a572ab40 (patch)
tree57d05fbf6aed7864552894e1204cb02c862b1d00 /drivers/serial/atmel_usart.c
parenta47492ac60657dd9d59c713aa049319ea6eabd52 (diff)
downloadu-boot-imx-843a2654bce74192de2b5a43474fdc27a572ab40.zip
u-boot-imx-843a2654bce74192de2b5a43474fdc27a572ab40.tar.gz
u-boot-imx-843a2654bce74192de2b5a43474fdc27a572ab40.tar.bz2
at91sam9: add watchdog support
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/serial/atmel_usart.c')
-rw-r--r--drivers/serial/atmel_usart.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index f3b146c..f50552a 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -16,6 +16,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <common.h>
+#include <watchdog.h>
#include <asm/io.h>
#include <asm/arch/clk.h>
@@ -87,7 +88,8 @@ void serial_puts(const char *s)
int serial_getc(void)
{
- while (!(usart3_readl(CSR) & USART3_BIT(RXRDY))) ;
+ while (!(usart3_readl(CSR) & USART3_BIT(RXRDY)))
+ WATCHDOG_RESET();
return usart3_readl(RHR);
}