* Determine the existence of devices and extend the device tree. * * Most of the devices in the system are listed in the mainboard devicetree.cb * file. The device structures for these devices are generated at compile * time by the config tool and are organized into the device tree. This * function determines if the devices created at compile time actually exist * in the physical system. *
| 441 | * it to the device tree. |
| 442 | */ |
| 443 | void dev_enumerate(void) |
| 444 | { |
| 445 | struct device *root; |
| 446 | |
| 447 | printk(BIOS_INFO, "Enumerating buses...\n"); |
| 448 | |
| 449 | root = &dev_root; |
| 450 | |
| 451 | show_all_devs(BIOS_SPEW, "Before device enumeration."); |
| 452 | printk(BIOS_SPEW, "Compare with tree...\n"); |
| 453 | show_devs_tree(root, BIOS_SPEW, 0); |
| 454 | |
| 455 | if (root->chip_ops && root->chip_ops->enable_dev) |
| 456 | root->chip_ops->enable_dev(root); |
| 457 | |
| 458 | if (!root->ops || !root->ops->scan_bus) { |
| 459 | printk(BIOS_ERR, "dev_root missing scan_bus operation"); |
| 460 | return; |
| 461 | } |
| 462 | scan_bus(root); |
| 463 | post_log_clear(); |
| 464 | printk(BIOS_INFO, "done\n"); |
| 465 | } |
| 466 | |
| 467 | /** |
| 468 | * Configure devices on the devices tree. |
no test coverage detected