linux-mips
[Top] [All Lists]

UART3 of DbAu1100

To: linux-mips@linux-mips.org
Subject: UART3 of DbAu1100
From: ichinoh@mb.neweb.ne.jp
Date: Tue, 14 Dec 2004 11:35:58 +0900
Cc: ichinoh@mb.neweb.ne.jp
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Hello,

I have a question about UART3 of DbAu1100.

After enabling UART3 then reboot the kernel, I cannot use UART3 port.
Did anyone encounter the same error ?
In addition, UART3 initialization processing is as follows.

static int serial_init (void)
{
        volatile u32 *uart_fifoctl = (volatile u32*)(UART3_ADDR+UART_FCR);
        volatile u32 *uart_enable = (volatile u32*)(UART3_ADDR+UART_ENABLE);
        volatile u32 *uart_mcr = (volatile u32*)(UART3_ADDR+UART_MCR);
        volatile u32 *sys_pinfunc = (volatile u32*)SYS_PINFUNC;

        /* reset UART0 module */
        au_writel(0x00, UART3_ADDR);
        au_sync( );

        /* Enable clocks first */
        *uart_enable = UART_EN_CE;

        /* Then release reset */
        /* Must release reset before setting other regs */
        *uart_enable = UART_EN_CE|UART_EN_E;

        /* Activate fifos, reset tx and rx */
        /* Set tx trigger level to 12 */
        *uart_fifoctl = UART_FCR_ENABLE_FIFO|UART_FCR_CLEAR_RCVR|             
        UART_FCR_CLEAR_XMIT|UART_FCR_T_TRIGGER_12|UART_FCR_R_TRIGGER_14; 

        serial_setbrg( );
        
        /* Set DTR */
        *uart_mcr = UART_MCR_DTR | UART_MCR_RTS;

        return 0;
}

static void serial_setbrg (void)
{
        volatile u32 *uart_clk = (volatile u32*)(UART3_ADDR+UART_CLK);
        volatile u32 *uart_lcr = (volatile u32*)(UART3_ADDR+UART_LCR);

        /* Set baudrate to 9600 */
        *uart_clk = 0x280;

        /* Set parity, stop bits and word length to 8N1 */
        *uart_lcr = UART_LCR_WLEN8;
        return ;
}

Best regards,
Nyauyama.


<Prev in Thread] Current Thread [Next in Thread>
  • UART3 of DbAu1100, ichinoh <=