From: Anders Blomdell <anders.blomdell@control.lth.se>
To: hskinnemoen@atmel.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Make ATNGW100 serial ports configurable
Date: Fri, 10 Oct 2008 16:32:02 +0200 [thread overview]
Message-ID: <48EF6762.2080205@control.lth.se> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: atngw100_serial.patch --]
[-- Type: text/plain, Size: 2610 bytes --]
Make configuration of ATNGW100 serial ports selectable in kernel configuration.
Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
diff -urb orig/arch/avr32/boards/atngw100/Kconfig linux-2.6.27-rc6/arch/avr32/boards/atngw100/Kconfig
--- orig/arch/avr32/boards/atngw100/Kconfig 2008-10-09 17:56:14.000000000 +0200
+++ linux-2.6.27-rc6/arch/avr32/boards/atngw100/Kconfig 2008-10-09 16:26:08.000000000 +0200
@@ -0,0 +1,18 @@
+config SERIAL_ATMEL_USART0
+ bool "Enable USART0"
+ depends on SERIAL_ATMEL
+ help
+ Enable USART0 (on expansion header J5, pins 12, 11)
+
+config SERIAL_ATMEL_USART2
+ bool "Enable USART2"
+ depends on SERIAL_ATMEL
+ help
+ Enable USART2 (on expansion header J6, pins 27, 26)
+
+config SERIAL_ATMEL_USART3
+ bool "Enable USART3"
+ depends on SERIAL_ATMEL
+ help
+ Enable USART3 (on expansion header J6, pins 17, 18)
+
diff -urb orig/arch/avr32/boards/atngw100/setup.c linux-2.6.27-rc6/arch/avr32/boards/atngw100/setup.c
--- orig/arch/avr32/boards/atngw100/setup.c 2008-10-09 17:54:55.000000000 +0200
+++ linux-2.6.27-rc6/arch/avr32/boards/atngw100/setup.c 2008-10-09 16:33:50.000000000 +0200
@@ -114,8 +114,20 @@
void __init setup_board(void)
{
- at32_map_usart(1, 0); /* USART 1: /dev/ttyS0, DB9 */
+ int i = 0;
+
+ at32_map_usart(1, i++); /* USART 1: /dev/ttyS0, DB9 */
at32_setup_serial_console(0);
+
+#ifdef CONFIG_SERIAL_ATMEL_USART0
+ at32_map_usart(0, i++); /* USART 0: /dev/ttySX, J5, pins 12, 11 */
+#endif
+#ifdef CONFIG_SERIAL_ATMEL_USART2
+ at32_map_usart(2, i++); /* USART 2: /dev/ttySX, J6, pins 27, 26 */
+#endif
+#ifdef CONFIG_SERIAL_ATMEL_USART3
+ at32_map_usart(3, i++); /* USART 3: /dev/ttySX, J6, pins 17, 18 */
+#endif
}
static const struct gpio_led ngw_leds[] = {
@@ -170,7 +182,17 @@
at32_add_system_devices();
- at32_add_device_usart(0);
+ i = 0;
+ at32_add_device_usart(i++);
+#ifdef CONFIG_SERIAL_ATMEL_USART0
+ at32_add_device_usart(i++);
+#endif
+#ifdef CONFIG_SERIAL_ATMEL_USART2
+ at32_add_device_usart(i++);
+#endif
+#ifdef CONFIG_SERIAL_ATMEL_USART3
+ at32_add_device_usart(i++);
+#endif
set_hw_addr(at32_add_device_eth(0, ð_data[0]));
set_hw_addr(at32_add_device_eth(1, ð_data[1]));
diff -urb orig/arch/avr32/Kconfig linux-2.6.27-rc6/arch/avr32/Kconfig
--- orig/arch/avr32/Kconfig 2008-10-09 17:54:55.000000000 +0200
+++ linux-2.6.27-rc6/arch/avr32/Kconfig 2008-10-09 16:21:49.000000000 +0200
@@ -125,6 +125,10 @@
source "arch/avr32/boards/atstk1000/Kconfig"
endif
+if BOARD_ATNGW100
+source "arch/avr32/boards/atngw100/Kconfig"
+endif
+
choice
prompt "Boot loader type"
default LOADER_U_BOOT
next reply other threads:[~2008-10-10 14:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 14:32 Anders Blomdell [this message]
2008-10-10 14:58 ` [PATCH] Make ATNGW100 serial ports configurable Haavard Skinnemoen
2008-10-10 15:48 ` Anders Blomdell
2008-10-13 10:27 ` Haavard Skinnemoen
2008-10-13 10:53 ` Anders Blomdell
2008-10-13 12:34 ` Haavard Skinnemoen
2008-10-13 13:03 ` Anders Blomdell
2008-10-13 13:33 ` Haavard Skinnemoen
2008-10-13 14:46 ` Anders Blomdell
2008-10-13 15:28 ` Haavard Skinnemoen
[not found] ` <48F37707.8040401@control.lth.se>
[not found] ` <20081013191534.7cbeebc1@hskinnemo-gx745.norway.atmel.com>
2008-10-13 18:08 ` Anders Blomdell
2008-10-13 21:23 ` Haavard Skinnemoen
2008-10-14 7:23 ` Anders Blomdell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48EF6762.2080205@control.lth.se \
--to=anders.blomdell@control.lth.se \
--cc=hskinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox