[U-Boot] [PATCH v2 28/41] board: ge: mx53ppd: move uart initialisation to own function
Robert Beckett
bob.beckett at collabora.com
Wed Oct 23 18:21:49 UTC 2019
From: Ian Ray <ian.ray at ge.com>
Move UART initialisation to a stand-alone function for consistency with
other boards.
Drop PPD_UART_PAD_CTRL since it matches defaults.
Signed-off-by: Ian Ray <ian.ray at ge.com>
Signed-off-by: Robert Beckett <bob.beckett at collabora.com>
---
board/ge/mx53ppd/mx53ppd.c | 11 +++++++++++
board/ge/mx53ppd/ppd_gpio.h | 6 ------
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/board/ge/mx53ppd/mx53ppd.c b/board/ge/mx53ppd/mx53ppd.c
index c923478809..2586daddf3 100644
--- a/board/ge/mx53ppd/mx53ppd.c
+++ b/board/ge/mx53ppd/mx53ppd.c
@@ -81,6 +81,16 @@ int dram_init_banksize(void)
return 0;
}
+static void setup_iomux_uart(void)
+{
+ static const iomux_v3_cfg_t uart_pads[] = {
+ MX53_PAD_PATA_DMACK__UART1_RXD_MUX,
+ MX53_PAD_PATA_DIOW__UART1_TXD_MUX,
+ };
+
+ imx_iomux_v3_setup_multiple_pads(uart_pads, ARRAY_SIZE(uart_pads));
+}
+
u32 get_board_rev(void)
{
return get_cpu_rev() & ~(0xF << 8);
@@ -161,6 +171,7 @@ void ppd_gpio_init(void)
int board_early_init_f(void)
{
+ setup_iomux_uart();
setup_iomux_fec();
setup_iomux_lcd();
ppd_gpio_init();
diff --git a/board/ge/mx53ppd/ppd_gpio.h b/board/ge/mx53ppd/ppd_gpio.h
index ba2d1baf37..12bb389629 100644
--- a/board/ge/mx53ppd/ppd_gpio.h
+++ b/board/ge/mx53ppd/ppd_gpio.h
@@ -9,15 +9,9 @@
#include <asm/arch/iomux-mx53.h>
#include <asm/gpio.h>
-#define PPD_UART_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_DSE_HIGH | \
- PAD_CTL_PUS_100K_UP)
-
static const iomux_v3_cfg_t ppd_pads[] = {
/* FEC */
MX53_PAD_EIM_A22__GPIO2_16,
- /* UART */
- NEW_PAD_CTRL(MX53_PAD_PATA_DMACK__UART1_RXD_MUX, PPD_UART_PAD_CTRL),
- NEW_PAD_CTRL(MX53_PAD_PATA_DIOW__UART1_TXD_MUX, PPD_UART_PAD_CTRL),
/* Video */
MX53_PAD_CSI0_DATA_EN__GPIO5_20, /* LR_SCAN_CTRL */
MX53_PAD_CSI0_VSYNC__GPIO5_21, /* UD_SCAN_CTRL */
--
2.20.1
More information about the U-Boot
mailing list