driver: add initial driver layer functions

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-08-11 21:28:55 -04:00
commit 6340e5d450
4 changed files with 40 additions and 3 deletions

View file

@ -376,7 +376,7 @@ static void ahci_probe_ports(struct ahci_host *host)
}
}
static int ahci_init_device(struct pci_device *device, size_t ahci_dev_no)
static int ahci_init_device(struct pci_device *device)
{
struct ahci_host *host = kzalloc(sizeof(struct ahci_host), ALLOC_KERN);
if (!host)
@ -395,6 +395,8 @@ void ahci_init()
list_t dev_list;
list_create(&dev_list);
driver_register("ahci", DRIVER_PCI, ahci_init_device, NULL, 1, 6);
krdy("AHCI ready\n");
}
DRIVER_ENTRY_PRIORITY(ahci_init, 3);
DRIVER_ENTRY_PRIORITY(ahci_init, 2);

View file

@ -152,4 +152,4 @@ void pci_init()
krdy("PCI ready\n");
}
DRIVER_ENTRY_PRIORITY(pci_init, 2);
DRIVER_ENTRY_PRIORITY(pci_init, 4);