External serial 8250/16550

Paulo Fragoso paulo at nlink.com.br
Wed May 11 22:23:24 EDT 2011


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<mach/at91sam9_smc.h>
>>> #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.



More information about the linux-arm-kernel mailing list