mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +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;
|
volatile nvmebar0_t *bar0 = (volatile nvmebar0_t *)bar0p.address;
|
||||||
__assert(bar0);
|
__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 vmajor = VERSION_MAJOR(bar0->version);
|
||||||
int vminor = VERSION_MINOR(bar0->version);
|
int vminor = VERSION_MINOR(bar0->version);
|
||||||
int vpatch = VERSION_PATCH(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");
|
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
|
// enable interrupts
|
||||||
|
|
||||||
size_t intcount;
|
size_t intcount;
|
||||||
|
|||||||
Reference in New Issue
Block a user