* Assign the computed resources to the devices on the bus. * * Use the device specific set_resources() method to store the computed * resources to hardware. For bridge devices, the set_resources() method * has to recurse into every down stream buses. * * Mutual recursion: * assign_resources() -> device_operation::set_resources() * device_operation::set_resources() -> assign_resources() *
| 296 | * @param bus Pointer to the structure for this bus. |
| 297 | */ |
| 298 | void assign_resources(struct bus *bus) |
| 299 | { |
| 300 | struct device *curdev; |
| 301 | |
| 302 | printk(BIOS_SPEW, "%s %s, segment group %d bus %d\n", |
| 303 | dev_path(bus->dev), __func__, bus->segment_group, bus->secondary); |
| 304 | |
| 305 | for (curdev = bus->children; curdev; curdev = curdev->sibling) { |
| 306 | if (!curdev->enabled || !curdev->resource_list) |
| 307 | continue; |
| 308 | |
| 309 | if (!curdev->ops || !curdev->ops->set_resources) { |
| 310 | printk(BIOS_ERR, "%s missing set_resources\n", |
| 311 | dev_path(curdev)); |
| 312 | continue; |
| 313 | } |
| 314 | post_log_path(curdev); |
| 315 | curdev->ops->set_resources(curdev); |
| 316 | } |
| 317 | post_log_clear(); |
| 318 | printk(BIOS_SPEW, "%s %s, segment group %d bus %d done\n", |
| 319 | dev_path(bus->dev), __func__, bus->segment_group, bus->secondary); |
| 320 | } |
| 321 | |
| 322 | /** |
| 323 | * Enable the resources for devices on a link. |
no test coverage detected