[bus][pci] do not automatically initialize the bus manager in pci_init_legacy

This lets the caller do any last minute resource set up before starting
the bus manager. Is consistent with the way pci_init_ecam() works.
This commit is contained in:
Travis Geiselbrecht
2022-10-18 23:58:18 -07:00
parent 5f9e6fdefc
commit 3a6c4aed8f
2 changed files with 2 additions and 3 deletions

View File

@@ -95,7 +95,8 @@ void add_to_bus_list(bus *b) {
}
void set_last_bus(uint8_t bus) {
DEBUG_ASSERT(bus >= last_bus);
LTRACEF("bus %hhu, existing last_bus %hhu\n", bus, last_bus);
DEBUG_ASSERT_MSG(bus >= last_bus, "bus %u, last_bus %u\n", bus, last_bus);
last_bus = bus;
}

View File

@@ -266,7 +266,6 @@ status_t pci_init_legacy() {
if ((pcib = pci_bios32::detect())) {
dprintf(INFO, "PCI: pci bios functions installed\n");
dprintf(INFO, "PCI: last pci bus is %d\n", pcib->get_last_bus());
pci_bus_mgr_init();
return NO_ERROR;
}
@@ -274,7 +273,6 @@ status_t pci_init_legacy() {
if ((pcib = pci_type1::detect())) {
dprintf(INFO, "PCI: pci type1 functions installed\n");
dprintf(INFO, "PCI: last pci bus is %d\n", pcib->get_last_bus());
pci_bus_mgr_init();
return NO_ERROR;
}