From: josephl@nvidia.com (Joseph Lo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: tegra30: clocks: add AHB and APB clocks
Date: Mon, 22 Oct 2012 15:17:56 +0800 [thread overview]
Message-ID: <1350890276.9491.2.camel@jlo-ubuntu-64.nvidia.com> (raw)
In-Reply-To: <5084CDBC.2010106@nvidia.com>
On Mon, 2012-10-22 at 12:38 +0800, Prashant Gaikwad wrote:
> On Friday 19 October 2012 12:08 PM, Joseph Lo wrote:
> > Adding the AHB and APB bus clock control interface for Tegra30.
> >
> > Signed-off-by: Joseph Lo<josephl@nvidia.com>
> > ---
> > arch/arm/mach-tegra/common.c | 4 +
> > arch/arm/mach-tegra/tegra30_clocks.c | 106 +++++++++++++++++++++++++++++
> > arch/arm/mach-tegra/tegra30_clocks.h | 1 +
> > arch/arm/mach-tegra/tegra30_clocks_data.c | 46 +++++++++++++
> > 4 files changed, 157 insertions(+), 0 deletions(-)
>
> <snip>
>
> > +
> > +static long tegra30_bus_clk_round_rate(struct clk_hw *hw, unsigned long rate,
> > + unsigned long *prate)
> > +{
> > + unsigned long parent_rate = *prate;
> > + s64 divider;
> > +
> > + if (rate>= parent_rate)
> > + return rate;
> > +
>
> return parent_rate?
Prashant,
Yes, thanks.
>
> > + divider = parent_rate;
> > + divider += rate - 1;
> > + do_div(divider, rate);
> > +
> > + if (divider< 0)
> > + return divider;
> > +
> > + if (divider> 4)
> > + divider = 4;
> > + do_div(parent_rate, divider);
> > +
> > + return parent_rate;
> > +}
> >
>
prev parent reply other threads:[~2012-10-22 7:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 6:38 [PATCH] ARM: tegra30: clocks: add AHB and APB clocks Joseph Lo
2012-10-19 15:53 ` Stephen Warren
2012-10-22 4:38 ` Prashant Gaikwad
2012-10-22 7:17 ` Joseph Lo [this message]
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=1350890276.9491.2.camel@jlo-ubuntu-64.nvidia.com \
--to=josephl@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).