git.openpandora.org
/
pandora-u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
118a10e
)
net: rswitch: Do not register disabled ports as ethernet devices
author
Marek Vasut
<marek.vasut+renesas@mailbox.org>
Sat, 21 Dec 2024 21:48:19 +0000
(22:48 +0100)
committer
Marek Vasut
<marek.vasut+renesas@mailbox.org>
Sun, 22 Dec 2024 21:34:32 +0000
(22:34 +0100)
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>
drivers/net/rswitch.c
patch
|
blob
|
history
diff --git
a/drivers/net/rswitch.c
b/drivers/net/rswitch.c
index
97b5d1b
..
57eff74
100644
(file)
--- 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);