From: Marek Vasut Date: Sat, 21 Dec 2024 21:48:19 +0000 (+0100) Subject: net: rswitch: Do not register disabled ports as ethernet devices X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=70da4f28592d0a2296b27a9126da97cc3b30891e;p=u-boot.git net: rswitch: Do not register disabled ports as ethernet devices In case an rswitch port is described as disabled in DT, do not register it as ethernet device in U-Boot. This way, such ports cannot be accessed from U-Boot command line. Signed-off-by: Marek Vasut --- diff --git a/drivers/net/rswitch.c b/drivers/net/rswitch.c index 97b5d1b75c..57eff748c9 100644 --- a/drivers/net/rswitch.c +++ b/drivers/net/rswitch.c @@ -1113,6 +1113,9 @@ static int rswitch_bind(struct udevice *parent) return -ENOENT; ofnode_for_each_subnode(node, ports_np) { + if (!ofnode_is_enabled(node)) + continue; + ret = device_bind_with_driver_data(parent, drv, ofnode_get_name(node), (ulong)priv, node, &dev);