Line 333... |
Line 333... |
{
|
{
|
struct dev_16450 *uart = dat;
|
struct dev_16450 *uart = dat;
|
int retval;
|
int retval;
|
|
|
/* Schedule for later */
|
/* Schedule for later */
|
SCHED_ADD (uart_clock16, dat, runtime.sim.cycles + UART_CLOCK_DIVIDER);
|
SCHED_ADD (uart_clock16, dat, UART_CLOCK_DIVIDER);
|
|
|
/* If VAPI is not selected, UART communicates with two file streams;
|
/* If VAPI is not selected, UART communicates with two file streams;
|
if VAPI is selected, we use VAPI streams. */
|
if VAPI is selected, we use VAPI streams. */
|
/* if txfs is corrupted, skip this uart. */
|
/* if txfs is corrupted, skip this uart. */
|
if (!uart->vapi_id && !channel_ok(uart->channel)) return;
|
if (!uart->vapi_id && !channel_ok(uart->channel)) return;
|
Line 633... |
Line 633... |
|
|
uart->vapi_buf_head_ptr = 0;
|
uart->vapi_buf_head_ptr = 0;
|
uart->vapi_buf_tail_ptr = 0;
|
uart->vapi_buf_tail_ptr = 0;
|
memset(uart->vapi_buf, 0, sizeof(uart->vapi_buf));
|
memset(uart->vapi_buf, 0, sizeof(uart->vapi_buf));
|
|
|
SCHED_ADD (uart_clock16, dat, runtime.sim.cycles + UART_CLOCK_DIVIDER);
|
SCHED_ADD (uart_clock16, dat, UART_CLOCK_DIVIDER);
|
}
|
}
|
|
|
/* Print register values on stdout. */
|
/* Print register values on stdout. */
|
void uart_status(void *dat)
|
void uart_status(void *dat)
|
{
|
{
|