Tim Wawrzynczak has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
device: Allow scan_generic_bus to recurse on pseudo-devices
To handle cases of pseudo-devices containing a child device, e.g., power resources, recurse onto them, treating them like a bus.
Change-Id: Ia8442939ef1e840c112ad4dd23e324afd99ff7d3 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/device/root_device.c 1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/35074/1
diff --git a/src/device/root_device.c b/src/device/root_device.c index f8e2907..ec24ff5 100644 --- a/src/device/root_device.c +++ b/src/device/root_device.c @@ -112,6 +112,13 @@
printk(BIOS_DEBUG, "%s %s\n", dev_path(child), child->enabled ? "enabled" : "disabled"); + + /* + * To handle cases of pseudo-devices containing a child + * device when it's not explicitly a bus, e.g., power + * resources, we recurse into them. + */ + scan_generic_bus(child); } }
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 2:
That sounds like it would fix the issue I'm seeing in CB:33033, too. I'll do some tests with it.
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c@12... PS3, Line 120: */ Is it that this was never a full depth-first traversal? But now it is?
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c@12... PS3, Line 120: */
Is it that this was never a full depth-first traversal? But now it is?
Correct, the power resource would have to be declared as a bus type otherwise. Which would be doable.
Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c@12... PS3, Line 120: */
Correct, the power resource would have to be declared as a bus type otherwise. […]
declaring it a bus type also requires the correct function to be called on it based on type, right? Otherwise the call below wouldn't get past the link_list check?
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c@12... PS3, Line 120: */
declaring it a bus type also requires the correct function to be called on it based on type, right? […]
Correct, it would also require changing sconfig to add a new keyword for power resources making them a bus so it generates an extra struct bus in between it and the controller.
Hello Aaron Durbin, Patrick Rudolph, Julius Werner, Subrata Banik, Duncan Laurie, Paul Menzel, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35074
to look at the new patch set (#4).
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
device: Allow scan_generic_bus to recurse on pseudo-devices
To handle cases of pseudo-devices containing a child device, e.g., power resources, recurse onto them, treating them like a bus.
Note: This means that a full depth-first traversal of the device tree will take place. If there are no other device trees with a device nested under another device, this shouldn't impact any other boards.
Change-Id: Ia8442939ef1e840c112ad4dd23e324afd99ff7d3 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/device/root_device.c 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/35074/4
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/35074/4/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/4/src/device/root_device.c@12... PS4, Line 120: * trailing whitespace
Hello Aaron Durbin, Patrick Rudolph, Julius Werner, Subrata Banik, Duncan Laurie, Paul Menzel, build bot (Jenkins), Nico Huber, Patrick Georgi, Martin Roth, Furquan Shaikh,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35074
to look at the new patch set (#5).
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
device: Allow scan_generic_bus to recurse on pseudo-devices
To handle cases of pseudo-devices containing a child device, e.g., power resources, recurse onto them, treating them like a bus.
Note: This means that a full depth-first traversal of the device tree will take place. If there are no other device trees with a device nested under another device, this shouldn't impact any other boards.
Change-Id: Ia8442939ef1e840c112ad4dd23e324afd99ff7d3 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/device/root_device.c 1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/35074/5
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/3/src/device/root_device.c@12... PS3, Line 120: */
Correct, it would also require changing sconfig to add a new keyword for power resources making them […]
Ack
https://review.coreboot.org/c/coreboot/+/35074/4/src/device/root_device.c File src/device/root_device.c:
https://review.coreboot.org/c/coreboot/+/35074/4/src/device/root_device.c@12... PS4, Line 120: *
trailing whitespace
Ack
Tim Wawrzynczak has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/35074 )
Change subject: device: Allow scan_generic_bus to recurse on pseudo-devices ......................................................................
Abandoned
needs more thought