public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/4] am335x_evm: Enable UART{1,2,3,4,5}
@ 2012-10-24 20:22 Andrew Bradford
  2012-10-24 20:22 ` [U-Boot] [PATCH v3 1/4] am33xx: Enable UART{1,2,3,4,5} clocks Andrew Bradford
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Andrew Bradford @ 2012-10-24 20:22 UTC (permalink / raw)
  To: u-boot

To support serial ports other than UART0 on am335x based systems like
the Beaglebone with the RS232 cape and am335x_evm with daughterboard.

Changes from v2:
	Patch 4/4 cleaned up to define CONS_INDEX and SERIALX in the
	target options.

Changes from v1:
	Reduced from 6 patches to 4.
	Reworked on Marek Vasut's serial changes.
	Added UART3 for am335x_evm profile 5.

Andrew Bradford (4):
  am33xx: Enable UART{1,2,3,4,5} clocks
  am33xx: Enable UART{1,2,3,4,5} pin-mux
  serial: ns16550: Enable COM5 and COM6
  am335x_evm: Enable use of UART{1,2,3,4,5}

 arch/arm/cpu/armv7/am33xx/board.c            |   17 ++++++++
 arch/arm/cpu/armv7/am33xx/clock.c            |   35 +++++++++++++++++
 arch/arm/include/asm/arch-am33xx/sys_proto.h |    7 +++-
 board/ti/am335x/mux.c                        |   54 ++++++++++++++++++++++++++
 boards.cfg                                   |    5 +++
 drivers/serial/serial_ns16550.c              |   36 +++++++++++++++--
 include/configs/am335x_evm.h                 |   12 +++++-
 7 files changed, 161 insertions(+), 5 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v3 1/4] am33xx: Enable UART{1,2,3,4,5} clocks
  2012-10-24 20:22 [U-Boot] [PATCH v3 0/4] am335x_evm: Enable UART{1,2,3,4,5} Andrew Bradford
@ 2012-10-24 20:22 ` Andrew Bradford
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 2/4] am33xx: Enable UART{1,2,3,4,5} pin-mux Andrew Bradford
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Andrew Bradford @ 2012-10-24 20:22 UTC (permalink / raw)
  To: u-boot

If configured to use UART{1,2,3,4,5} such as on the Beaglebone RS232
cape or the am335x_evm daughterboard, enable the required clocks for
the UART in use.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
---
Changes from v2:
	No changes
Changes from v1:
	Also enable UART3 clocks

 arch/arm/cpu/armv7/am33xx/clock.c |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/cpu/armv7/am33xx/clock.c b/arch/arm/cpu/armv7/am33xx/clock.c
index 2b19506..b34f969 100644
--- a/arch/arm/cpu/armv7/am33xx/clock.c
+++ b/arch/arm/cpu/armv7/am33xx/clock.c
@@ -114,6 +114,41 @@ static void enable_per_clocks(void)
 	while (readl(&cmwkup->wkup_uart0ctrl) != PRCM_MOD_EN)
 		;
 
+	/* UART1 */
+#ifdef CONFIG_SERIAL2
+	writel(PRCM_MOD_EN, &cmper->uart1clkctrl);
+	while (readl(&cmper->uart1clkctrl) != PRCM_MOD_EN)
+		;
+#endif /* CONFIG_SERIAL2 */
+
+	/* UART2 */
+#ifdef CONFIG_SERIAL3
+	writel(PRCM_MOD_EN, &cmper->uart2clkctrl);
+	while (readl(&cmper->uart2clkctrl) != PRCM_MOD_EN)
+		;
+#endif /* CONFIG_SERIAL3 */
+
+	/* UART3 */
+#ifdef CONFIG_SERIAL4
+	writel(PRCM_MOD_EN, &cmper->uart3clkctrl);
+	while (readl(&cmper->uart3clkctrl) != PRCM_MOD_EN)
+		;
+#endif /* CONFIG_SERIAL4 */
+
+	/* UART4 */
+#ifdef CONFIG_SERIAL5
+	writel(PRCM_MOD_EN, &cmper->uart4clkctrl);
+	while (readl(&cmper->uart4clkctrl) != PRCM_MOD_EN)
+		;
+#endif /* CONFIG_SERIAL5 */
+
+	/* UART5 */
+#ifdef CONFIG_SERIAL6
+	writel(PRCM_MOD_EN, &cmper->uart5clkctrl);
+	while (readl(&cmper->uart5clkctrl) != PRCM_MOD_EN)
+		;
+#endif /* CONFIG_SERIAL6 */
+
 	/* MMC0*/
 	writel(PRCM_MOD_EN, &cmper->mmc0clkctrl);
 	while (readl(&cmper->mmc0clkctrl) != PRCM_MOD_EN)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v3 2/4] am33xx: Enable UART{1,2,3,4,5} pin-mux
  2012-10-24 20:22 [U-Boot] [PATCH v3 0/4] am335x_evm: Enable UART{1,2,3,4,5} Andrew Bradford
  2012-10-24 20:22 ` [U-Boot] [PATCH v3 1/4] am33xx: Enable UART{1,2,3,4,5} clocks Andrew Bradford
@ 2012-10-24 20:23 ` Andrew Bradford
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 3/4] serial: ns16550: Enable COM5 and COM6 Andrew Bradford
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1,2,3,4,5} Andrew Bradford
  3 siblings, 0 replies; 7+ messages in thread
