From mboxrd@z Thu Jan 1 00:00:00 1970 From: paulo@nlink.com.br (Paulo Fragoso) Date: Wed, 11 May 2011 23:23:24 -0300 Subject: External serial 8250/16550 In-Reply-To: <4DC8AFF9.9030508@nlink.com.br> References: <4DB44883.3000608@nlink.com.br> <4DC3F035.9030208@nlink.com.br> <4DC8AFF9.9030508@nlink.com.br> Message-ID: <4DCB449C.8060808@nlink.com.br> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 10-05-2011 00:24, Paulo Fragoso wrote: > > > On 06-05-2011 09:57, Paulo Fragoso wrote: >> Em 26/04/2011 13:39, Andrew Victor escreveu: >> >>> >>> Those AT91_SMC registers and bits only exist on the AT91RM9200, >>> whereas you're using a SAM9-based processor. >>> >>> You should be configuring the memory controller by: >>> #include >>> #include "sam9_smc.h" >>> >>> and declaring a "struct sam9_smc_config" with all the setting& >> >> I changed the code following TL16C2550 datasheet and now I am using >> correct registers for AT91sam: >> >> static struct sam9_smc_config tms_uart_smc_config = { >> .ncs_read_setup = 0, >> .nrd_setup = 2, >> .ncs_write_setup = 0, >> .nwe_setup = 2, >> >> .ncs_read_pulse = 5, >> .nrd_pulse = 4, >> .ncs_write_pulse = 4, >> .nwe_pulse = 3, >> >> .read_cycle = 10, >> .write_cycle = 9, >> >> .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | >> AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8 | AT91_SMC_BAT_WRITE, >> .tdf_cycles = 3, >> }; >> I have one doubt about new-style UART initialization, how can I initialize a board using AT91sam9 with two internal USART and two external 8250 UART at same time? For example: /* DGBU on ttyS0. (Rx & Tx only) */ at91_register_uart(0, 0, 0); /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ at91_register_uart(AT91SAM9G45_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); If I wish to put two more 8250 external serial in sequence (ttyS3 and ttyS4) which ID will be used at at91_register_uart function? Looking at91_register_uart function all structs pdev are defined internaly, how I will define serila8250 platform_device and pass at at91_register_uart function? Paulo.