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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user