From: Andrew Bradford @ 2012-10-24 20:23 UTC (permalink / raw)
  To: u-boot

If configured to use UART{1,2,3,4,5} such as on the Beaglebone RS232
cape or on the am335x_evm daughterboard, enable the proper pin-muxing.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
---
Changes from v2:
	No changes
Changes from v1:
	Also enable UART3 pin mux	

 arch/arm/cpu/armv7/am33xx/board.c            |   17 ++++++++
 arch/arm/include/asm/arch-am33xx/sys_proto.h |    7 +++-
 board/ti/am335x/mux.c                        |   54 ++++++++++++++++++++++++++
 3 files changed, 77 insertions(+), 1 deletion(-)

diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c
index 978b184..e324265 100644
--- a/arch/arm/cpu/armv7/am33xx/board.c
+++ b/arch/arm/cpu/armv7/am33xx/board.c
@@ -152,7 +152,24 @@ void s_init(void)
 	/* UART softreset */
 	u32 regVal;
 
+#ifdef CONFIG_SERIAL1
 	enable_uart0_pin_mux();
+#endif /* CONFIG_SERIAL1 */
+#ifdef CONFIG_SERIAL2
+	enable_uart1_pin_mux();
+#endif /* CONFIG_SERIAL2 */
+#ifdef CONFIG_SERIAL3
+	enable_uart2_pin_mux();
+#endif /* CONFIG_SERIAL3 */
+#ifdef CONFIG_SERIAL4
+	enable_uart3_pin_mux();
+#endif /* CONFIG_SERIAL4 */
+#ifdef CONFIG_SERIAL5
+	enable_uart4_pin_mux();
+#endif /* CONFIG_SERIAL5 */
+#ifdef CONFIG_SERIAL6
+	enable_uart5_pin_mux();
+#endif /* CONFIG_SERIAL6 */
 
 	regVal = readl(&uart_base->uartsyscfg);
 	regVal |= UART_RESET;
diff --git a/arch/arm/include/asm/arch-am33xx/sys_proto.h b/arch/arm/include/asm/arch-am33xx/sys_proto.h
index 819ea65..3ef1ff2 100644
--- a/arch/arm/include/asm/arch-am33xx/sys_proto.h
+++ b/arch/arm/include/asm/arch-am33xx/sys_proto.h
@@ -53,11 +53,16 @@ void ddr_pll_config(unsigned int ddrpll_M);
 
 /*
  * We have three pin mux functions that must exist.  We must be able to enable
- * uart0, for initial output and i2c0 to read the main EEPROM.  We then have a
+ * a uart for initial output and i2c0 to read the main EEPROM.  We then have a
  * main pinmux function that can be overridden to enable all other pinmux that
  * is required on the board.
  */
 void enable_uart0_pin_mux(void);
+void enable_uart1_pin_mux(void);
+void enable_uart2_pin_mux(void);
+void enable_uart3_pin_mux(void);
+void enable_uart4_pin_mux(void);
+void enable_uart5_pin_mux(void);
 void enable_i2c0_pin_mux(void);
 void enable_board_pin_mux(struct am335x_baseboard_id *header);
 #endif
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index 80becd5..82b5852 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -259,6 +259,36 @@ static struct module_pin_mux uart0_pin_mux[] = {
 	{-1},
 };
 
