[U-Boot] [PATCH 2/4] net: dm: fec: Fix phy-reset-duration clamping and defaults

Joe Hershberger joe.hershberger at ni.com
Mon Oct 22 20:54:52 UTC 2018


On Thu, Oct 4, 2018 at 1:02 PM Martin Fuzzey
<martin.fuzzey at flowbird.group> 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 <martin.fuzzey at flowbird.group>

Acked-by: Joe Hershberger <joe.hershberger at ni.com>


More information about the U-Boot mailing list