External serial 8250/16550
avictor.za at gmail.com
Tue Apr 26 12:39:01 EDT 2011
> I was called for help to add a external serial using a board based on
> | AT91_SMC_DBW_8
> | AT91_SMC_BAT
> | AT91_SMC_WSEN
> | AT91_SMC_NWS_(32) /* wait states */
> | AT91_SMC_RWSETUP_(6) /* setup time */
> | AT91_SMC_RWHOLD_(4) /* hold time */
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:
and declaring a "struct sam9_smc_config" with all the setting &
timings, and then calling:
> But doesn't work, how to map correctly external serial port?
If you specify UPF_IOREMAP in the "struct plat_serial8250_port" flags,
the serial-driver will automatically map the IO region for you.
> Is there any sample code for external uart using linux-2.6.36 and arm
Not for a SAM9-based board. But for an AT91RM9200 example, look at
board-tms.c in the AT91 patches on http://maxim.org.za/at91_26.html .
SAM9 should be the same, except for the SMC memory-controller
configuration (as described above).
More information about the linux-arm-kernel