* mvebu: Can we make the orion-mdio clock a requirement?
@ 2014-07-21 19:06 Ezequiel Garcia
2014-07-21 19:28 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Ezequiel Garcia @ 2014-07-21 19:06 UTC (permalink / raw)
To: netdev, linux-arm-kernel
Cc: Jason Cooper, Thomas Petazzoni, Gregory Clement,
Sebastian Hesselbarth, Andrew Lunn, netdev
Helly everyone,
Currently the mvmdio driver does not require a clock to be declared,
and instead this is optional.
However (almost) all the platforms that currently use it, i.e. the
Armada, Kirkwood and Dove SoCs, require some clock to be enabled before
the MDIO registers can be accessed.
The Orion5x SoC doesn't declare any clock for neither the ethernet node,
nor the MDIO node. Is that correct?
Do you think we could make the clock a required property in the mvmdio
devicetree node? How would that behave in the non-DT case?
Thanks,
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mvebu: Can we make the orion-mdio clock a requirement?
2014-07-21 19:06 mvebu: Can we make the orion-mdio clock a requirement? Ezequiel Garcia
@ 2014-07-21 19:28 ` Thomas Petazzoni
2014-07-21 20:12 ` Sebastian Hesselbarth
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-07-21 19:28 UTC (permalink / raw)
To: Ezequiel Garcia
Cc: netdev, linux-arm-kernel, Jason Cooper, Gregory Clement,
Sebastian Hesselbarth, Andrew Lunn
Dear Ezequiel Garcia,
On Mon, 21 Jul 2014 16:06:15 -0300, Ezequiel Garcia wrote:
> Currently the mvmdio driver does not require a clock to be declared,
> and instead this is optional.
>
> However (almost) all the platforms that currently use it, i.e. the
> Armada, Kirkwood and Dove SoCs, require some clock to be enabled before
> the MDIO registers can be accessed.
>
> The Orion5x SoC doesn't declare any clock for neither the ethernet node,
> nor the MDIO node. Is that correct?
There are no gatable clocks on Orion5x, so unless the driver really
wants a clock, there's no hard requirement to give a clock reference.
> Do you think we could make the clock a required property in the mvmdio
> devicetree node? How would that behave in the non-DT case?
I don't think the mvmdio driver is used in non-DT contexts.
However, yes, I tend to agree, making the clock mandatory would
probably be a good thing.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mvebu: Can we make the orion-mdio clock a requirement?
2014-07-21 19:28 ` Thomas Petazzoni
@ 2014-07-21 20:12 ` Sebastian Hesselbarth
2014-07-21 20:23 ` Thomas Petazzoni
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Hesselbarth @ 2014-07-21 20:12 UTC (permalink / raw)
To: Thomas Petazzoni, Ezequiel Garcia
Cc: netdev, linux-arm-kernel, Jason Cooper, Gregory Clement,
Andrew Lunn
On 07/21/2014 09:28 PM, Thomas Petazzoni wrote:
> On Mon, 21 Jul 2014 16:06:15 -0300, Ezequiel Garcia wrote:
>> Currently the mvmdio driver does not require a clock to be declared,
>> and instead this is optional.
>>
>> However (almost) all the platforms that currently use it, i.e. the
>> Armada, Kirkwood and Dove SoCs, require some clock to be enabled before
>> the MDIO registers can be accessed.
>>
>> The Orion5x SoC doesn't declare any clock for neither the ethernet node,
>> nor the MDIO node. Is that correct?
>
> There are no gatable clocks on Orion5x, so unless the driver really
> wants a clock, there's no hard requirement to give a clock reference.
>
>> Do you think we could make the clock a required property in the mvmdio
>> devicetree node? How would that behave in the non-DT case?
>
> I don't think the mvmdio driver is used in non-DT contexts.
>
> However, yes, I tend to agree, making the clock mandatory would
> probably be a good thing.
We can always pass TCLK on Orion5x if there is a need for a mandatory
clock. Anyway, IIRC clock framework should now properly return
-EPROPEDEFER only if there is a clock property set. If there is none,
the error is different and can be catched on Orion5x.
Sebastian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mvebu: Can we make the orion-mdio clock a requirement?
2014-07-21 20:12 ` Sebastian Hesselbarth
@ 2014-07-21 20:23 ` Thomas Petazzoni
2014-07-22 23:46 ` Ezequiel Garcia
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-07-21 20:23 UTC (permalink / raw)
To: Sebastian Hesselbarth
Cc: Ezequiel Garcia, netdev, linux-arm-kernel, Jason Cooper,
Gregory Clement, Andrew Lunn
Dear Sebastian Hesselbarth,
On Mon, 21 Jul 2014 22:12:45 +0200, Sebastian Hesselbarth wrote:
> > However, yes, I tend to agree, making the clock mandatory would
> > probably be a good thing.
>
> We can always pass TCLK on Orion5x if there is a need for a mandatory
> clock. Anyway, IIRC clock framework should now properly return
> -EPROPEDEFER only if there is a clock property set. If there is none,
> the error is different and can be catched on Orion5x.
Yes, I already use tclk on Orion5x for various clock references.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mvebu: Can we make the orion-mdio clock a requirement?
2014-07-21 20:23 ` Thomas Petazzoni
@ 2014-07-22 23:46 ` Ezequiel Garcia
0 siblings, 0 replies; 5+ messages in thread
From: Ezequiel Garcia @ 2014-07-22 23:46 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Sebastian Hesselbarth, netdev, linux-arm-kernel, Jason Cooper,
Gregory Clement, Andrew Lunn
On 21 Jul 10:23 PM, Thomas Petazzoni wrote:
> On Mon, 21 Jul 2014 22:12:45 +0200, Sebastian Hesselbarth wrote:
>
> > > However, yes, I tend to agree, making the clock mandatory would
> > > probably be a good thing.
> >
> > We can always pass TCLK on Orion5x if there is a need for a mandatory
> > clock. Anyway, IIRC clock framework should now properly return
> > -EPROPEDEFER only if there is a clock property set. If there is none,
> > the error is different and can be catched on Orion5x.
>
> Yes, I already use tclk on Orion5x for various clock references.
>
Since we all agree, I'll prepare a patchset changing the mvmdio devicetree
binding so the clock is required.
On the driver side, we can only print a warning if the clock is missing,
to keep compatibility.
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-07-22 23:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-21 19:06 mvebu: Can we make the orion-mdio clock a requirement? Ezequiel Garcia
2014-07-21 19:28 ` Thomas Petazzoni
2014-07-21 20:12 ` Sebastian Hesselbarth
2014-07-21 20:23 ` Thomas Petazzoni
2014-07-22 23:46 ` Ezequiel Garcia
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).