lkml.org 
[lkml]   [2021]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 18/18] arm64: apple: Add initial Mac Mini 2020 (M1) devicetree
Date
On 10/02/2021 20.34, Tony Lindgren wrote:
> * Hector Martin <marcan@marcan.st> [210210 11:14]:
>> That means it'll end up like this (so that we can have more than one
>> fixed-clock):
>>
>> clocks {
>> #address-cells = <1>;
>> #size-cells = <0>;
>>
>> clk123: clock@0 {
>> ...
>> reg = <0>
>> }
>>
>> clk456: clock@1 {
>> ...
>> reg = <1>
>> }
>> }
>>
>> Correct?
>
> Yeah, just don't use an imaginary dummy index for the reg. Use a real
> register offset from a clock controller instance base, and a register
> bit offset too if needed.

I mean for fixed input clocks without any particular numbering, or for
temporary fake clocks while we figure out the clock controller. Once a
real clock controller is involved, if there are hardware indexes
involved that are consistent then of course I'll use those in some way
that makes sense.

The purpose of the clock in this particular case is just to make the
uart driver work, since it wants to know its reference clock; there is
work to be done here to figure out the real clock tree (e.g. we don't
even know yet if the uart supports alternate clocks, that's tricky to
test until we have some form of I/O other than uart!).

> Doing it right will save you tons of time later on ;)

Absolutely, I'm just pointing out that instances of it being done right
are in short supply right now :-) (which makes it tricky for people like
me, trying to put this together for a new soc, to guess what the right
approach is by looking at existing examples)

--
Hector Martin (marcan@marcan.st)
Public Key: https://mrcn.st/pub

\
 
 \ /
  Last update: 2021-02-10 12:49    [W:0.091 / U:4.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site