From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/4] MX5: Add AHB clock reporting and fix IPG clock reporting
Date: Thu, 22 Sep 2011 05:41:27 +0200 [thread overview]
Message-ID: <201109220541.27276.marek.vasut@gmail.com> (raw)
In-Reply-To: <CAFQ4atRT1Gc=rqeuTgKL06c5mKqipXnfGv6PBjzNCaTKx=onmA@mail.gmail.com>
On Thursday, September 22, 2011 05:05:43 AM Jason Hui wrote:
> Hi, Marek
>
> On Thu, Sep 15, 2011 at 8:09 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> > arch/arm/cpu/armv7/mx5/clock.c | 36
> > +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+),
> > 9 deletions(-)
> >
> > diff --git a/arch/arm/cpu/armv7/mx5/clock.c
> > b/arch/arm/cpu/armv7/mx5/clock.c index 9f37f7f..a9fe81c 100644
> > --- a/arch/arm/cpu/armv7/mx5/clock.c
> > +++ b/arch/arm/cpu/armv7/mx5/clock.c
> > @@ -152,18 +152,35 @@ static u32 get_periph_clk(void)
> > }
> >
> > /*
> > + * Get the rate of ahb clock.
> > + */
> > +static u32 get_ahb_clk(void)
> > +{
> > + uint32_t freq, div, reg;
> > +
> > + freq = decode_pll(mxc_plls[PLL2_CLOCK], CONFIG_SYS_MX5_HCLK);
> > +
> > + reg = __raw_readl(&mxc_ccm->cbcdr);
> > + div = ((reg & MXC_CCM_CBCDR_AHB_PODF_MASK) >>
> > + MXC_CCM_CBCDR_AHB_PODF_OFFSET) + 1;
> > +
> > + return freq / div;
> > +}
>
> This is not correct, ahb clock is not fixed-source from PLL2.
>
> Currently implementation,we did not take care the ahb_bypass clock setting
> and don't consider the lp-apm mode for main-bus clock input.
There is no "current implementation". Besides, that's how the BootROM sets it up
so until someone needs it, this is ok.
>
> Jason Liu
next prev parent reply other threads:[~2011-09-22 3:41 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 0:09 [U-Boot] [PATCH 0/4] Clock fix and MXC I2C rework series Marek Vasut
2011-09-15 0:09 ` [U-Boot] [PATCH 1/4] MX5: Modify the PLL decoding algorithm Marek Vasut
2011-09-22 3:20 ` Jason Hui
2011-09-23 9:15 ` Stefano Babic
2011-09-23 9:43 ` [U-Boot] [PATCH 1/4 V2] " Marek Vasut
2011-09-15 0:09 ` [U-Boot] [PATCH 2/4] MX5: Add AHB clock reporting and fix IPG clock reporting Marek Vasut
2011-09-22 3:05 ` Jason Hui
2011-09-22 3:41 ` Marek Vasut [this message]
2011-09-22 4:46 ` Jason Hui
2011-09-22 19:20 ` [U-Boot] [PATCH 2/4 V2] " Marek Vasut
2011-09-23 2:09 ` Jason Hui
2011-09-15 0:09 ` [U-Boot] [PATCH 3/4] MX5: Clean up the output of "clocks" command Marek Vasut
2011-09-19 10:03 ` Stefano Babic
2011-09-22 1:58 ` Jason Hui
2011-09-15 0:09 ` [U-Boot] [PATCH 4/4] I2C: mxc_i2c rework Marek Vasut
2011-09-15 4:16 ` [U-Boot] [PATCH 4/4 V2] " Marek Vasut
2011-09-19 6:13 ` Heiko Schocher
2011-09-20 2:30 ` [U-Boot] [PATCH 4/4 V3] " Marek Vasut
2011-09-20 2:35 ` [U-Boot] [PATCH 4/4 V4] " Marek Vasut
2011-09-22 2:45 ` Jason Hui
2011-09-22 3:43 ` Marek Vasut
2011-09-22 4:54 ` Jason Hui
2011-09-22 5:47 ` Marek Vasut
2011-09-22 6:49 ` Jason Hui
2011-09-22 19:22 ` [U-Boot] [PATCH 4/4 V5] " Marek Vasut
2011-09-23 3:32 ` Jason Hui
2011-09-23 4:31 ` Fabio Estevam
2011-09-23 6:21 ` Marek Vasut
2011-09-23 7:46 ` Stefano Babic
2011-09-26 6:30 ` Heiko Schocher
2011-10-14 16:28 ` Anatolij Gustschin
2011-09-19 10:11 ` [U-Boot] [PATCH 4/4] " Stefano Babic
2011-09-19 10:24 ` Marek Vasut
2011-09-20 10:07 ` Jason Liu
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=201109220541.27276.marek.vasut@gmail.com \
--to=marek.vasut@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