~ubuntu-branches/ubuntu/saucy/u-boot/saucy

« back to all changes in this revision

Viewing changes to drivers/serial/serial_ixp.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2011-07-24 09:35:32 UTC
  • mfrom: (16.1.16 sid)
  • Revision ID: james.westby@ubuntu.com-20110724093532-8gkkvtczkjagf4gv
Tags: 2011.06-3
Add DreamPlug support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
#include <common.h>
32
32
#include <asm/arch/ixp425.h>
 
33
#include <watchdog.h>
33
34
 
34
35
/*
35
36
 *               14.7456 MHz
85
86
void serial_putc (const char c)
86
87
{
87
88
        /* wait for room in the tx FIFO on UART */
88
 
        while ((LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_TEMT) == 0);
 
89
        while ((LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_TEMT) == 0)
 
90
                WATCHDOG_RESET();       /* Reset HW Watchdog, if needed */
89
91
 
90
92
        THR(CONFIG_SYS_IXP425_CONSOLE) = c;
91
93
 
111
113
 */
112
114
int serial_getc (void)
113
115
{
114
 
        while (!(LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_DR));
 
116
        while (!(LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_DR))
 
117
                WATCHDOG_RESET();       /* Reset HW Watchdog, if needed */
115
118
 
116
119
        return (char) RBR(CONFIG_SYS_IXP425_CONSOLE) & 0xff;
117
120
}