+static struct module_pin_mux uart1_pin_mux[] = {
+	{OFFSET(uart1_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)},	/* UART1_RXD */
+	{OFFSET(uart1_txd), (MODE(0) | PULLUDEN)},		/* UART1_TXD */
+	{-1},
+};
+
+static struct module_pin_mux uart2_pin_mux[] = {
+	{OFFSET(spi0_sclk), (MODE(1) | PULLUP_EN | RXACTIVE)},	/* UART2_RXD */
+	{OFFSET(spi0_d0), (MODE(1) | PULLUDEN)},		/* UART2_TXD */
+	{-1},
+};
+
+static struct module_pin_mux uart3_pin_mux[] = {
+	{OFFSET(spi0_cs1), (MODE(1) | PULLUP_EN | RXACTIVE)},	/* UART3_RXD */
+	{OFFSET(ecap0_in_pwm0_out), (MODE(1) | PULLUDEN)},	/* UART3_TXD */
+	{-1},
+};
+
+static struct module_pin_mux uart4_pin_mux[] = {
+	{OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE)},	/* UART4_RXD */
+	{OFFSET(gpmc_wpn), (MODE(6) | PULLUDEN)},		/* UART4_TXD */
+	{-1},
+};
+
+static struct module_pin_mux uart5_pin_mux[] = {
+	{OFFSET(lcd_data9), (MODE(4) | PULLUP_EN | RXACTIVE)},	/* UART5_RXD */
+	{OFFSET(lcd_data8), (MODE(4) | PULLUDEN)},		/* UART5_TXD */
+	{-1},
+};
+
 static struct module_pin_mux mmc0_pin_mux[] = {
 	{OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT3 */
 	{OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_DAT2 */
@@ -381,6 +411,30 @@ void enable_uart0_pin_mux(void)
 	configure_module_pin_mux(uart0_pin_mux);
 }
 
+void enable_uart1_pin_mux(void)
+{
+	configure_module_pin_mux(uart1_pin_mux);
+}
+
+void enable_uart2_pin_mux(void)
+{
+	configure_module_pin_mux(uart2_pin_mux);
+}
+
+void enable_uart3_pin_mux(void)
+{
+	configure_module_pin_mux(uart3_pin_mux);
+}
+
+void enable_uart4_pin_mux(void)
+{
+	configure_module_pin_mux(uart4_pin_mux);
+}
+
+void enable_uart5_pin_mux(void)
+{
+	configure_module_pin_mux(uart5_pin_mux);
+}
 
 void enable_i2c0_pin_mux(void)
 {
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v3 3/4] serial: ns16550: Enable COM5 and COM6
  2012-10-24 20:22 [U-Boot] [PATCH v3 0/4] am335x_evm: Enable UART{1,2,3,4,5} Andrew Bradford
  2012-10-24 20:22 ` [U-Boot] [PATCH v3 1/4] am33xx: Enable UART{1,2,3,4,5} clocks Andrew Bradford
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 2/4] am33xx: Enable UART{1,2,3,4,5} pin-mux Andrew Bradford
@ 2012-10-24 20:23 ` Andrew Bradford
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1,2,3,4,5} Andrew Bradford
  3 siblings, 0 replies; 7+ messages in thread
From: Andrew Bradford @ 2012-10-24 20:23 UTC (permalink / raw)
  To: u-boot

Increase the possible number of ns16550 serial devices from 4 to 6.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
---
Changes from v2:
	No changes
Changes from v1:
	Consolidation of patches 3, 4, and 5 on top of Marek Vasut's
	recent serial changes.

 drivers/serial/serial_ns16550.c |   36 +++++++++++++++++++++++++++++++++---
 1 file changed, 33 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index b5d1248..5fb3841 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -34,7 +34,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #if !defined(CONFIG_CONS_INDEX)
-#elif (CONFIG_CONS_INDEX < 1) || (CONFIG_CONS_INDEX > 4)
+#elif (CONFIG_CONS_INDEX < 1) || (CONFIG_CONS_INDEX > 6)
 #error	"Invalid console index value."
 #endif
 
@@ -46,12 +46,16 @@ DECLARE_GLOBAL_DATA_PTR;
 #error	"Console port 3 defined but not configured."
 #elif CONFIG_CONS_INDEX == 4 && !defined(CONFIG_SYS_NS16550_COM4)
 #error	"Console port 4 defined but not configured."
+#elif CONFIG_CONS_INDEX == 5 && !defined(CONFIG_SYS_NS16550_COM5)
+#error	"Console port 5 defined but not configured."
+#elif CONFIG_CONS_INDEX == 6 && !defined(CONFIG_SYS_NS16550_COM6)
+#error	"Console port 6 defined but not configured."
 #endif
 
 /* Note: The port number specified in the functions is 1 based.
  *	 the array is 0 based.
  */
-static NS16550_t serial_ports[4] = {
+static NS16550_t serial_ports[6] = {
 #ifdef CONFIG_SYS_NS16550_COM1
 	(NS16550_t)CONFIG_SYS_NS16550_COM1,
 #else
@@ -68,7 +72,17 @@ static NS16550_t serial_ports[4] = {
 	NULL,
 #endif
 #ifdef CONFIG_SYS_NS16550_COM4
-	(NS16550_t)CONFIG_SYS_NS16550_COM4
+	(NS16550_t)CONFIG_SYS_NS16550_COM4,
+#else
+	NULL,
+#endif
+#ifdef CONFIG_SYS_NS16550_COM5
+	(NS16550_t)CONFIG_SYS_NS16550_COM5,
+#else
+	NULL,
+#endif
+#ifdef CONFIG_SYS_NS16550_COM6
+	(NS16550_t)CONFIG_SYS_NS16550_COM6
 #else
 	NULL
 #endif
@@ -231,6 +245,12 @@ struct serial_device eserial3_device =
 DECLARE_ESERIAL_FUNCTIONS(4);
 struct serial_device eserial4_device =
 	INIT_ESERIAL_STRUCTURE(4, "eserial3");
+DECLARE_ESERIAL_FUNCTIONS(5);
+struct serial_device eserial5_device =
+	INIT_ESERIAL_STRUCTURE(5, "eserial4");
+DECLARE_ESERIAL_FUNCTIONS(6);
+struct serial_device eserial6_device =
+	INIT_ESERIAL_STRUCTURE(6, "eserial5");
 
 __weak struct serial_device *default_serial_console(void)
 {
@@ -242,6 +262,10 @@ __weak struct serial_device *default_serial_console(void)
 	return &eserial3_device;
 #elif CONFIG_CONS_INDEX == 4
 	return &eserial4_device;
+#elif CONFIG_CONS_INDEX == 5
+	return &eserial5_device;
+#elif CONFIG_CONS_INDEX == 6
+	return &eserial6_device;
 #else
 #error "Bad CONFIG_CONS_INDEX."
 #endif
@@ -261,4 +285,10 @@ void ns16550_serial_initialize(void)
 #if defined(CONFIG_SYS_NS16550_COM4)
 	serial_register(&eserial4_device);
 #endif
+#if defined(CONFIG_SYS_NS16550_COM5)
+	serial_register(&eserial5_device);
+#endif
+#if defined(CONFIG_SYS_NS16550_COM6)
+	serial_register(&eserial6_device);
+#endif
 }
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1,2,3,4,5}
  2012-10-24 20:22 [U-Boot] [PATCH v3 0/4] am335x_evm: Enable UART{1,2,3,4,5} Andrew Bradford
                   ` (2 preceding siblings ...)
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 3/4] serial: ns16550: Enable COM5 and COM6 Andrew Bradford
@ 2012-10-24 20:23 ` Andrew Bradford
  2012-10-24 20:39   ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1, 2, 3, 4, 5} Tom Rini
  3 siblings, 1 reply; 7+ messages in thread
From: Andrew Bradford @ 2012-10-24 20:23 UTC (permalink / raw)
  To: u-boot

Add targets of am335x_evm_uart{1,2,3,4,5} to have serial input/output on
UART{1,2,3,4,5} for use with the Beaglebone RS232 cape, am335x_evm
daughterboard, and other custom configurations.

Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
---
Changes from v2:
	Set CONS_INDEX and SERIALX in the target options instead of
	using AM33XX_UART_SELECT resulting in an easier to read config.
Changes from v1:
	Add UART3 target and register location

 boards.cfg                   |    5 +++++
 include/configs/am335x_evm.h |   12 +++++++++++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/boards.cfg b/boards.cfg
index b14a08f..0024033 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -226,6 +226,11 @@ integratorap_cm946es         arm         arm946es    integrator          armltd
 integratorcp_cm946es         arm         arm946es    integrator          armltd         -               integratorcp:CM946ES
 ca9x4_ct_vxp                 arm         armv7       vexpress            armltd
 am335x_evm                   arm         armv7       am335x              ti             am33xx
+am335x_evm_uart1             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL2=1,CONS_INDEX=2
+am335x_evm_uart2             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL3=1,CONS_INDEX=3
+am335x_evm_uart3             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL4=1,CONS_INDEX=4
+am335x_evm_uart4             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL5=1,CONS_INDEX=5
+am335x_evm_uart5             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL6=1,CONS_INDEX=6
 highbank                     arm         armv7       highbank            -              highbank
 mx51_efikamx                 arm         armv7       mx51_efikamx        genesi         mx5		mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKAMX,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_mx.cfg
 mx51_efikasb                 arm         armv7       mx51_efikamx        genesi         mx5		mx51_efikamx:MACH_TYPE=MACH_TYPE_MX51_EFIKASB,IMX_CONFIG=board/genesi/mx51_efikamx/imximage_sb.cfg
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 339d4bd..b2df711 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -158,9 +158,15 @@
 /* NS16550 Configuration */
 #define CONFIG_SYS_NS16550
 #define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SERIAL_MULTI
 #define CONFIG_SYS_NS16550_REG_SIZE	(-4)
 #define CONFIG_SYS_NS16550_CLK		(48000000)
 #define CONFIG_SYS_NS16550_COM1		0x44e09000	/* Base EVM has UART0 */
+#define CONFIG_SYS_NS16550_COM2		0x48022000	/* UART1 */
+#define CONFIG_SYS_NS16550_COM3		0x48024000	/* UART2 */
+#define CONFIG_SYS_NS16550_COM4		0x481a6000	/* UART3 */
+#define CONFIG_SYS_NS16550_COM5		0x481a8000	/* UART4 */
+#define CONFIG_SYS_NS16550_COM6		0x481aa000	/* UART5 */
 
 /* I2C Configuration */
 #define CONFIG_I2C
@@ -182,11 +188,15 @@
 #define CONFIG_SYS_BAUDRATE_TABLE	{ 110, 300, 600, 1200, 2400, \
 4800, 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200 }
 
+#define CONFIG_ENV_OVERWRITE		1
+
 /*
- * select serial console configuration
+ * select serial console configuration, uart0 always enabled
  */
 #define CONFIG_SERIAL1			1
+#ifndef CONFIG_CONS_INDEX
 #define CONFIG_CONS_INDEX		1
+#endif /* CONFIG_CONS_INDEX */
 #define CONFIG_SYS_CONSOLE_INFO_QUIET
 
 #define CONFIG_ENV_IS_NOWHERE
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1, 2, 3, 4, 5}
  2012-10-24 20:23 ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1,2,3,4,5} Andrew Bradford
