All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Linus Walleij <linus.walleij@linaro.org>,
	Haojian Zhuang <haojian.zhuang@linaro.org>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Mike Turquette <mturquette@linaro.org>,
	Seungwon Jeon <tgih.jun@samsung.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Chris Ball <cjb@laptop.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <rob.herring@calxeda.com>,
	"devicetree-discuss@lists.ozlabs.org"
	<devicetree-discuss@lists.ozlabs.org>,
	Russell King <linux@arm.linux.org.uk>,
	Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Subject: Re: [PATCH v2 1/8] clk: flag to use upper half of the register as change indicator
Date: Fri, 7 Jun 2013 14:27:20 +0200	[thread overview]
Message-ID: <201306071427.20512.heiko@sntech.de> (raw)
In-Reply-To: <CACRpkda+QwnhCHBhQ3d-zUE9dD75Rv0_qt02h6prrzCBzNm5zw@mail.gmail.com>

Am Freitag, 7. Juni 2013, 13:46:32 schrieb Linus Walleij:
> On Thu, Jun 6, 2013 at 9:08 PM, Heiko Stübner <heiko@sntech.de> wrote:
> > There exist platforms, namely at least all Rockchip Cortex-A9 based ones,
> > that don't use the paradigm of reading-changing-writing the register
> > contents, but instead only write the changes to the register with a mask
> > that indicates the changed bits.
> > 
> > This patch adds flags and code to support the case where the lower 16 bit
> > of hold the information and the upper 16 bit are used as mask to
> > indicate the written changes.
> > 
> > As hardware-specific flags should not be added to the common clk flags,
> > the flags are added to gate, mux and divider clocks individually.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> 
> (...)
> 
> > +       if ((clk_gate_flags & CLK_GATE_MASK_UPPER_HALF) && bit_idx > 15)
> > { +               pr_err("%s: bit_idx %d invalid\n", __func__, bit_idx);
> > +               return ERR_PTR(-EINVAL);
> > +       }
> 
> Now this looks *EXTREMELY* familiar to a patch just sent by Haojian
> for HiSilicon.
> 
> "[PATCH v2 3/6] clk: divider: add CLK_DIVIDER_HIWORD_MASK flag"
> http://marc.info/?l=linux-arm-kernel&m=137035873916777&w=2
> 
> What kind of coincidence is this? Are Rockchip and HiSilicon using
> the same silicon IP or are they of a common origin? (It is a small
> world after all.)

Now this is really interesting :-) and the handling really seems to follow the 
same pattern.


> I think you two guys need to read each others patch sets closely
> here. I'd like Haojian to look at Heiko's patches and Heiko to look
> at Haojian's patches, just to make sure you're not actually writing
> two drivers for the same hardware in the end.

I'll take a look


Heiko

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/8] clk: flag to use upper half of the register as change indicator
Date: Fri, 7 Jun 2013 14:27:20 +0200	[thread overview]
Message-ID: <201306071427.20512.heiko@sntech.de> (raw)
In-Reply-To: <CACRpkda+QwnhCHBhQ3d-zUE9dD75Rv0_qt02h6prrzCBzNm5zw@mail.gmail.com>

Am Freitag, 7. Juni 2013, 13:46:32 schrieb Linus Walleij:
> On Thu, Jun 6, 2013 at 9:08 PM, Heiko St?bner <heiko@sntech.de> wrote:
> > There exist platforms, namely at least all Rockchip Cortex-A9 based ones,
> > that don't use the paradigm of reading-changing-writing the register
> > contents, but instead only write the changes to the register with a mask
> > that indicates the changed bits.
> > 
> > This patch adds flags and code to support the case where the lower 16 bit
> > of hold the information and the upper 16 bit are used as mask to
> > indicate the written changes.
> > 
> > As hardware-specific flags should not be added to the common clk flags,
> > the flags are added to gate, mux and divider clocks individually.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> 
> (...)
> 
> > +       if ((clk_gate_flags & CLK_GATE_MASK_UPPER_HALF) && bit_idx > 15)
> > { +               pr_err("%s: bit_idx %d invalid\n", __func__, bit_idx);
> > +               return ERR_PTR(-EINVAL);
> > +       }
> 
> Now this looks *EXTREMELY* familiar to a patch just sent by Haojian
> for HiSilicon.
> 
> "[PATCH v2 3/6] clk: divider: add CLK_DIVIDER_HIWORD_MASK flag"
> http://marc.info/?l=linux-arm-kernel&m=137035873916777&w=2
> 
> What kind of coincidence is this? Are Rockchip and HiSilicon using
> the same silicon IP or are they of a common origin? (It is a small
> world after all.)

