public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/7] mx25: Clean up clocks API
Date: Thu, 27 Sep 2012 22:27:57 +0200 (CEST)	[thread overview]
Message-ID: <15104035.5372621.1348777677380.JavaMail.root@advansee.com> (raw)
In-Reply-To: <354965566.5372561.1348777614543.JavaMail.root@advansee.com>

Use the standard mxc_get_clock() instead of exporting internal functions and
using literal constant values.

Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
Cc: Stefano Babic <sbabic@denx.de>
---
 .../arch/arm/cpu/arm926ejs/mx25/generic.c          |    6 +++---
 .../arch/arm/include/asm/arch-mx25/clock.h         |    9 +++------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git u-boot-imx-e1eb75b.orig/arch/arm/cpu/arm926ejs/mx25/generic.c u-boot-imx-e1eb75b/arch/arm/cpu/arm926ejs/mx25/generic.c
index 5879b18..5da2582 100644
--- u-boot-imx-e1eb75b.orig/arch/arm/cpu/arm926ejs/mx25/generic.c
+++ u-boot-imx-e1eb75b/arch/arm/cpu/arm926ejs/mx25/generic.c
@@ -72,7 +72,7 @@ static ulong imx_get_mpllclk(void)
 	return imx_decode_pll(readl(&ccm->mpctl), fref);
 }
 
-ulong imx_get_armclk(void)
+static ulong imx_get_armclk(void)
 {
 	struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
 	ulong cctl = readl(&ccm->cctl);
@@ -88,7 +88,7 @@ ulong imx_get_armclk(void)
 	return fref / div;
 }
 
-ulong imx_get_ahbclk(void)
+static ulong imx_get_ahbclk(void)
 {
 	struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
 	ulong cctl = readl(&ccm->cctl);
@@ -106,7 +106,7 @@ static ulong imx_get_ipgclk(void)
 	return imx_get_ahbclk() / 2;
 }
 
-ulong imx_get_perclk(int clk)
+static ulong imx_get_perclk(int clk)
 {
 	struct ccm_regs *ccm = (struct ccm_regs *)IMX_CCM_BASE;
 	ulong fref = imx_get_ahbclk();
diff --git u-boot-imx-e1eb75b.orig/arch/arm/include/asm/arch-mx25/clock.h u-boot-imx-e1eb75b/arch/arm/include/asm/arch-mx25/clock.h
index a532da5..efbe038 100644
--- u-boot-imx-e1eb75b.orig/arch/arm/include/asm/arch-mx25/clock.h
+++ u-boot-imx-e1eb75b/arch/arm/include/asm/arch-mx25/clock.h
@@ -67,12 +67,9 @@ enum mxc_clock {
 	MXC_CLK_NUM
 };
 
-ulong imx_get_perclk(int clk);
-ulong imx_get_ahbclk(void);
-
-#define imx_get_uartclk() imx_get_perclk(15)
-#define imx_get_fecclk() mxc_get_clock(MXC_FEC_CLK)
-
 unsigned int mxc_get_clock(enum mxc_clock clk);
 
+#define imx_get_uartclk()	mxc_get_clock(MXC_UART_CLK)
+#define imx_get_fecclk()	mxc_get_clock(MXC_FEC_CLK)
+
 #endif /* __ASM_ARCH_CLOCK_H */

  parent reply	other threads:[~2012-09-27 20:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 20:26 [U-Boot] [PATCH 1/7] mx25: Fix decode_pll Benoît Thébaudeau
2012-09-27 20:27 ` [U-Boot] [PATCH 2/7] mx25: Clean up clock calculations Benoît Thébaudeau
2012-09-27 20:27 ` [U-Boot] [PATCH 3/7] mx25: Define more standard clocks Benoît Thébaudeau
2012-09-27 20:27 ` [U-Boot] [PATCH 4/7] mx25 clocks: Fix MXC_FEC_CLK Benoît Thébaudeau
2012-09-28 10:33   ` Stefano Babic
2012-09-27 20:27 ` Benoît Thébaudeau [this message]
2012-09-28 10:31   ` [U-Boot] [PATCH 5/7] mx25: Clean up clocks API Stefano Babic
2012-09-27 20:28 ` [U-Boot] [PATCH 6/7] mx25: Define cpu_eth_init() only if needed Benoît Thébaudeau
2012-09-27 20:55   ` Fabio Estevam
2012-09-27 21:43     ` Benoît Thébaudeau
2012-09-28  9:09       ` Stefano Babic
2012-09-27 20:28 ` [U-Boot] [PATCH 7/7] mx25: Fix eSDHC support Benoît Thébaudeau
2012-09-30 10:26 ` [U-Boot] [PATCH 1/7] mx25: Fix decode_pll Stefano Babic

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=15104035.5372621.1348777677380.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.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