* Read the resources on all devices of a given bus. * * @param bus Bus to read the resources on. */
| 184 | * @param bus Bus to read the resources on. |
| 185 | */ |
| 186 | static void read_resources(struct bus *bus) |
| 187 | { |
| 188 | struct device *curdev; |
| 189 | |
| 190 | printk(BIOS_SPEW, "%s %s segment group %d bus %d\n", dev_path(bus->dev), |
| 191 | __func__, bus->segment_group, bus->secondary); |
| 192 | |
| 193 | /* Walk through all devices and find which resources they need. */ |
| 194 | for (curdev = bus->children; curdev; curdev = curdev->sibling) { |
| 195 | if (!curdev->enabled) |
| 196 | continue; |
| 197 | |
| 198 | if (!curdev->ops || !curdev->ops->read_resources) { |
| 199 | if (curdev->path.type != DEVICE_PATH_APIC) |
| 200 | printk(BIOS_ERR, "%s missing %s\n", |
| 201 | dev_path(curdev), __func__); |
| 202 | continue; |
| 203 | } |
| 204 | post_log_path(curdev); |
| 205 | curdev->ops->read_resources(curdev); |
| 206 | |
| 207 | /* Read in the resources behind the current device's links. */ |
| 208 | if (curdev->downstream) |
| 209 | read_resources(curdev->downstream); |
| 210 | } |
| 211 | post_log_clear(); |
| 212 | printk(BIOS_SPEW, "%s %s segment group %d bus %d done\n", |
| 213 | dev_path(bus->dev), __func__, bus->segment_group, bus->secondary); |
| 214 | } |
| 215 | |
| 216 | struct device *vga_pri = NULL; |
| 217 | static void set_vga_bridge_bits(void) |
no test coverage detected