From: Prashant Gaikwad <pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH] ARM: tegra30: clocks: add AHB and APB clocks
Date: Mon, 22 Oct 2012 10:08:20 +0530 [thread overview]
Message-ID: <5084CDBC.2010106@nvidia.com> (raw)
In-Reply-To: <1350628693-1190-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
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-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> 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?
> + 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;
> +}
>
WARNING: multiple messages have this Message-ID (diff)
From: pgaikwad@nvidia.com (Prashant Gaikwad)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: tegra30: clocks: add AHB and APB clocks
Date: Mon, 22 Oct 2012 10:08:20 +0530 [thread overview]
Message-ID: <5084CDBC.2010106@nvidia.com> (raw)
In-Reply-To: <1350628693-1190-1-git-send-email-josephl@nvidia.com>
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?
> + 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;
> +}
>
next prev parent reply other threads:[~2012-10-22 4:38 UTC|newest]
Thread overview: 8+ 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 6:38 ` Joseph Lo
[not found] ` <1350628693-1190-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-10-19 15:53 ` Stephen Warren
2012-10-19 15:53 ` Stephen Warren
2012-10-22 4:38 ` Prashant Gaikwad [this message]
2012-10-22 4:38 ` Prashant Gaikwad
[not found] ` <5084CDBC.2010106-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-10-22 7:17 ` Joseph Lo
2012-10-22 7:17 ` Joseph Lo
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=5084CDBC.2010106@nvidia.com \
--to=pgaikwad-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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 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.