Now this is really interesting :-) and the handling really seems to follow the 
same pattern.


> I think you two guys need to read each others patch sets closely
> here. I'd like Haojian to look at Heiko's patches and Heiko to look
> at Haojian's patches, just to make sure you're not actually writing
> two drivers for the same hardware in the end.

I'll take a look


Heiko

  reply	other threads:[~2013-06-07 12:27 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 19:07 [PATCH v2 0/8] arm: add basic support for Rockchip Cortex-A9 SoCs Heiko Stübner
2013-06-06 19:07 ` Heiko Stübner
2013-06-06 19:08 ` [PATCH v2 1/8] clk: flag to use upper half of the register as change indicator Heiko Stübner
2013-06-06 19:08   ` Heiko Stübner
2013-06-07 11:46   ` Linus Walleij
2013-06-07 11:46     ` Linus Walleij
2013-06-07 12:27     ` Heiko Stübner [this message]
2013-06-07 12:27       ` Heiko Stübner
2013-06-07 15:21       ` Haojian Zhuang
2013-06-07 15:21         ` Haojian Zhuang
     [not found] ` <201306062107.58875.heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
2013-06-06 19:09   ` [PATCH v2 2/8] clk: divider: add flag to limit possible dividers to even numbers Heiko Stübner
2013-06-06 19:09     ` Heiko Stübner
2013-06-06 19:09     ` Heiko Stübner
2013-06-06 19:10   ` [PATCH v2 3/8] mmc: dw_mmc-pltfm: remove static from dw_mci_pltfm_remove Heiko Stübner
2013-06-06 19:10     ` Heiko Stübner
2013-06-06 19:10     ` Heiko Stübner
2013-06-06 19:11   ` [PATCH v2 4/8] mmc: dw_mmc-pltfm: add Rockchip variant Heiko Stübner
2013-06-06 19:11     ` Heiko Stübner
2013-06-06 19:11     ` Heiko Stübner
2013-06-06 20:35     ` Andy Shevchenko
2013-06-06 20:35       ` Andy Shevchenko
2013-06-06 19:11   ` [PATCH v2 5/8] pinctrl: add pinctrl driver for Rockchip SoCs Heiko Stübner
2013-06-06 19:11     ` Heiko Stübner
2013-06-06 19:11     ` Heiko Stübner
2013-06-07 12:53     ` Linus Walleij
2013-06-07 12:53       ` Linus Walleij
     [not found]       ` <CACRpkdZ97poa5HOP4baDnsdq5OjwO5S2=+pPH9ey84r=ZW43nA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-07 23:13         ` Heiko Stübner
2013-06-07 23:13           ` Heiko Stübner
2013-06-07 23:13           ` Heiko Stübner
2013-06-07 23:53           ` Heiko Stübner
2013-06-07 23:53             ` Heiko Stübner
2013-06-06 19:12   ` [PATCH v2 6/8] clk: add basic Rockchip rk3066a clock support Heiko Stübner
2013-06-06 19:12     ` Heiko Stübner
2013-06-06 19:12     ` Heiko Stübner
2013-06-06 19:12   ` [PATCH v2 7/8] arm: add debug uarts for rockchip rk29xx and rk3xxx series Heiko Stübner
2013-06-06 19:12     ` Heiko Stübner
2013-06-06 19:12     ` Heiko Stübner
2013-06-06 19:13   ` [PATCH v2 8/8] arm: add basic support for Rockchip RK3066a boards Heiko Stübner
2013-06-06 19:13     ` Heiko Stübner
2013-06-06 19:13     ` Heiko Stübner

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=201306071427.20512.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=arnd@arndb.de \
    --cc=cjb@laptop.org \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@linaro.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=jh80.chung@samsung.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=rob.herring@calxeda.com \
    --cc=tgih.jun@samsung.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /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.