OpenBIC
OpenSource Bridge-IC
nvme.c File Reference
#include <stdio.h>
#include "libutil.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "nvme.h"
#include <logging/log.h>
#include <sys/crc.h>
Include dependency graph for nvme.c:

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)
 

Macro Definition Documentation

◆ NVMe_DRIVE_NOT_READY_BIT

#define NVMe_DRIVE_NOT_READY_BIT   BIT(6)

◆ NVMe_NOT_AVAILABLE

#define NVMe_NOT_AVAILABLE   0x80

◆ NVMe_PEC_INDEX

#define NVMe_PEC_INDEX   7

◆ NVMe_PEC_NOT_SUPPORT

#define NVMe_PEC_NOT_SUPPORT   0x00

◆ NVMe_STATUS_INDEX

#define NVMe_STATUS_INDEX   1

◆ NVMe_TEMP_READ_LEN

#define NVMe_TEMP_READ_LEN   8

◆ NVMe_TEMPERATURE_INDEX

#define NVMe_TEMPERATURE_INDEX   3

◆ NVMe_TMP_SENSOR_FAILURE

#define NVMe_TMP_SENSOR_FAILURE   0x81

◆ NVMe_VOLTAGE_RAIL_READ_LEN

#define NVMe_VOLTAGE_RAIL_READ_LEN   2

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( nvme  )

◆ nvme_init()

uint8_t nvme_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ nvme_read()

uint8_t nvme_read ( sensor_cfg cfg,
int *  reading 
)
Here is the call graph for this function:

◆ plat_nvme_bus_reset()

__weak void plat_nvme_bus_reset ( uint8_t  bus)

◆ read_nvme_info()

int read_nvme_info ( uint8_t  bus,
uint8_t  addr,
uint8_t  offset,
uint8_t  read_len,
uint8_t *  data 
)
Here is the call graph for this function: