--- a/arch/arm/mach-at91/board-foxg20.c 2011-11-10 17:43:26.264928133 +0100 +++ b/arch/arm/mach-at91/board-foxg20.c 2011-11-26 00:35:36.025571017 +0100 @@ -88,11 +88,15 @@ static void __init foxg20_init_early(voi ATMEL_UART_CTS | ATMEL_UART_RTS); +#ifdef CONFIG_SAM9G20_UART4 /* USART4 on ttyS5. (Rx & Tx only) */ at91_register_uart(AT91SAM9260_ID_US4, 5, 0); +#endif +#ifdef CONFIG_SAM9G20_UART5 /* USART5 on ttyS6. (Rx & Tx only) */ at91_register_uart(AT91SAM9260_ID_US5, 6, 0); +#endif /* set serial console to ttyS0 (ie, DBGU) */ at91_set_serial_console(0); --- a/arch/arm/mach-at91/Kconfig 2011-11-10 19:20:40.153061249 +0100 +++ b/arch/arm/mach-at91/Kconfig 2011-11-28 16:43:51.024905442 +0100 @@ -507,6 +507,18 @@ endif +config SAM9G20_UART4 + bool "serial port UART4" + help + This will use PA30,31 and will probably be /dev/ttyS5 + +config SAM9G20_UART5 + bool "serial port UART5" + help + This will use PB12,13 and will probably be /dev/ttyS6 if + SAM9G20_UART4 selected, otherwise it will probably + be /dev/ttyS5 + endif choice