Enabling Interrupts for uart - Xavier agx

Hello boreddybharath20,

By default we are using interrupts to handle UART rx/tx data in linux.
You can check tegra_uart_hw_init function in serial-tegra driver, where we are enabling RX interrupts by writing into the IER (Interrupt enable) register:

    /*
     * Enable IE_RXS for the receive status interrupts like line errros.
     * Enable IE_RX_TIMEOUT to get the bytes which cannot be DMA'd.
     *
     * If using DMA mode, enable EORD instead of receive interrupt which
     * will interrupt after the UART is done with the receive instead of
     * the interrupt when the FIFO "threshold" is reached.
     *
     * EORD is different interrupt than RX_TIMEOUT - RX_TIMEOUT occurs when
     * the DATA is sitting in the FIFO and couldn't be transferred to the
     * DMA as the DMA size alignment(4 bytes) is not met. EORD will be
     * triggered when there is a pause of the incomming data stream for 4
     * characters long.
     *
     * For pauses in the data which is not aligned to 4 bytes, we get
     * both the EORD as well as RX_TIMEOUT - SW sees RX_TIMEOUT first
     * then the EORD.
     */
    if (!tup->use_rx_pio)
            tup->ier_shadow = UART_IER_RLSI | UART_IER_RTOIE |
                    TEGRA_UART_IER_EORD;
    else
            tup->ier_shadow = UART_IER_RLSI | UART_IER_RTOIE | UART_IER_RDI;

Then, whenever data is received. The UART driver calls the registered interrupt handler for serial-tegra driver i.e. tegra_uart_isr function.
In tegra_uart_isr we check IIR (Interrupt Identification Register) and if it is a RX interrupt we process the data.