All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Chen-Yu Tsai <wens@csie.org>,
	Mike Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Jens Kuske <jenskuske@gmail.com>,
	Vishnu Patekar <vishnupatekar0510@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused
Date: Thu, 11 Feb 2016 10:53:15 +0100	[thread overview]
Message-ID: <20160211095315.GJ31506@lukather> (raw)
In-Reply-To: <20160210180420.0968c2018bf5fbe54a28a505@free.fr>

[-- Attachment #1: Type: text/plain, Size: 1610 bytes --]

Hi,

On Wed, Feb 10, 2016 at 06:04:20PM +0100, Jean-Francois Moine wrote:
> On Wed, 10 Feb 2016 13:53:33 +0100
> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> > > I don't agree:
> > > - you changed the DTs of many SoCs without any valid reason,
> > 
> > I did give you a significant number of reasons [1]. The fact that you
> > chose to ignore them is up to you.
> 
> Sorry, I don't see any reason for changing the DT definition of the pll6.
> The clock is named "pll6" with "#clock-cells = <1>;" in all DTs,
> and it works as it is.
> If you want an other clock as "pll8", with the same HW description,
> you must add new code for this clock.

That's not how it works. If an hardware block is strictly identical,
then it should use the same compatible.

The PLL8 is exactly the same one than PLL6, therefore it should use
the same compatible.

> > Except that it doesn't match the hardware and that the parenthood
> > relationship is inversed. The pll6 output is 24 MHz * n * k / 2, as
> > seen in any datasheet that uses it. Your clock driver doesn't
> > represent that fact.
> 
> The datasheet says that the pll6x2 output is 24 MHz * n * k, then, if
> I remember correctly my lessons at primary school, defining pll6 as
> (pll6x2 / 2) gives 24 MHz * n * k / 2 as the pll6 output. No?

Or, you could keep the same parenting relationship that we had and use
a simpler model. Ever heard of Occam's razor (and quite literally for
once)?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused
Date: Thu, 11 Feb 2016 10:53:15 +0100	[thread overview]
Message-ID: <20160211095315.GJ31506@lukather> (raw)
In-Reply-To: <20160210180420.0968c2018bf5fbe54a28a505@free.fr>

Hi,

On Wed, Feb 10, 2016 at 06:04:20PM +0100, Jean-Francois Moine wrote:
> On Wed, 10 Feb 2016 13:53:33 +0100
> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
> 
> > > I don't agree:
> > > - you changed the DTs of many SoCs without any valid reason,
> > 
> > I did give you a significant number of reasons [1]. The fact that you
> > chose to ignore them is up to you.
> 
> Sorry, I don't see any reason for changing the DT definition of the pll6.
> The clock is named "pll6" with "#clock-cells = <1>;" in all DTs,
> and it works as it is.
> If you want an other clock as "pll8", with the same HW description,
> you must add new code for this clock.

That's not how it works. If an hardware block is strictly identical,
then it should use the same compatible.

The PLL8 is exactly the same one than PLL6, therefore it should use
the same compatible.

> > Except that it doesn't match the hardware and that the parenthood
> > relationship is inversed. The pll6 output is 24 MHz * n * k / 2, as
> > seen in any datasheet that uses it. Your clock driver doesn't
> > represent that fact.
> 
> The datasheet says that the pll6x2 output is 24 MHz * n * k, then, if
> I remember correctly my lessons at primary school, defining pll6 as
> (pll6x2 / 2) gives 24 MHz * n * k / 2 as the pll6 output. No?

Or, you could keep the same parenting relationship that we had and use
a simpler model. Ever heard of Occam's razor (and quite literally for
once)?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160211/3ad2c0ce/attachment.sig>

  reply	other threads:[~2016-02-11  9:53 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 20:20 [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused Maxime Ripard
2016-02-01 20:20 ` Maxime Ripard
2016-02-04 12:05 ` Maxime Ripard
2016-02-04 12:05   ` Maxime Ripard
2016-02-04 15:25   ` Jean-Francois Moine
2016-02-04 15:25     ` Jean-Francois Moine
2016-02-10 12:53     ` Maxime Ripard
2016-02-10 12:53       ` Maxime Ripard
2016-02-10 17:04       ` Jean-Francois Moine
2016-02-10 17:04         ` Jean-Francois Moine
2016-02-11  9:53         ` Maxime Ripard [this message]
2016-02-11  9:53           ` Maxime Ripard
2016-02-05 17:59 ` Andre Przywara
2016-02-05 17:59   ` Andre Przywara
2016-02-10 12:30   ` breaking DT compatibility (was: Re: [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused) Andre Przywara
2016-02-10 12:30     ` Andre Przywara
2016-02-10 13:42     ` Rob Herring
2016-02-10 13:42       ` Rob Herring
2016-02-10 14:37       ` Maxime Ripard
2016-02-10 14:37         ` Maxime Ripard
2016-02-10 14:45         ` Arnd Bergmann
2016-02-10 14:45           ` Arnd Bergmann
2016-02-10 14:45           ` Arnd Bergmann
2016-02-10 16:14         ` breaking DT compatibility Andre Przywara
2016-02-10 16:14           ` Andre Przywara
2016-02-11 10:16           ` Maxime Ripard
2016-02-11 10:16             ` Maxime Ripard
2016-02-10 16:30         ` breaking DT compatibility (was: Re: [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused) Mark Rutland
2016-02-10 16:30           ` Mark Rutland
2016-02-11 10:00           ` Maxime Ripard
2016-02-11 10:00             ` Maxime Ripard
2016-02-11 11:44             ` Mark Rutland
2016-02-11 11:44               ` Mark Rutland
2016-02-11 12:29               ` breaking DT compatibility Andre Przywara
2016-02-11 12:29                 ` Andre Przywara
2016-02-11 17:08               ` breaking DT compatibility (was: Re: [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused) Maxime Ripard
2016-02-11 17:08                 ` Maxime Ripard
2016-02-12  9:40                 ` Lucas Stach
2016-02-12  9:40                   ` Lucas Stach
2016-02-12  9:40                   ` Lucas Stach
2016-02-16  8:44                   ` Maxime Ripard
2016-02-16  8:44                     ` Maxime Ripard
2016-02-16 19:40                     ` Michael Turquette
2016-02-16 19:40                       ` Michael Turquette
2016-02-16 19:40                       ` Michael Turquette
2016-02-16 21:11                       ` Rob Herring
2016-02-11 14:51             ` Richard Cochran
2016-02-11 14:51               ` Richard Cochran
2016-02-11 15:16               ` breaking DT compatibility Andre Przywara
2016-02-11 15:16                 ` Andre Przywara
2016-02-11 21:46             ` breaking DT compatibility (was: Re: [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused) Rob Herring
2016-02-11 21:46               ` Rob Herring
2016-02-11 21:46               ` Rob Herring
2016-02-10 12:59   ` [PATCH v4] clk: sunxi: Refactor A31 PLL6 so that it can be reused Maxime Ripard
2016-02-10 12:59     ` Maxime Ripard
2016-02-10 14:02     ` Rob Herring
2016-02-10 14:02       ` Rob Herring
2016-02-11  9:41       ` Maxime Ripard
2016-02-11  9:41         ` Maxime Ripard
2016-02-10 18:41     ` Mark Rutland
2016-02-10 18:41       ` Mark Rutland

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=20160211095315.GJ31506@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=hdegoede@redhat.com \
    --cc=jenskuske@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=moinejf@free.fr \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=vishnupatekar0510@gmail.com \
    --cc=wens@csie.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.