mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
nvme: change where pci stuff is initialised
This commit is contained in:
@@ -597,6 +597,10 @@ static void initcontroller(pcienum_t *e) {
|
||||
volatile nvmebar0_t *bar0 = (volatile nvmebar0_t *)bar0p.address;
|
||||
__assert(bar0);
|
||||
|
||||
pci_setcommand(e, PCI_COMMAND_MMIO, 1);
|
||||
pci_setcommand(e, PCI_COMMAND_IO, 0);
|
||||
pci_setcommand(e, PCI_COMMAND_IRQDISABLE, 1);
|
||||
|
||||
int vmajor = VERSION_MAJOR(bar0->version);
|
||||
int vminor = VERSION_MINOR(bar0->version);
|
||||
int vpatch = VERSION_PATCH(bar0->version);
|
||||
@@ -618,9 +622,6 @@ static void initcontroller(pcienum_t *e) {
|
||||
printf("nvme: controller doesn't support the processor page size\n");
|
||||
}
|
||||
|
||||
pci_setcommand(e, PCI_COMMAND_MMIO, 1);
|
||||
pci_setcommand(e, PCI_COMMAND_IO, 0);
|
||||
|
||||
// enable interrupts
|
||||
|
||||
size_t intcount;
|
||||
|
||||
Reference in New Issue
Block a user