From: Andrew Lunn <andrew@lunn.ch>
To: Iyappan Subramanian <isubramanian@apm.com>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
netdev <netdev@vger.kernel.org>, patches <patches@apm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
David Miller <davem@davemloft.net>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/5] drivers: net: phy: Add MDIO driver
Date: Tue, 5 Jul 2016 15:49:50 +0200 [thread overview]
Message-ID: <20160705134950.GC5230@lunn.ch> (raw)
In-Reply-To: <CAKh23FmaQy8J=f-eyfBeNndz0oT5R0icvwJ3vrw1DMJnj9uv_g@mail.gmail.com>
On Mon, Jun 06, 2016 at 10:12:35AM -0700, Iyappan Subramanian wrote:
> Hi Andrew,
>
> Thanks for the review.
>
> On Tue, May 31, 2016 at 6:11 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> > On Tue, May 31, 2016 at 05:10:38PM -0700, Iyappan Subramanian wrote:
> >> +static int xgene_mdio_reset(struct xgene_mdio_pdata *pdata)
> >> +{
> >> + int ret;
> >> +
> >> + if (pdata->mdio_id == XGENE_MDIO_RGMII) {
> >> + if (pdata->dev->of_node) {
> >> + clk_prepare_enable(pdata->clk);
> >> + clk_disable_unprepare(pdata->clk);
> >> + clk_prepare_enable(pdata->clk);
> >
> > Hi Iyappan
> >
> > Is that a workaround for a hardware problem? If so, i would suggest
> > adding a comment, to stop people submitting a patch simplifying it.
>
> Hardware expects this clock sequence. I'll add comment as you suggested.
What exactly does the hardware require? Is this a workaround for a bug
in the clock generator? Or a workaround for a bug in the MDIO device?
If it is a clock generator bug, i think the fix should be in the clock
driver. If this is bug in the MDIO device, do you need a sleep in
there, so you actually have the clock ticking/not ticking for a time?
Since these calls can all sleep, you have no idea how long/sort the
clock will be enabled/disabled.
Andrew
next prev parent reply other threads:[~2016-07-05 13:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 0:10 [PATCH v2 0/5] drivers: net: xgene: Fix 1G hot-plug and module support Iyappan Subramanian
2016-06-01 0:10 ` [PATCH v2 1/5] drivers: net: xgene: MAC and PHY configuration changes Iyappan Subramanian
2016-06-01 0:10 ` [PATCH v2 2/5] drivers: net: xgene: Backward compatibility with older firmware Iyappan Subramanian
2016-06-01 0:10 ` [PATCH v2 3/5] drivers: net: phy: Add MDIO driver Iyappan Subramanian
[not found] ` <1464739840-21971-4-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2016-06-01 1:11 ` Andrew Lunn
2016-06-06 17:12 ` Iyappan Subramanian
2016-07-05 13:49 ` Andrew Lunn [this message]
2016-07-06 23:44 ` Iyappan Subramanian
[not found] ` <CAKh23FnvgWRMo=M35Mj4=a_KeUpvOoHa8stU=bSk9Y3VSRtyzQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-07-07 14:03 ` Andrew Lunn
2016-07-07 14:14 ` Russell King - ARM Linux
[not found] ` <20160707141422.GQ1041-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2016-07-07 22:58 ` Iyappan Subramanian
2016-07-07 22:57 ` Iyappan Subramanian
[not found] ` <1464739840-21971-1-git-send-email-isubramanian-qTEPVZfXA3Y@public.gmane.org>
2016-06-01 0:10 ` [PATCH v2 4/5] dtb: xgene: Add MDIO node Iyappan Subramanian
2016-06-01 0:10 ` [PATCH v2 5/5] drivers: net: xgene: Fix module load/unload crash Iyappan Subramanian
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=20160705134950.GC5230@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=isubramanian@apm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=patches@apm.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).