mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Stefan Christ <s.christ@phytec.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/3] net: fec: implement dtb property phy-reset-duration
Date: Tue, 17 Nov 2015 10:32:13 +0100	[thread overview]
Message-ID: <20151117093213.GO8526@pengutronix.de> (raw)
In-Reply-To: <20151116101705.GA19657@lws-christ>

On Mon, Nov 16, 2015 at 11:17:05AM +0100, Stefan Christ wrote:
> Hi,
>   
> > shouldn't this be msec = 1000.
> > 
> > Here you set it to 1ms if it used to be over 1s.
> 
> Yeah, that would be the obvious and plausible thing to do, but the driver in
> the linux kernel does it this way and it's documented in the device tree
> bindings.  So I'm not sure if we can change the default behavior here.

Yes, we can ;)

The rationale behind this code may be: The reset duration is
unreasonably high (>1s), so that it to a sane default (1ms).

I suggest to drop the check completely. If someone ever starts barebox
with an insanely high value (maybe he thought the value is in us) then
he won't notice the mistake if barebox silently falls back to 1ms as
duration. If instead barebox waits for multiple seconds then he will
notice and it the device tree which is what we want.

Sascha


> 
> Mit freundlichen Grüßen / Kind regards,
> 	Stefan Christ
> 
> On Mon, Nov 16, 2015 at 11:03:32AM +0100, Holger Schurig wrote:
> > 2015-11-16 10:00 GMT+01:00 Stefan Christ <s.christ@phytec.de>:
> > 
> > > +               /* A sane reset duration should not be longer than 1s */
> > > +               if (msec > 1000)
> > > +                       msec = 1;
> > >
> > 
> > Hi Stefan,
> > 
> > shouldn't this be msec = 1000.
> > 
> > Here you set it to 1ms if it used to be over 1s.
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-11-17  9:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16  9:00 [PATCH 1/3] net: fec: set phy reset time to 1ms Stefan Christ
2015-11-16  9:00 ` [PATCH 2/3] net: fec: implement dtb property phy-reset-duration Stefan Christ
     [not found]   ` <CAOpc7mGnHmYOVvOWygYUs+1dqdsZYtW-T=8ruNwDt-U1bQNvMg@mail.gmail.com>
2015-11-16 10:17     ` Stefan Christ
2015-11-17  9:32       ` Sascha Hauer [this message]
2015-11-17 14:38         ` [PATCH 2/3] net: fec: implement dtb property phy-reset-durationy Stefan Christ
2015-11-17 19:18           ` Sascha Hauer
2015-11-16  9:00 ` [PATCH 3/3] net: fec: fix indentation and whitspaces Stefan Christ

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=20151117093213.GO8526@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.christ@phytec.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox