summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2017-01-10 07:09:06 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2017-01-12 07:42:32 +0100
commit72a4361482dffb60cc6950c3784d211828514524 (patch)
tree5c772b15f21e67baa2f835eb9a948e0c012c029c
parent107d6954a62dce2cfd3fd7a2d5b3b6c3a3a32148 (diff)
downloadbarebox-72a4361482dffb60cc6950c3784d211828514524.tar.gz
i.MX6: sabresd: Remove magic numbers in setup_uart
Remove magic numbers in setup_uart and replace them with calls to iomuxv3 helper functions. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/boards/freescale-mx6-sabresd/lowlevel.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
index b329f46..5743dbc 100644
--- a/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
+++ b/arch/arm/boards/freescale-mx6-sabresd/lowlevel.c
@@ -2,6 +2,7 @@
#include <common.h>
#include <linux/sizes.h>
#include <mach/generic.h>
+#include <mach/iomux-mx6.h>
#include <asm/barebox-arm-head.h>
#include <asm/barebox-arm.h>
@@ -11,12 +12,8 @@ static inline void setup_uart(void)
imx6_ungate_all_peripherals();
- writel(0x1b0b1, iomuxbase + 0x0650);
- writel(3, iomuxbase + 0x0280);
-
- writel(0x1b0b1, iomuxbase + 0x0654);
- writel(3, iomuxbase + 0x0284);
- writel(1, iomuxbase + 0x0920);
+ imx_setup_pad(iomuxbase, MX6Q_PAD_CSI0_DAT10__UART1_TXD);
+ imx_setup_pad(iomuxbase, MX6Q_PAD_CSI0_DAT11__UART1_RXD);
imx6_uart_setup_ll();