This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DM814x IR issue/crash after init_cir

Hi all,

     I have a question about configure Uart to the SIR mode. I have used Base_Board\IRRemote project to test the IR feature on the EVM. It works well on the EVM. But there is a error when my customer porting these ccs source to the linux kernel. It can not configure correctly when run into the init_cir() function, almostly the A8 will crash after UART_rset(uart, DLL, 0x6B).  I wonder how to porting these to be linux dirver.

    Any comments are welcom.

/* ------------------------------------------------------------------------ *
 *  init_cir( )                                                             *
 * ------------------------------------------------------------------------ */
INT16 init_cir( )
{
 // Being Tested for using UART1 in UART mode
 
 UART_Handle uart = DM814x_UART1_BASE;
 UINT32 efr_val;
 
 /* Reset the UART from any previous state */
 /* Reset Sequence */
 UART_rset( uart, EFR, 0x10 );
 UART_rset( uart, IER_OFFSET, 0 );
 UART_rset( uart, MCR_OFFSET, 0 );
 UART_rset( uart, EFR, 0 );
 UART_rset( uart, LCR_OFFSET, 0 );
 
 UART_rset( uart, MDR1_OFFSET, 0x07 );
 
 efr_val = UART_rget(uart, EFR);
 UART_rset(uart, EFR, (efr_val | 0x10)); // Enable enhanced features, allow access to IER[4:7], FCR[4:5], MCR[5:7]
 UART_rset(uart, IER_OFFSET, 0x00); // Disable All Interrupts
 UART_rset(uart, FCR_OFFSET, 0x57);
 UART_rset(uart, LCR_OFFSET, 0x02);
 UART_rset(uart, MCR_OFFSET, 0x00); // No MODEM Configuration
 UART_rset(uart, EFR, efr_val); // Disable enhanced features, allow access to IER[4:7], FCR[4:5], MCR[5:7]
 
 UART_rset(uart, MDR1_OFFSET, 0x07); // Disable UART
 
 UART_rset(uart, DLL, 0x6B); // Configure the Baud Rate for Transfer
 UART_rset(uart, DLH, 0x0A);
 
 UART_rset(uart, MDR1_OFFSET, 0x00); // Select UART Mode
 
 return 0;
}