From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cGUxM-0005Ir-9t for barebox@lists.infradead.org; Mon, 12 Dec 2016 18:04:09 +0000 Received: by mail-pf0-x242.google.com with SMTP id 144so4712101pfv.0 for ; Mon, 12 Dec 2016 10:03:50 -0800 (PST) From: Andrey Smirnov Date: Mon, 12 Dec 2016 10:03:01 -0800 Message-Id: <1481565788-9115-15-git-send-email-andrew.smirnov@gmail.com> In-Reply-To: <1481565788-9115-1-git-send-email-andrew.smirnov@gmail.com> References: <1481565788-9115-1-git-send-email-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 14/21] i.MX6: sabresd: Remove magic numbers in setup_uart To: barebox@lists.infradead.org Cc: Andrey Smirnov Remove magic numbers in setup_uart and replace them with calls to iomuxv3 helper functions. Signed-off-by: Andrey Smirnov --- arch/arm/boards/freescale-mx6-sabresd/lowlevel.c | 9 +++------ 1 file 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 #include #include +#include #include #include @@ -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(); -- 2.5.5 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox