#include <common.h>
#include <asm/io.h>
#include <ambapp.h>
+#include <grlib/apbuart.h>
#include <serial.h>
#include <watchdog.h>
writel(tmp, &uart->scaler);
/* Let bit 11 be unchanged (debug bit for GRMON) */
- tmp = readl(&uart->ctrl) & LEON_REG_UART_CTRL_DBG;
+ tmp = readl(&uart->ctrl) & APBUART_CTRL_DBG;
/* Receiver & transmitter enable */
- tmp |= LEON_REG_UART_CTRL_RE | LEON_REG_UART_CTRL_TE;
+ tmp |= APBUART_CTRL_RE | APBUART_CTRL_TE;
writel(tmp, &uart->ctrl);
gd->arch.uart = uart;
return;
/* Wait for last character to go. */
- while (!(readl(&uart->status) & LEON_REG_UART_STATUS_THE))
+ while (!(readl(&uart->status) & APBUART_STATUS_THE))
WATCHDOG_RESET();
/* Send data */
#ifdef LEON_DEBUG
/* Wait for data to be sent */
- while (!(readl(&uart->status) & LEON_REG_UART_STATUS_TSE))
+ while (!(readl(&uart->status) & APBUART_STATUS_TSE))
WATCHDOG_RESET();
#endif
}
return 0;
/* Wait for a character to arrive. */
- while (!(readl(&uart->status) & LEON_REG_UART_STATUS_DR))
+ while (!(readl(&uart->status) & APBUART_STATUS_DR))
WATCHDOG_RESET();
/* Read character data */
if (!uart)
return 0;
- return readl(&uart->status) & LEON_REG_UART_STATUS_DR;
+ return readl(&uart->status) & APBUART_STATUS_DR;
}
/* set baud rate for uart */