public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Emilio López" <emilio@elopez.com.ar>
To: Olof Johansson <olof@lixom.net>
Cc: "Mike Turquette" <mturquette@linaro.org>,
	"Maxime Ripard" <maxime.ripard@free-electrons.com>,
	"Grant Likely" <grant.likely@linaro.org>,
	"Rob Herring" <rob.herring@calxeda.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"David Lanzendörfer" <david.lanzendoerfer@o2s.ch>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] memory: add a basic OF-based memory driver
Date: Thu, 12 Sep 2013 22:31:08 -0300	[thread overview]
Message-ID: <52326ADC.8040703@elopez.com.ar> (raw)
In-Reply-To: <CAOesGMiUMniKRLRgGPsimR0bXWQFbx+SL5dUJXOb8t0JfEcHsg@mail.gmail.com>

Hi Olof,

El 12/09/13 21:57, Olof Johansson escribió:
> On Thu, Sep 12, 2013 at 5:30 PM, Emilio López <emilio@elopez.com.ar> wrote:
>> This driver's only job is to claim and ensure the necessary clock
>> for memory operation on a DT-powered machine remains enabled.
>>
>> Signed-off-by: Emilio López <emilio@elopez.com.ar>
>> ---
>>
>> I believe this new patch should resolve all the concerns raised; as
>> always, all feedback is welcome :)
>
> I think you're going about this the wrong way.
>
> If you have a problem with a clock not staying on, shouldn't you just
> marking it appropriately in the clock table instead, making sure it's
> initialized with at least one reference to it?

If by "the clock table" you mean the tree as handled by the common clock 
framework, there is no such flag available as of today; see Mike's reply 
for more information.

Personally I feel that if the general case can solve our problems (in 
this case, having a consumer who prepares and enables the clock), we 
should avoid adding special cases to the framework.

> I believe that is how
> some of the other platforms handle this, and it's a lot cleaner than
> adding a fake binding and a fake driver just to grab a single clock.

The binding doesn't have to be fake; it is actually describing the 
memory controller hardware:

mc: mc@0123000 {
	compatible = "simple-memory-controller";
	reg = <0x0123000 0x400>;
	clocks = <&pll5 1>;
};

If one day we get docs and/or have any special features we may need from 
the controller, we can use something like

mc: mc@0123000 {
	compatible = "vendor,awesome-mc", "simple-memory-controller";
	reg = <0x0123000 0x400>;
	clocks = <&pll5 1>;
};

Cheers,

Emilio


  reply	other threads:[~2013-09-13  1:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1378863781-4235-1-git-send-email-emilio@elopez.com.ar>
2013-09-13  0:30 ` [PATCH] memory: add a basic OF-based memory driver Emilio López
2013-09-13  0:57   ` Olof Johansson
2013-09-13  1:31     ` Emilio López [this message]
2013-09-13 14:00       ` Rob Herring
2013-09-13 15:49         ` Olof Johansson
     [not found]           ` <20130915124325.B1DF2C42C5C@trevor.secretlab.ca>
2013-09-16 12:55             ` Rob Herring

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=52326ADC.8040703@elopez.com.ar \
    --to=emilio@elopez.com.ar \
    --cc=david.lanzendoerfer@o2s.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=rob.herring@calxeda.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox