From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Mon, 22 Oct 2018 20:54:51 +0000 Subject: [U-Boot] [PATCH 2/4] net: dm: fec: Fix phy-reset-duration clamping and defaults In-Reply-To: <1538675965-4495-3-git-send-email-martin.fuzzey@flowbird.group> References: <1538675965-4495-1-git-send-email-martin.fuzzey@flowbird.group> <1538675965-4495-3-git-send-email-martin.fuzzey@flowbird.group> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Oct 4, 2018 at 1:02 PM Martin Fuzzey wrote: > > The DT binding says: > - phy-reset-duration : Reset duration in milliseconds. Should present > only if property "phy-reset-gpios" is available. Missing the property > will have the duration be 1 millisecond. Numbers greater than 1000 are > invalid and 1 millisecond will be used instead. > > However the current code: > - clamps values greater than 1000ms to 1000ms rather than 1. > - does not initialize the delay if the property does not exist > (else clause mismatch) > - returns an error if phy-reset-gpios is not defined > > Fix all this and simplify by using dev_read_u32_default() > > Signed-off-by: Martin Fuzzey Acked-by: Joe Hershberger