All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun Nie <jun.nie@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] pico-imx7d: polish uart clock id definition
Date: Tue, 16 Jul 2019 15:42:58 +0800	[thread overview]
Message-ID: <1563262978-6855-4-git-send-email-jun.nie@linaro.org> (raw)
In-Reply-To: <1563262978-6855-1-git-send-email-jun.nie@linaro.org>

Polish uart clock id definition. Default IMX7 UART ID is UART1
as original parameter in imx_get_uartclk().

Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 arch/arm/include/asm/arch-mx7/clock.h | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx7/clock.h b/arch/arm/include/asm/arch-mx7/clock.h
index 1d07fde..a8e6097 100644
--- a/arch/arm/include/asm/arch-mx7/clock.h
+++ b/arch/arm/include/asm/arch-mx7/clock.h
@@ -175,23 +175,7 @@ enum clk_root_index {
 	CLK_ROOT_MAX,
 };
 
-#if (CONFIG_CONS_INDEX == 0)
-#define UART_CLK_ROOT UART1_CLK_ROOT
-#elif (CONFIG_CONS_INDEX == 1)
-#define UART_CLK_ROOT UART2_CLK_ROOT
-#elif (CONFIG_CONS_INDEX == 2)
-#define UART_CLK_ROOT UART3_CLK_ROOT
-#elif (CONFIG_CONS_INDEX == 3)
-#define UART_CLK_ROOT UART4_CLK_ROOT
-#elif (CONFIG_CONS_INDEX == 4)
-#define UART_CLK_ROOT UART5_CLK_ROOT
-#elif (CONFIG_CONS_INDEX == 5)
-#define UART_CLK_ROOT UART6_CLK_ROOT
-#elif (CONFIG_CONS_INDEX == 6)
-#define UART_CLK_ROOT UART7_CLK_ROOT
-#else
-#error "Invalid IMX UART ID for serial console is defined"
-#endif
+#define UART_CLK_ROOT (UART1_CLK_ROOT + CONFIG_CONS_INDEX)
 
 struct clk_root_setting {
 	enum clk_root_index root;
-- 
2.7.4

  parent reply	other threads:[~2019-07-16  7:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16  7:42 [U-Boot] [PATCH 0/3] Support distro boot in pico-imx7d BL33 case Jun Nie
2019-07-16  7:42 ` [U-Boot] [PATCH 1/3] pico-imx7d: add config to enable CAAM Jun Nie
2019-07-16  7:42 ` [U-Boot] [PATCH 2/3] pico-imx7d: Support distro boot for FIT image case Jun Nie
2019-07-17  5:42   ` Joris OFFOUGA
2019-10-14 12:40   ` sbabic at denx.de
2019-07-16  7:42 ` Jun Nie [this message]
2019-10-13 13:35   ` [U-Boot] [PATCH 3/3] pico-imx7d: polish uart clock id definition Stefano Babic
2019-10-16 14:57     ` Jun Nie
2019-10-17 13:46       ` Stefano Babic
2019-07-26 14:16 ` [U-Boot] [PATCH 0/3] Support distro boot in pico-imx7d BL33 case Jun Nie
2019-08-08  4:04 ` Jun Nie
2019-09-02  8:09   ` Jun Nie
2019-09-03  1:39     ` Peng Fan
2019-09-03  6:54       ` Jun Nie
2019-09-09 13:47       ` Jun Nie
2019-09-11  6:02         ` Peng Fan
2019-09-12 10:40           ` Jun Nie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1563262978-6855-4-git-send-email-jun.nie@linaro.org \
    --to=jun.nie@linaro.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.