[U-Boot] [PATCH] eth: mtk-eth: fix incorrect read of phy-handle

Joe Hershberger joe.hershberger at ni.com
Wed May 8 22:57:19 UTC 2019


On Sun, Apr 28, 2019 at 2:09 AM Weijie Gao <weijie.gao at mediatek.com> wrote:
>
> In mt7629-rfb.dts, the phy-handle is a reference to the node phy0, not the
> node itself:
>
>         phy-handle = <&phy0>;
>
>         phy0: ethernet-phy at 0 {
>                 reg = <0>;
>         }
>
> However the driver used ofnode_find_subnode("phy-handle") to read the node.
> It will always fail.
>
> This patch replaces ofnode_find_subnode with dev_read_phandle_with_args to
> make sure the node can be read correctly.
>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>

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


More information about the U-Boot mailing list