Hi Viet Hoang and everyone,

Thank you for the so fast response  !

My turn to share something :)

I tried to program UART2 the same way, but i got some clocking issues.
Looking on the tms320dm355 shows that it was not on the same
cliockdomain as UART0 and UART1.

In fact, uart2 like usb is on clockdomain SYSCLK2, which is in my
configuration ruts at 108 Mhz
So i modified the uart2 click in board-dm355-evm.c:

.uartclk = 108000000,

Hope it would help someone.

Le mardi 16 septembre 2008 à 20:38 -0700, Viet Hoang a écrit :

> Hi Laurent and all,
>         Because many people have sent private mail to me to ask about
> using UART1 on DM355. I'd like to re-send the solution to the mailing
> list so that in the future, some one will easily find this.
>     Reagards,
>     Viet Hoang.
> 
>     In order to use UART1 on DM355:
> 1. Add some code to function board_init()
> ( arch/arm/mach-davinci/board-dm355-evm.c) as below:
> 
> static void board_init(void)
> {
>      volatile int *ptr_pgmgt,*ptr_ier;  //Added for UART1  
>   
>      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 UART1
>      board_setup_psc(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_UART1, 1);
>      davinci_serial_init(&serial_device);
>     
>      davinci_writel(0x56837210, DAVINCI_VPSS_REGS_BASE + 0x810);
>      davinci_writel(0x7b3c0004, DAVINCI_VPSS_REGS_BASE + 0x814);
>     
>      //Enable UART1
>      ptr_pgmgt        = (volatile int *)IO_ADDRESS(DAVINCI_UART1_BASE+0x30) ;
>      ptr_ier          = (volatile int *)IO_ADDRESS(DAVINCI_UART1_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 UART1
> }
> 
> 2. Rebuild the kernel, then you can use /dev/tts/0 or /dev/tts/1 for
> UART0 / UART1; Or you can use mknod to create /dev/ttyS1 for your
> UART1.
> 
> ############################
> 
> --- On Tue, 16/9/08, Laurent Meyer <[EMAIL PROTECTED]> wrote:
> 
>         From: Laurent Meyer <[EMAIL PROTECTED]>
>         Subject: uart1 on dm355
>         To: [EMAIL PROTECTED]
>         Date: Tuesday, 16 September, 2008, 10:57 PM
>         
>         
>         Hi,
>         
>         I saw on the mailling list that you had problems using uart1
>         and uart2 on dm355, i run in the same problem as you, did you
>         solve your problem ?
>         
>         Thanks.
>         -- 
>         Laurent MEYER.
>         Resp projets Borea SAS
>         Tél: +331 75 43 78 43
>         Email: [EMAIL PROTECTED]
> 
> 
> ______________________________________________________________________
> New Email names for you! 
> Get the Email name you've always wanted on the new @ymail and
> @rocketmail.
> Hurry before someone else does!

-- 
Laurent MEYER.
Resp projets Borea SAS
Tél: +331 75 43 78 43
Email: [EMAIL PROTECTED]
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to