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 <marek.vasut+renesas@mailbox.org>
This commit is contained in:
Marek Vasut
2024-12-21 22:48:19 +01:00
parent 118a10e1dd
commit 70da4f2859

View File

@@ -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);