From: Rob Herring <robherring2@gmail.com>
To: "Emilio López" <emilio@elopez.com.ar>
Cc: "Olof Johansson" <olof@lixom.net>,
"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: Fri, 13 Sep 2013 09:00:48 -0500 [thread overview]
Message-ID: <CAL_JsqJACEtSRaDg0TcYODzhpsHFGa4mFSYa_R3qspypEKH+hQ@mail.gmail.com> (raw)
In-Reply-To: <52326ADC.8040703@elopez.com.ar>
On Thu, Sep 12, 2013 at 8:31 PM, Emilio López <emilio@elopez.com.ar> wrote:
> 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>;
> };
Better, but this is still wrong. DT describes the hardware. There is
no such h/w as a simple-memory-controller. The fact that you have a
simple-memory-ctrlr kernel driver is a kernel
feature/artifact/limitation. Describe the h/w with a meaningful
compatible string and put that string in the simple memory controller
driver match table. If someday we have a real driver for said memory
controller, then it is only a kernel change to use a different driver.
Rob
next prev parent reply other threads:[~2013-09-13 14:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 1:43 [PATCH RFC] of: add a basic memory driver Emilio López
2013-09-11 7:54 ` Maxime Ripard
2013-09-11 9:34 ` Emilio López
2013-09-12 0:21 ` Mike Turquette
2013-09-11 16:40 ` Rob Herring
2013-09-13 0:30 ` [PATCH] memory: add a basic OF-based " Emilio López
[not found] ` <1379032225-6425-1-git-send-email-emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org>
2013-09-13 0:57 ` Olof Johansson
[not found] ` <CAOesGMiUMniKRLRgGPsimR0bXWQFbx+SL5dUJXOb8t0JfEcHsg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-13 1:31 ` Emilio López
2013-09-13 14:00 ` Rob Herring [this message]
[not found] ` <CAL_JsqJACEtSRaDg0TcYODzhpsHFGa4mFSYa_R3qspypEKH+hQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-13 15:49 ` Olof Johansson
2013-09-15 12:43 ` Grant Likely
[not found] ` <20130915124325.B1DF2C42C5C-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
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=CAL_JsqJACEtSRaDg0TcYODzhpsHFGa4mFSYa_R3qspypEKH+hQ@mail.gmail.com \
--to=robherring2@gmail.com \
--cc=david.lanzendoerfer@o2s.ch \
--cc=devicetree@vger.kernel.org \
--cc=emilio@elopez.com.ar \
--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;
as well as URLs for NNTP newsgroup(s).