42 lines
722 B
C
42 lines
722 B
C
#define pr_fmt(fmt) "nvme: " fmt
|
|
|
|
#include <zinnia/fdt.h>
|
|
#include <zinnia/module.h>
|
|
#include <zinnia/pci.h>
|
|
#include <zinnia/print.h>
|
|
#include <zinnia/utils.h>
|
|
#include <config.h>
|
|
|
|
#if CONFIG_NVME_PCI
|
|
#include "nvme_pci.h"
|
|
#endif
|
|
|
|
struct nvme_dev {
|
|
#if CONFIG_NVME_PCI
|
|
struct pci_device pci_dev;
|
|
#endif
|
|
};
|
|
|
|
errno_t nvme_init(struct module* mod) {
|
|
errno_t status = 0;
|
|
|
|
#if CONFIG_NVME_PCI
|
|
status = pci_driver_register(&nvme_driver);
|
|
#endif
|
|
|
|
return status;
|
|
}
|
|
|
|
errno_t nvme_exit(struct module* mod) {
|
|
// TODO: Unregister
|
|
return 0;
|
|
}
|
|
|
|
MODULE_ENTRY(nvme_init);
|
|
MODULE_EXIT(nvme_exit);
|
|
|
|
MODULE_DESC("NVMe Block Devices");
|
|
MODULE_AUTHOR("Marvin Friedrich");
|
|
MODULE_LICENSE("ISC");
|
|
MODULE_VERSION("1.0");
|