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.

NO DATA SEND FROM UART2 DM355

Hello ,

I have problem with the UART 2 in DM355 .

I found a solution in this forum but  not work for me

when i do cat /proc/tty/driver/serial , i see that the number of tx increase but in the card there is no signal in the pin TXD2.

I use The kernel version is 2.6.10_mvl401 IPNCDM355  dvsdk_1_30_01_41

Any Idea !

Thank you

The solution that i found it :

File: arch/arm/mach-davinci/serial.c
static inline unsigned int davinci_serial_in(struct plat_serial8250_port *up,
                                             int offset)
{
        offset <<= up->regshift;
        return (unsigned int)__raw_readw(up->membase + offset);
}
static inline void davinci_serial_outp(struct plat_serial8250_port *p,
                                       int offset, int value)
{
        offset <<= p->regshift;
        __raw_writew(value, p->membase + offset);
}

In file arch/arm/mach-davinci/board-dm355-evm.c -
Adding to function "board_init()" those line:
static void board_init(void)
{
     volatile int *ptr_pgmgt,*ptr_ier;  //Added for UART1 , UART2
 
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VPSSMSTR, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VPSSSLV, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPCC, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPTC0, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPTC1, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_GPIO, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_McBSP1, 1);
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_SPI, 1);

     // Turn on WatchDog timer LPSC.  Needed for RESET to work
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TIMER2, 1);

      // Added for UART2
     board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_UART2, 1);
     davinci_serial_init(&serial_device);
   
     davinci_writel(0x56837210, DAVINCI_VPSS_REGS_BASE + 0x810);
     davinci_writel(0x7b3c0004, DAVINCI_VPSS_REGS_BASE + 0x814);
   
     //Enable UART2
     ptr_pgmgt        = (volatile int *)IO_ADDRESS(DM355_UART2_BASE+0x30) ;
     ptr_ier          = (volatile int *)IO_ADDRESS(DM355_UART2_BASE+0x4);
     *ptr_pgmgt       = 0x0; //reset tx and rx
     *ptr_ier         = 0x0; //disable int
     int del          = 0;

     for(del = 0; del < 100000 ; del++)    // For delay
         *ptr_pgmgt =0x6001;
   
     // Initialize the clock configurations
     davinci_clk_init();
     //End UART2