@ 2012-10-24 20:39   ` Tom Rini
  2012-10-24 21:07     ` Andrew Bradford
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2012-10-24 20:39 UTC (permalink / raw)
  To: u-boot

On Wed, Oct 24, 2012 at 04:23:02PM -0400, Andrew Bradford wrote:

> Add targets of am335x_evm_uart{1,2,3,4,5} to have serial input/output on
> UART{1,2,3,4,5} for use with the Beaglebone RS232 cape, am335x_evm
> daughterboard, and other custom configurations.
> 
> Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
> ---
> Changes from v2:
> 	Set CONS_INDEX and SERIALX in the target options instead of
> 	using AM33XX_UART_SELECT resulting in an easier to read config.
> Changes from v1:
> 	Add UART3 target and register location
> 
>  boards.cfg                   |    5 +++++
>  include/configs/am335x_evm.h |   12 +++++++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/boards.cfg b/boards.cfg
> index b14a08f..0024033 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -226,6 +226,11 @@ integratorap_cm946es         arm         arm946es    integrator          armltd
>  integratorcp_cm946es         arm         arm946es    integrator          armltd         -               integratorcp:CM946ES
>  ca9x4_ct_vxp                 arm         armv7       vexpress            armltd
>  am335x_evm                   arm         armv7       am335x              ti             am33xx
> +am335x_evm_uart1             arm         armv7       am335x              ti             am33xx      am335x_evm:SERIAL2=1,CONS_INDEX=2

