From: John Rigby <jcrigby@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/9] mxc_serial replace platform specific clock
Date: Tue, 12 Jan 2010 21:43:53 -0700 [thread overview]
Message-ID: <1263357841-5100-2-git-send-email-jcrigby@gmail.com> (raw)
In-Reply-To: <1263357841-5100-1-git-send-email-jcrigby@gmail.com>
remove ifdef'd clock selection code from
serial_mxc.c and replace with call to imx_get_uartclk
Add definitions for imx_get_uartclk to imx31 and imx27
include files.
This makes it easier to add new imx platforms.
Signed-off-by: John Rigby <jcrigby@gmail.com>
---
drivers/serial/serial_mxc.c | 6 +-----
include/asm-arm/arch-mx27/clock.h | 2 ++
include/asm-arm/arch-mx31/mx31.h | 1 +
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index acc5b7d..7dcedf6 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -166,11 +166,7 @@ DECLARE_GLOBAL_DATA_PTR;
void serial_setbrg (void)
{
-#ifdef CONFIG_MX31
- u32 clk = mx31_get_ipg_clk();
-#else
- u32 clk = imx_get_perclk1();
-#endif
+ u32 clk = imx_get_uartclk();
if (!gd->baudrate)
gd->baudrate = CONFIG_BAUDRATE;
diff --git a/include/asm-arm/arch-mx27/clock.h b/include/asm-arm/arch-mx27/clock.h
index 5fc75c5..472e8f2 100644
--- a/include/asm-arm/arch-mx27/clock.h
+++ b/include/asm-arm/arch-mx27/clock.h
@@ -36,4 +36,6 @@ ulong imx_get_perclk2(void);
ulong imx_get_perclk3(void);
ulong imx_get_ahbclk(void);
+#define imx_get_uartclk imx_get_perclk1
+
#endif /* __ASM_ARCH_CLOCK_H */
diff --git a/include/asm-arm/arch-mx31/mx31.h b/include/asm-arm/arch-mx31/mx31.h
index 53b9f27..3cc4b35 100644
--- a/include/asm-arm/arch-mx31/mx31.h
+++ b/include/asm-arm/arch-mx31/mx31.h
@@ -25,6 +25,7 @@
#define __ASM_ARCH_MX31_H
extern u32 mx31_get_ipg_clk(void);
+#define imx_get_uartclk mx31_get_ipg_clk
extern void mx31_gpio_mux(unsigned long mode);
enum mx31_gpio_direction {
--
1.6.4.2.236.gf324c
next prev parent reply other threads:[~2010-01-13 4:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 4:43 [U-Boot] [PATCH 0/9] Add support for i.MX25 SOC and TX25 board John Rigby
2010-01-13 4:43 ` John Rigby [this message]
2010-01-13 4:43 ` [U-Boot] [PATCH 2/9] arm926ejs: add nand_spl boot support John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 3/9] Add v1.1 support to nand_spl fsl nfc driver John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 4/9] Nand mxc_nand add v1.1 controller support John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 5/9] fec_mxc: cleanup and factor out imx27 dependencies John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 6/9] Add support for Freescale MX25 SOC John Rigby
2010-01-13 4:43 ` [U-Boot] [PATCH 7/9] fec_mxc: add imx25 support John Rigby
2010-01-13 4:44 ` [U-Boot] [PATCH 8/9] env_nand.c: print error message and fail gracefully John Rigby
2010-01-13 4:44 ` [U-Boot] [PATCH 9/9] Add support for KARO TX25 board John Rigby
2010-01-13 15:26 ` Fabio Estevam
2010-01-15 15:20 ` Wolfgang Denk
2010-01-15 22:28 ` [U-Boot] [PATCH 8/9] env_nand.c: print error message and fail gracefully Scott Wood
2010-01-13 15:10 ` [U-Boot] [PATCH 4/9] Nand mxc_nand add v1.1 controller support Fabio Estevam
2010-01-13 16:50 ` John Rigby
2010-01-15 0:48 ` Fabio Estevam
2010-01-15 16:49 ` John Rigby
2010-01-15 22:36 ` Scott Wood
2010-01-15 23:32 ` John Rigby
2010-01-13 15:15 ` [U-Boot] [PATCH 3/9] Add v1.1 support to nand_spl fsl nfc driver Fabio Estevam
2010-01-15 23:13 ` Scott Wood
2010-01-15 23:30 ` John Rigby
2010-01-15 23:48 ` Scott Wood
2010-01-15 15:09 ` [U-Boot] [PATCH 0/9] Add support for i.MX25 SOC and TX25 board Wolfgang Denk
2010-01-15 15:14 ` Wolfgang Denk
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=1263357841-5100-2-git-send-email-jcrigby@gmail.com \
--to=jcrigby@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox