diff mbox series

[U-Boot,PATCHv2,1/2] dra7xx: Always enable UART1 and UART3 in early_padconf

Message ID 1520380947-20171-1-git-send-email-trini@konsulko.com
State Accepted
Commit 7dc7a38c79d2f3fccda845ce7ec4a623e1d26335
Delegated to: Tom Rini
Headers show
Series [U-Boot,PATCHv2,1/2] dra7xx: Always enable UART1 and UART3 in early_padconf | expand

Commit Message

Tom Rini March 7, 2018, 12:02 a.m. UTC
It is safe to always setup the pinmux for UART1 and UART3 to be used in
early_padconf and then if these pins are needed later on, they will be
re-muxed.  This allows us to drop the usage of CONFIG_CONS_INDEX here.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 board/ti/dra7xx/mux_data.h | 3 ---
 1 file changed, 3 deletions(-)

Comments

Lokesh Vutla March 7, 2018, 5:32 a.m. UTC | #1
On Wednesday 07 March 2018 05:32 AM, Tom Rini wrote:
> It is safe to always setup the pinmux for UART1 and UART3 to be used in
> early_padconf and then if these pins are needed later on, they will be
> re-muxed.  This allows us to drop the usage of CONFIG_CONS_INDEX here.

Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Thanks and regards,
Lokesh

> 
> Cc: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
>  board/ti/dra7xx/mux_data.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/board/ti/dra7xx/mux_data.h b/board/ti/dra7xx/mux_data.h
> index b5dcaa584a24..32c9ecacce2a 100644
> --- a/board/ti/dra7xx/mux_data.h
> +++ b/board/ti/dra7xx/mux_data.h
> @@ -372,13 +372,10 @@ const struct pad_conf_entry dra71x_core_padconf_array[] = {
>  };
>  
>  const struct pad_conf_entry early_padconf[] = {
> -#if (CONFIG_CONS_INDEX == 1)
>  	{UART1_RXD, (PIN_INPUT_SLEW | M0)}, /* UART1_RXD */
>  	{UART1_TXD, (PIN_INPUT_SLEW | M0)}, /* UART1_TXD */
> -#elif (CONFIG_CONS_INDEX == 3)
>  	{UART3_RXD, (PIN_INPUT_SLEW | M0)}, /* UART3_RXD */
>  	{UART3_TXD, (PIN_INPUT_SLEW | M0)}, /* UART3_TXD */
> -#endif
>  	{I2C1_SDA, (PIN_INPUT | M0)},	/* I2C1_SDA */
>  	{I2C1_SCL, (PIN_INPUT | M0)},	/* I2C1_SCL */
>  };
>
Tom Rini March 16, 2018, 5:09 p.m. UTC | #2
On Tue, Mar 06, 2018 at 07:02:26PM -0500, Tom Rini wrote:

> It is safe to always setup the pinmux for UART1 and UART3 to be used in
> early_padconf and then if these pins are needed later on, they will be
> re-muxed.  This allows us to drop the usage of CONFIG_CONS_INDEX here.
> 
> Cc: Lokesh Vutla <lokeshvutla@ti.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/board/ti/dra7xx/mux_data.h b/board/ti/dra7xx/mux_data.h
index b5dcaa584a24..32c9ecacce2a 100644
--- a/board/ti/dra7xx/mux_data.h
+++ b/board/ti/dra7xx/mux_data.h
@@ -372,13 +372,10 @@  const struct pad_conf_entry dra71x_core_padconf_array[] = {
 };
 
 const struct pad_conf_entry early_padconf[] = {
-#if (CONFIG_CONS_INDEX == 1)
 	{UART1_RXD, (PIN_INPUT_SLEW | M0)}, /* UART1_RXD */
 	{UART1_TXD, (PIN_INPUT_SLEW | M0)}, /* UART1_TXD */
-#elif (CONFIG_CONS_INDEX == 3)
 	{UART3_RXD, (PIN_INPUT_SLEW | M0)}, /* UART3_RXD */
 	{UART3_TXD, (PIN_INPUT_SLEW | M0)}, /* UART3_TXD */
-#endif
 	{I2C1_SDA, (PIN_INPUT | M0)},	/* I2C1_SDA */
 	{I2C1_SCL, (PIN_INPUT | M0)},	/* I2C1_SCL */
 };