This could just be am335x_evm:SERIAL2,CONS_INDEX=2 right?  We don't
check the value of CONFIG_SERIAL2 (or 3 or ..) just tha it's set,
correct?

[snip]
>  /*
> - * select serial console configuration
> + * select serial console configuration, uart0 always enabled
>   */
>  #define CONFIG_SERIAL1			1
> +#ifndef CONFIG_CONS_INDEX
>  #define CONFIG_CONS_INDEX		1
> +#endif /* CONFIG_CONS_INDEX */

Just amke CONS_INDEX=1 be the default in boards.cfg.  Makes it clear all
around when folks add new config targets they must set that.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121024/43d3d374/attachment.pgp>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1, 2, 3, 4, 5}
  2012-10-24 20:39   ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1, 2, 3, 4, 5} Tom Rini
@ 2012-10-24 21:07     ` Andrew Bradford
  0 siblings, 0 replies; 7+ messages in thread
From: Andrew Bradford @ 2012-10-24 21:07 UTC (permalink / raw)
  To: u-boot

On Wed, 24 Oct 2012 13:39:06 -0700
Tom Rini <trini@ti.com> wrote:

> On Wed, Oct 24, 2012 at 04:23:02PM -0400, Andrew Bradford wrote:
> 
> > Add targets of am335x_evm_uart{1,2,3,4,5} to have serial
> > input/output on UART{1,2,3,4,5} for use with the Beaglebone RS232
> > cape, am335x_evm daughterboard, and other custom configurations.
> > 
> > Signed-off-by: Andrew Bradford <andrew@bradfordembedded.com>
> > ---
> > Changes from v2:
> > 	Set CONS_INDEX and SERIALX in the target options instead of
> > 	using AM33XX_UART_SELECT resulting in an easier to read
> > config. Changes from v1:
> > 	Add UART3 target and register location
> > 
> >  boards.cfg                   |    5 +++++
> >  include/configs/am335x_evm.h |   12 +++++++++++-
> >  2 files changed, 16 insertions(+), 1 deletion(-)
> > 
> > diff --git a/boards.cfg b/boards.cfg
> > index b14a08f..0024033 100644
> > --- a/boards.cfg
> > +++ b/boards.cfg
> > @@ -226,6 +226,11 @@ integratorap_cm946es         arm
> > arm946es    integrator          armltd integratorcp_cm946es
> > arm         arm946es    integrator          armltd
> > -               integratorcp:CM946ES ca9x4_ct_vxp
> > arm         armv7       vexpress            armltd
> > am335x_evm                   arm         armv7
> > am335x              ti             am33xx
> > +am335x_evm_uart1             arm         armv7
> > am335x              ti             am33xx
> > am335x_evm:SERIAL2=1,CONS_INDEX=2
> 
> This could just be am335x_evm:SERIAL2,CONS_INDEX=2 right?

Right.

> We don't
> check the value of CONFIG_SERIAL2 (or 3 or ..) just tha it's set,
> correct?

Correct.

> [snip]
> >  /*
> > - * select serial console configuration
> > + * select serial console configuration, uart0 always enabled
> >   */
> >  #define CONFIG_SERIAL1			1
> > +#ifndef CONFIG_CONS_INDEX
> >  #define CONFIG_CONS_INDEX		1
> > +#endif /* CONFIG_CONS_INDEX */
> 
> Just amke CONS_INDEX=1 be the default in boards.cfg.  Makes it clear
> all around when folks add new config targets they must set that.

Will do.

v4 coming.

Thanks,
Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-24 21:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-24 20:22 [U-Boot] [PATCH v3 0/4] am335x_evm: Enable UART{1,2,3,4,5} Andrew Bradford
2012-10-24 20:22 ` [U-Boot] [PATCH v3 1/4] am33xx: Enable UART{1,2,3,4,5} clocks Andrew Bradford
2012-10-24 20:23 ` [U-Boot] [PATCH v3 2/4] am33xx: Enable UART{1,2,3,4,5} pin-mux Andrew Bradford
2012-10-24 20:23 ` [U-Boot] [PATCH v3 3/4] serial: ns16550: Enable COM5 and COM6 Andrew Bradford
2012-10-24 20:23 ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1,2,3,4,5} Andrew Bradford
2012-10-24 20:39   ` [U-Boot] [PATCH v3 4/4] am335x_evm: Enable use of UART{1, 2, 3, 4, 5} Tom Rini
2012-10-24 21:07     ` Andrew Bradford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox