diff options
author | Wolfgang Denk <wd@denx.de> | 2009-12-15 23:38:34 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-12-15 23:38:34 +0100 |
commit | bb3bcfa2426cc6a0aecec7270e3ee67ca843a125 (patch) | |
tree | 0314e3d8e8d9e4d568a496fca27db33d66e68bb4 /drivers/serial | |
parent | a200a7c04d89853d2a1395b96d8ca5e3dd754551 (diff) | |
parent | 4b142febff71eabdb7ddbb125c7b583b24ddc434 (diff) | |
download | u-boot-imx-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.zip u-boot-imx-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.tar.gz u-boot-imx-bb3bcfa2426cc6a0aecec7270e3ee67ca843a125.tar.bz2 |
Merge branch 'next' of ../next
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/s3c64xx.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial_s3c24x0.c | 6 | ||||
-rw-r--r-- | drivers/serial/serial_s5pc1xx.c | 24 |
3 files changed, 19 insertions, 13 deletions
diff --git a/drivers/serial/s3c64xx.c b/drivers/serial/s3c64xx.c index 1b974e0..6d22df7 100644 --- a/drivers/serial/s3c64xx.c +++ b/drivers/serial/s3c64xx.c @@ -23,7 +23,7 @@ #include <common.h> -#include <s3c6400.h> +#include <asm/arch/s3c6400.h> #ifdef CONFIG_SERIAL1 #define UART_NR S3C64XX_UART0 diff --git a/drivers/serial/serial_s3c24x0.c b/drivers/serial/serial_s3c24x0.c index c2c72e4..5dd4dd8 100644 --- a/drivers/serial/serial_s3c24x0.c +++ b/drivers/serial/serial_s3c24x0.c @@ -19,11 +19,7 @@ */ #include <common.h> -#if defined(CONFIG_S3C2400) || defined(CONFIG_TRAB) -#include <s3c2400.h> -#elif defined(CONFIG_S3C2410) -#include <s3c2410.h> -#endif +#include <asm/arch/s3c24x0_cpu.h> DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/serial/serial_s5pc1xx.c b/drivers/serial/serial_s5pc1xx.c index 68c06a9..73669a9 100644 --- a/drivers/serial/serial_s5pc1xx.c +++ b/drivers/serial/serial_s5pc1xx.c @@ -98,14 +98,24 @@ int serial_init_dev(const int dev_index) return 0; } -static int serial_err_check(const int dev_index) +static int serial_err_check(const int dev_index, int op) { struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index); + unsigned int mask; + + /* + * UERSTAT + * Break Detect [3] + * Frame Err [2] : receive operation + * Parity Err [1] : receive operation + * Overrun Err [0] : receive operation + */ + if (op) + mask = 0x8; + else + mask = 0xf; - if (readl(&uart->uerstat) & 0xf) - return 1; - - return 0; + return readl(&uart->uerstat) & mask; } /* @@ -119,7 +129,7 @@ int serial_getc_dev(const int dev_index) /* wait for character to arrive */ while (!(readl(&uart->utrstat) & 0x1)) { - if (serial_err_check(dev_index)) + if (serial_err_check(dev_index, 0)) return 0; } @@ -135,7 +145,7 @@ void serial_putc_dev(const char c, const int dev_index) /* wait for room in the tx FIFO */ while (!(readl(&uart->utrstat) & 0x2)) { - if (serial_err_check(dev_index)) + if (serial_err_check(dev_index, 1)) return; } |