All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv4 3/3] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
Date: Wed, 10 May 2017 23:19:42 +0200	[thread overview]
Message-ID: <6dceffa8-4e3e-07c3-6a6a-225b99d39585@linaro.org> (raw)
In-Reply-To: <CAPnjgZ3CjT8iXXSVbVqFAu5COHgAgBNjw2D5QvtG3w=pEL-mMw@mail.gmail.com>

On 05/10/2017 09:42 PM, Simon Glass wrote:
>>>>>> updating pl01x is not a big deal I dont think; however this will
>>>>>> mean requiring a platform specific clock driver to just use the
>>>>>> pl01x - which will take me some time to get into uboot for my
>>>>>> platform (and the same might happen to other users).
>>>>> Ah right.  So the flip side here, is one not allowed to have the clock
>>>>> property anymore?  Yes, it may not be used in the kernel, but has
>>>>> someone argued that it's not part of the hardware description?
>>>> First I've ever seen a "clock" property. We have "clocks" from the
>>>> clock binding which is a phandle plus #clock-cells number of args. We
>>>> also have "clock-frequency" which is just the frequency value and has
>>>> been around forever. Why u-boot went off and did something different i
>>>> don't know. Sigh. What I can say is a 3rd way is not going to be
>>>> accepted.
>>> Aw crap, I'm in the wrong.  I was thinking this was "clock-frequency"
>>> and not that we had invented our own property here.
>>>
>>>> Generally, the clock binding replaces clock-frequency, but there are
>>>> some cases where clock binding would be overkill or too complicated
>>>> for early boot and using clock-frequency would be okay. But I don't
>>>> think "I haven't written my platform clock controller driver yet" is a
>>>> reason to use clock-frequency as generally most platforms are going to
>>>> have to have one. Providing a stub driver that just returns a fixed
>>>> frequency shouldn't be too hard IMO.
>>> So, trying to dig out of the hole we made here.  The generic serial
>>> binding (bindings/serial/serial.txt) documents clock-frequency.  The
>>> pl011 binding (and primecell which it also references) does not.  Would
>>> adding clock-frequency to a pl011 node be valid or invalid?
>> Valid in general. It's a common property in the DT spec. Though, it
>> should be listed in the pl011 binding doc as used just like we list
>> reg or interrupts.
>>
>>>   If valid,
>>> would it also be acceptable to include in dts files that also fill in
>>> clocks/clock-names from that binding?
>> Generally we treat that as not valid as they are mutually exclusive.
>>
>> There's 2 better options. You can define fixed clocks with
>> "fixed-clock" compatible and you already have infrastructure in u-boot
>> to use that. However, the upstream dts file already defines clocks, so
>> that doesn't really work here. The 2nd option is have a table of clock
>> ids and frequencies and register that list of clocks based on matching
>> the clock controller. You'd need a little bit of infrastructure to
>> support that, but otherwise a platform would just need to define a
>> table.
> It sounds like you are saying the first option isn't an option. The
> second option adds another layer of pain - we are trying to avoid
> having platform data.
>
> I'd prefer (in this order):
>
> 1. A clock driver

please could you explain the rationale for this request on this 
particular platform?

And I mean for a platform where a clock driver will:

1. NOT access any hardware
2. *only* provide single hard-coded value (a compiled in frequency) for 
the pl01x driver.

Consider also (another option) that the pl01x driver can be compiled 
without OF support and that said frequency can be provided by CONFIG.

It is just that before adding layers of stub code I would like to 
understand the technical need when there is only one consumer (I don't 
want to pollute U-Boot's code base with code that is not providing value).

What do we want to achieve by writing a SoC clock driver that hard-codes 
the frequency rate for the console?
what is the benefit of having such a driver and why is this not an 
overkill on this platform?


> 2. Use the existing clock-frequency property

yes, this I could understand.
And it doesn't even need to add a single line to the linux kernel dts 
files which would be imported from the linux kernel tree and keep 
unmodified.

  reply	other threads:[~2017-05-10 21:19 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 16:36 [U-Boot] Patchset v4 Poplar 96Boards EE Jorge Ramirez-Ortiz
2017-05-08 16:36 ` [U-Boot] [PATCHv4 1/3] ARM64: dts: hi3798cv200-poplar: add device tree bindings Jorge Ramirez-Ortiz
2017-05-08 16:36 ` [U-Boot] [PATCHv4 2/3] driver: mmc: update debug info Jorge Ramirez-Ortiz
2017-05-08 16:36 ` [U-Boot] [PATCHv4 3/3] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards Jorge Ramirez-Ortiz
2017-05-08 17:29   ` Tom Rini
2017-05-08 18:36     ` Jorge Ramirez
2017-05-08 21:37       ` Tom Rini
2017-05-09 15:27     ` Jorge Ramirez
2017-05-10  2:30       ` Tom Rini
2017-05-10  9:33         ` Jorge Ramirez
2017-05-10 14:49           ` Tom Rini
2017-05-10 16:33             ` Rob Herring
2017-05-10 17:45               ` Tom Rini
2017-05-10 18:09                 ` Simon Glass
2017-05-10 19:09                 ` Rob Herring
2017-05-10 19:42                   ` Simon Glass
2017-05-10 21:19                     ` Jorge Ramirez [this message]
2017-05-10 21:31                       ` Simon Glass
2017-05-11 11:45                         ` Jorge Ramirez
2017-05-11 12:35                     ` Tom Rini
2017-05-11 14:34                       ` Jorge Ramirez
2017-05-11 22:32                         ` Tom Rini
2017-05-12  8:16                           ` Jorge Ramirez
2017-05-12 12:35                             ` Tom Rini
2017-05-15 21:38                               ` Rob Herring
2017-05-17 13:33                                 ` Tom Rini
2017-05-17 14:38                                   ` Rob Herring
2017-05-17 22:13                                     ` Tom Rini
2017-05-17 22:06                         ` Tom Rini
2017-05-25 18:38                           ` Jorge Ramirez
2017-05-25 20:31                             ` Tom Rini
2017-05-25 20:55                               ` Jorge Ramirez
2017-05-25 20:58                                 ` Jorge Ramirez
2017-05-25 21:12                                   ` Tom Rini
2017-05-25 21:16                                     ` Jorge Ramirez
2017-05-25 22:08                                       ` Tom Rini
2017-05-26  7:28                                         ` Jorge Ramirez
2017-05-26  7:46                                           ` Jorge Ramirez
2017-05-26 12:46                                           ` Tom Rini
2017-05-26 12:58                                             ` Jorge Ramirez Ortiz
2017-05-26 16:09                                               ` Tom Rini
2017-05-29  9:00                                                 ` Jorge Ramirez
2017-05-29 11:57                                                   ` Tom Rini
2017-05-29 12:18                                                     ` Jorge Ramirez
2017-05-29 12:23                                                       ` Jorge Ramirez
2017-05-29 12:26                                                       ` Tom Rini
2017-05-29 12:28                                                         ` Jorge Ramirez
2017-05-25 21:21                                     ` Simon Glass
2017-05-25 22:09                                       ` Tom Rini
2017-05-10 17:49               ` Jorge Ramirez
2017-05-10 18:21                 ` Rob Herring
2017-05-10 18:37                   ` Jorge Ramirez
2017-05-25 16:08   ` Andreas Färber

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=6dceffa8-4e3e-07c3-6a6a-225b99d39585@linaro.org \
    --to=jorge.ramirez-ortiz@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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.