Ignore:
Timestamp:
Jul 13, 2015, 3:10:26 PM (9 years ago)
Author:
guerin
Message:

tty: always acknowledge TTY IRQ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_drivers/tty_driver.c

    r496 r604  
    6363    unsigned int cluster_xy = gpid >> P_WIDTH;
    6464
    65     // get TTY status
    66     unsigned int status = _tty_get_register( channel, TTY_STATUS );
    67 
    68     // check both TTY status and kernel buffer status:
    69     // does nothing if kernel buffer full or tty_buffer empty
    70     if ( ((status & 0x1) == 0) ||
    71          (_tty_rx_full[channel] != 0) )  return;
    72  
    7365    // reset WTI in XCU if WTI type
    7466    if ( irq_type == IRQ_TYPE_WTI )
     
    7870    }
    7971
    80     // transfer character to kernel buffer and acknowledge TTY IRQ 
     72    // transfer character to kernel buffer and acknowledge TTY IRQ
    8173    _tty_rx_buf[channel]  = _tty_get_register( channel, TTY_READ );
    8274
     75    // flush pending memory writes
     76    asm volatile( "sync" );
     77
    8378    // set kernel buffer status
    84     asm volatile( "sync" );
    8579    _tty_rx_full[channel] = 1;
    8680
Note: See TracChangeset for help on using the changeset viewer.