Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35946 )
Change subject: driver/thunderbolt: Driver for allocating hotplug resources ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... File src/drivers/thunderbolt/thunderbolt.c:
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... PS1, Line 25: static void slot_dev_read_resources(struct device *dev) that code should be shared with the existing southbridge code.
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... PS1, Line 69: dev->hotplug_buses = 32; I'd prefer a virtual PCI bridge instead, each having assinged one downstream device of type DEVICE_PATH_NONE. That way every bridge would be assigned a bus number and you don't have to touch device.c
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... PS1, Line 80: slot = alloc_dev(dev->link_list, &slot_path); don't you need to allocate "hotplug_buses" devices, as every potential device could have two 256MiB bars and I/O memory?