public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Prashant Gaikwad <pgaikwad@nvidia.com>
Cc: "linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"mturquette@linaro.org" <mturquette@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>
Subject: Re: [PATCH v2 01/11] clk: tegra: Add tegra specific clocks
Date: Mon, 7 Jan 2013 14:13:47 +0200	[thread overview]
Message-ID: <20130107121347.GG26066@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <1356619644-18565-2-git-send-email-pgaikwad@nvidia.com>

On Thu, Dec 27, 2012 at 03:47:14PM +0100, Prashant Gaikwad wrote:
> Add tegra specific clocks, pll, pll_out, peripheral,
> frac_divider, super.
> 

...

> diff --git a/drivers/clk/tegra/clk-pll-out.c b/drivers/clk/tegra/clk-pll-out.c
> new file mode 100644
> index 0000000..60a117b
> --- /dev/null
> +++ b/drivers/clk/tegra/clk-pll-out.c
> @@ -0,0 +1,124 @@
> +/*
> + * Copyright (c) 2012, NVIDIA CORPORATION.  All rights reserved.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
> + * more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program.  If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/io.h>
> +#include <linux/err.h>
> +#include <linux/delay.h>
> +#include <linux/slab.h>
> +#include <linux/clk-provider.h>
> +#include <linux/clk.h>
> +
> +#include "clk.h"
> +
> +#define to_clk_pll_out(_hw) container_of(_hw, struct tegra_clk_pll_out, hw)
> +
> +#define pll_out_enb(p) (BIT(p->enb_bit_idx))
> +#define pll_out_rst(p) (BIT(p->rst_bit_idx))
> +

Given that these 2 are always consecutive bits, wouldn't it make more sense to
specify the bit offset once and then add 1 for the enable bit?

Cheers,

Peter.

  reply	other threads:[~2013-01-07 12:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27 14:47 [PATCH v2 00/11] Migrate Tegra to common clock framework Prashant Gaikwad
2012-12-27 14:47 ` [PATCH v2 01/11] clk: tegra: Add tegra specific clocks Prashant Gaikwad
2013-01-07 12:13   ` Peter De Schrijver [this message]
2012-12-27 14:47 ` [PATCH v2 02/11] arm: tegra: Move tegra_cpu_car.h to linux/clk/tegra.h Prashant Gaikwad
2012-12-27 14:47 ` [PATCH v2 03/11] ARM: tegra: Define Tegra20 CAR binding Prashant Gaikwad
2012-12-27 14:47 ` [PATCH v2 04/11] ARM: Tegra: Define Tegra30 " Prashant Gaikwad
     [not found]   ` <1356619644-18565-5-git-send-email-pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-09 14:41     ` Peter De Schrijver
2012-12-27 14:47 ` [PATCH v2 05/11] ARM: dt: tegra30: Add device node for APB MISC Prashant Gaikwad
     [not found]   ` <1356619644-18565-6-git-send-email-pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-02 22:00     ` Stephen Warren
     [not found]       ` <50E4AE19.1060503-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-03  6:11         ` Prashant Gaikwad
     [not found]           ` <50E520FC.4070805-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-03 16:11             ` Stephen Warren
     [not found]               ` <50E5ADA6.1070904-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-04  1:48                 ` Prashant Gaikwad
     [not found]                   ` <50E634D0.6080702-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-04  3:05                     ` Stephen Warren
     [not found]                       ` <50E6470E.8090206-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-04  3:23                         ` Prashant Gaikwad
2013-01-04  4:00                           ` Stephen Warren
     [not found]                             ` <50E653E3.5060901-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-04  4:26                               ` Prashant Gaikwad
     [not found]                                 ` <50E659F4.7020009-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-04  5:21                                   ` Stephen Warren
     [not found]                                     ` <50E666C0.50200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-01-04  5:31                                       ` Prashant Gaikwad
2013-01-04 11:56                             ` Laxman Dewangan
     [not found]                               ` <50E6C37C.5050605-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-04 19:57                                 ` Stephen Warren
2012-12-27 14:47 ` [PATCH v2 06/11] ARM: dt: tegra20: " Prashant Gaikwad
2012-12-27 14:47 ` [PATCH v2 07/11] clk: tegra: add clock support for tegra20 Prashant Gaikwad
2012-12-27 14:47 ` [PATCH v2 09/11] clk: tegra: add dt support Prashant Gaikwad
     [not found]   ` <1356619644-18565-10-git-send-email-pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-01-02 22:06     ` Stephen Warren
     [not found] ` <1356619644-18565-1-git-send-email-pgaikwad-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-12-27 14:47   ` [PATCH v2 08/11] clk: tegra: add clock support for tegra30 Prashant Gaikwad
2013-01-07 14:54     ` Peter De Schrijver
2012-12-27 14:47   ` [PATCH v2 10/11] arm: tegra: Migrate to new clock code Prashant Gaikwad
2012-12-27 14:47   ` [PATCH v2 11/11] arm: tegra: Remove legacy " Prashant Gaikwad
2013-01-02 22:09 ` [PATCH v2 00/11] Migrate Tegra to common clock framework Stephen Warren

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=20130107121347.GG26066@tbergstrom-lnx.Nvidia.com \
    --to=pdeschrijver@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=pgaikwad@nvidia.com \
    --cc=swarren@wwwdotorg.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