From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/7] mx25 clocks: Fix MXC_FEC_CLK
Date: Fri, 28 Sep 2012 12:33:31 +0200 [thread overview]
Message-ID: <50657CFB.9030809@denx.de> (raw)
In-Reply-To: <1053515250.5372597.1348777664806.JavaMail.root@advansee.com>
On 27/09/2012 22:27, Beno?t Th?baudeau wrote:
> mxc_get_clock(MXC_FEC_CLK) should return the IPG clock, not the AHB clock.
>
> Also, imx_get_fecclk() was correct but reimplemented the calculation of the IPG
> clock, so remove the duplicated code.
>
> Signed-off-by: Beno?t Th?baudeau <benoit.thebaudeau@advansee.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> .../arch/arm/cpu/arm926ejs/mx25/generic.c | 3 +--
> .../arch/arm/include/asm/arch-mx25/clock.h | 2 +-
> 2 files changed, 2 insertions(+), 3 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 219c9eb..5879b18 100644
> --- u-boot-imx-e1eb75b.orig/arch/arm/cpu/arm926ejs/mx25/generic.c
> +++ u-boot-imx-e1eb75b/arch/arm/cpu/arm926ejs/mx25/generic.c
> @@ -129,9 +129,8 @@ unsigned int mxc_get_clock(enum mxc_clock clk)
> return imx_get_ahbclk();
> case MXC_IPG_CLK:
> case MXC_CSPI_CLK:
> - return imx_get_ipgclk();
> case MXC_FEC_CLK:
> - return imx_get_ahbclk();
> + return imx_get_ipgclk();
> default:
> return imx_get_perclk(clk);
> }
> 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 9823f46..a532da5 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
> @@ -71,7 +71,7 @@ ulong imx_get_perclk(int clk);
> ulong imx_get_ahbclk(void);
>
> #define imx_get_uartclk() imx_get_perclk(15)
> -#define imx_get_fecclk() (imx_get_ahbclk()/2)
> +#define imx_get_fecclk() mxc_get_clock(MXC_FEC_CLK)
>
> unsigned int mxc_get_clock(enum mxc_clock clk);
>
>
Tested on tx25.
Acked-by : Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
Regards,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2012-09-28 10:33 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 [this message]
2012-09-27 20:27 ` [U-Boot] [PATCH 5/7] mx25: Clean up clocks API Benoît Thébaudeau
2012-09-28 10:31 ` 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=50657CFB.9030809@denx.de \
--to=sbabic@denx.de \
--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.