OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include "libutil.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "nvme.h"
#include <logging/log.h>
#include <sys/crc.h>
Macros | |
#define | NVMe_NOT_AVAILABLE 0x80 |
#define | NVMe_TMP_SENSOR_FAILURE 0x81 |
#define | NVMe_DRIVE_NOT_READY_BIT BIT(6) |
#define | NVMe_TEMP_READ_LEN 8 |
#define | NVMe_VOLTAGE_RAIL_READ_LEN 2 |
#define | NVMe_PEC_INDEX 7 |
#define | NVMe_STATUS_INDEX 1 |
#define | NVMe_TEMPERATURE_INDEX 3 |
#define | NVMe_PEC_NOT_SUPPORT 0x00 |
Functions | |
LOG_MODULE_REGISTER (nvme) | |
__weak void | plat_nvme_bus_reset (uint8_t bus) |
int | read_nvme_info (uint8_t bus, uint8_t addr, uint8_t offset, uint8_t read_len, uint8_t *data) |
uint8_t | nvme_read (sensor_cfg *cfg, int *reading) |
uint8_t | nvme_init (sensor_cfg *cfg) |
#define NVMe_DRIVE_NOT_READY_BIT BIT(6) |
#define NVMe_NOT_AVAILABLE 0x80 |
#define NVMe_PEC_INDEX 7 |
#define NVMe_PEC_NOT_SUPPORT 0x00 |
#define NVMe_STATUS_INDEX 1 |
#define NVMe_TEMP_READ_LEN 8 |
#define NVMe_TEMPERATURE_INDEX 3 |
#define NVMe_TMP_SENSOR_FAILURE 0x81 |
#define NVMe_VOLTAGE_RAIL_READ_LEN 2 |
LOG_MODULE_REGISTER | ( | nvme | ) |
uint8_t nvme_init | ( | sensor_cfg * | cfg | ) |
uint8_t nvme_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
__weak void plat_nvme_bus_reset | ( | uint8_t | bus | ) |
int read_nvme_info | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t | offset, | ||
uint8_t | read_len, | ||
uint8_t * | data | ||
) |