16 #define FPGA_SET_PARAM(src, dst) \
19 if (hwilib_get_field(src, (uint8_t *)&var, sizeof(var))) \
20 dst = ((typeof(dst))var); \
27 volatile fan_ctrl_t *ctrl = (fan_ctrl_t *)base_adr;
32 if ((hwilib_get_field(FANSensorNum, &num, 1) != 1) ||
35 for (i = 0; i < num; i ++) {
36 if (hwilib_get_field(FANSensorCfg0 + i, (
uint8_t *)&cc[0],
37 sizeof(cc)) ==
sizeof(cc)) {
38 ctrl->sensorcfg[cc[0]].rmin = cc[1] & 0xffff;
39 ctrl->sensorcfg[cc[0]].rmax = cc[2] & 0xffff;
40 ctrl->sensorcfg[cc[0]].nmin = cc[3] & 0xffff;
41 ctrl->sensorcfg[cc[0]].nmax = cc[4] & 0xffff;
44 ctrl->sensornum = num;
55 volatile fan_ctrl_t *ctrl = (fan_ctrl_t *)base_adr;
69 if ((hwilib_get_field(FF_FanReq, &fan_req, 1) == 1) &&
70 (hwilib_get_field(FF_FreezeDis, &freeze_disable, 1) == 1)) {
73 else if (fan_req && !freeze_disable)
77 ctrl->fanmon =
mask << 10;
89 void *bar0_ptr =
NULL;
107 if (hwilib_find_blocks(
"hwinfo.hex") !=
CB_SUCCESS)
129 #if CONFIG(NC_FPGA_NOTIFY_CB_READY)
131 static void set_fw_done(
void *unused)
149 if (
CONFIG(NC_FPGA_POST_CODE)) {
166 static const struct pci_driver nc_fpga_driver
__pci_driver = {
static void write32(void *addr, uint32_t val)
static uint32_t read32(const void *addr)
#define BOOT_STATE_INIT_ENTRY(state_, when_, func_, arg_)
@ CB_SUCCESS
Call completed successfully.
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static __always_inline u8 pci_read_config8(const struct device *dev, u16 reg)
static void init_temp_mon(void *base_adr)
static const unsigned short nc_fpga_device_ids[]
static void * nc_fpga_bar0
static struct device_operations nc_fpga_ops
#define FPGA_SET_PARAM(src, dst)
static void nc_fpga_set_resources(struct device *dev)
static const struct pci_driver nc_fpga_driver __pci_driver
static void nc_fpga_init(struct device *dev)
This function is the driver entry point for the init phase of the PCI bus allocator.
static void init_fan_ctrl(void *base_adr)
void nc_fpga_remap(uint32_t new_mmio)
#define NC_BL_BRIGHTNESS_OFFSET
#define NC_CAP1_BL_BRIGHTNESS_CTRL
#define NC_DIAG_CTRL_OFFSET
#define NC_FANMON_CTRL_OFFSET
#define NC_CAP1_DSAVE_NMI_DELAY
#define PCI_BASE_ADDRESS_MEM_ATTR_MASK
#define PCI_COMMAND_MEMORY
#define PCI_BASE_ADDRESS_0
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
void pci_dev_set_resources(struct device *dev)
void(* read_resources)(struct device *dev)