netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: "Kweh, Hock Leong" <hock.leong.kweh@intel.com>,
	David Miller <davem@davemloft.net>
Cc: "rayagond@vayavyalabs.com" <rayagond@vayavyalabs.com>,
	"vbridgers2013@gmail.com" <vbridgers2013@gmail.com>,
	"wens@csie.org" <wens@csie.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ong, Boon Leong" <boon.leong.ong@intel.com>,
	"tobias.johannes.klausmann@mni.thm.de"
	<tobias.johannes.klausmann@mni.thm.de>
Subject: Re: [PATCH] net: stmmac: fix stmmac_pci_probe failed when CONFIG_HAVE_CLK is selected
Date: Wed, 24 Sep 2014 08:09:36 +0200	[thread overview]
Message-ID: <54226020.50008@st.com> (raw)
In-Reply-To: <F54AEECA5E2B9541821D670476DAE19C2B7EAF23@PGSMSX102.gar.corp.intel.com>

On 9/23/2014 9:03 AM, Kweh, Hock Leong wrote:
>> -----Original Message-----
>> From: Giuseppe CAVALLARO [mailto:peppe.cavallaro@st.com]
>> Sent: Tuesday, September 23, 2014 2:10 PM
>>
>> the logic is: the priv->stmmac_clk must be always provided from the platform
>> then we have two cases:
>>
>> 1) if priv->plat->clk_csr is also passed then it will be adopt in the
>>      mdio functions to program the Reg4[5:2]
>>      This was required in the past IIRC on SPEAr platforms.
>>
>> 2) if priv->plat->clk_csr is not passed from the platform then the
>>      priv->clk_csr will be set according to the priv->stmmac_clk
>>      and always used in the mdio part.
>>
>> So IIUC now you are asking for not passing the priv->stmmac_clk and warning
>> this event w/o failing. Why you cannot pass this clock?
>>
>> peppe
>
>
> Hi peppe,
>
> Appreciate for the explanation. Just to clarify that I am not asking not to pass in the priv->stmmac_clk.
> In fact, the fix will fail at case 2 if driver cannot obtain the priv->stmmac_clk, but just not the case 1.
> For case 1, seem like it does not require the stmmac_clk then I think it should be OK not to fail it when
> driver did not get stmmac_clk but have the clk_csr set.

ok we can do that but this clock is also managed when the iface is down.
Maybe it could be convenient to manage it for power consumption.
What do you think?

> Anyway, I can change the fix by adding the clock registration APIs being call at the stmmac_pci.c probe there before
> calling stmmac_dvr_probe. By doing this, it created a dependency to the pci driver that must have CONFIG_HAVE_CLK
> to be turned on. Besides, I would need you guys to provide me information on other platforms about what is the best
> value to set? Can I just set to zero since the stmmac_pci driver is always using the priv->plat->clk_csr?
>
>
> Regards,
> Wilson
>
>
>

  reply	other threads:[~2014-09-24  6:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 12:34 [PATCH] net: stmmac: fix stmmac_pci_probe failed when CONFIG_HAVE_CLK is selected Kweh Hock Leong
2014-09-18 14:49 ` Giuseppe CAVALLARO
2014-09-19  9:52   ` Kweh, Hock Leong
2014-09-22 18:19 ` David Miller
2014-09-23  1:16   ` Kweh, Hock Leong
2014-09-23  6:10     ` Giuseppe CAVALLARO
2014-09-23  7:03       ` Kweh, Hock Leong
2014-09-24  6:09         ` Giuseppe CAVALLARO [this message]
2014-09-24 10:48           ` Kweh, Hock Leong
2014-09-26 12:05             ` Giuseppe CAVALLARO
2014-09-26 12:12               ` Kweh, Hock Leong

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=54226020.50008@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=hock.leong.kweh@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rayagond@vayavyalabs.com \
    --cc=tobias.johannes.klausmann@mni.thm.de \
    --cc=vbridgers2013@gmail.com \
    --cc=wens@csie.org \
    /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).