MCPcopy Create free account
hub / github.com/coreboot/coreboot / enable_resources

Function enable_resources

src/device/device.c:334–350  ·  view source on GitHub ↗

* Enable the resources for devices on a link. * * Enable resources of the device by calling the device specific * enable_resources() method. * * The parent's resources should be enabled first to avoid having enabling * order problem. This is done by calling the parent's enable_resources() * method before its children's enable_resources() methods. * * @param link The link whose devices' re

Source from the content-addressed store, hash-verified

332 * @param link The link whose devices' resources are to be enabled.
333 */
334static void enable_resources(struct bus *link)
335{
336 struct device *dev;
337
338 for (dev = link->children; dev; dev = dev->sibling) {
339 if (dev->enabled && dev->ops && dev->ops->enable_resources) {
340 post_log_path(dev);
341 dev->ops->enable_resources(dev);
342 }
343 }
344
345 for (dev = link->children; dev; dev = dev->sibling) {
346 if (dev->downstream)
347 enable_resources(dev->downstream);
348 }
349 post_log_clear();
350}
351
352/**
353 * Reset all of the devices on a bus and clear the bus's reset_needed flag.

Callers 1

dev_enableFunction · 0.85

Calls 2

post_log_pathFunction · 0.85
post_log_clearFunction · 0.85

Tested by

no test coverage detected