summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared/uart
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-06-30 13:34:09 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-07-01 10:25:27 +0200
commit516a60a6f8d5cdaabf4329872b8d6cef52a67542 (patch)
tree763411e06aa2def42c00c30cd87e95fe8f2113ab /c/src/lib/libbsp/sparc/shared/uart
parentLEON3: devfs free nodes must be sized (diff)
downloadrtems-516a60a6f8d5cdaabf4329872b8d6cef52a67542.tar.bz2
bsps/sparc: Reduce copy and paste
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/uart')
-rw-r--r--c/src/lib/libbsp/sparc/shared/uart/apbuart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/uart/apbuart.c b/c/src/lib/libbsp/sparc/shared/uart/apbuart.c
index e64784faec..f7e9a7f58e 100644
--- a/c/src/lib/libbsp/sparc/shared/uart/apbuart.c
+++ b/c/src/lib/libbsp/sparc/shared/uart/apbuart.c
@@ -158,7 +158,7 @@ static void apbuart_hw_open(apbuart_priv *uart);
#if 0
static int apbuart_outbyte_try(struct apbuart_regs *regs, unsigned char ch)
{
- if ( (READ_REG(&regs->status) & LEON_REG_UART_STATUS_THE) == 0 )
+ if ( (READ_REG(&regs->status) & APBUART_STATUS_TE) == 0 )
return -1; /* Failed */
/* There is room in fifo, put ch in it */
@@ -171,12 +171,12 @@ static int apbuart_inbyte_try(struct apbuart_regs *regs)
{
unsigned int status;
/* Clear errors if any */
- if ( (status=READ_REG(&regs->status)) & LEON_REG_UART_STATUS_ERR) {
- regs->status = status & ~LEON_REG_UART_STATUS_ERR;
+ if ( (status=READ_REG(&regs->status)) & APBUART_STATUS_ERR) {
+ regs->status = status & ~APBUART_STATUS_ERR;
}
/* Is Data available? */
- if ( (READ_REG(&regs->status) & LEON_REG_UART_STATUS_DR) == 0 )
+ if ( (READ_REG(&regs->status) & APBUART_STATUS_DR) == 0 )
return -1; /* No data avail */
/* Return Data */