/** * peci_temp_read() - read the maximum die temperature from PECI target device * @device: PECI device to which request is going to be sent * @temp_raw: where to store the read temperature * * It uses GetTemp PECI command. * * Return: 0 if succeeded, other values in case errors.
*/ int peci_temp_read(struct peci_device *device, s16 *temp_raw)
{ struct peci_request *req;
req = peci_xfer_get_temp(device); if (IS_ERR(req)) return PTR_ERR(req);
/** * peci_pcs_read() - read PCS register * @device: PECI device to which request is going to be sent * @index: PCS index * @param: PCS parameter * @data: where to store the read data * * It uses RdPkgConfig PECI command. * * Return: 0 if succeeded, other values in case errors.
*/ int peci_pcs_read(struct peci_device *device, u8 index, u16 param, u32 *data)
{ struct peci_request *req; int ret;
req = peci_xfer_pkg_cfg_readl(device, index, param); if (IS_ERR(req)) return PTR_ERR(req);
ret = peci_request_status(req); if (ret) goto out_req_free;
/** * peci_pci_local_read() - read 32-bit memory location using raw address * @device: PECI device to which request is going to be sent * @bus: bus * @dev: device * @func: function * @reg: register * @data: where to store the read data * * It uses RdPCIConfigLocal PECI command. * * Return: 0 if succeeded, other values in case errors.
*/ int peci_pci_local_read(struct peci_device *device, u8 bus, u8 dev, u8 func,
u16 reg, u32 *data)
{ struct peci_request *req; int ret;
/** * peci_ep_pci_local_read() - read 32-bit memory location using raw address * @device: PECI device to which request is going to be sent * @seg: PCI segment * @bus: bus * @dev: device * @func: function * @reg: register * @data: where to store the read data * * Like &peci_pci_local_read, but it uses RdEndpointConfig PECI command. * * Return: 0 if succeeded, other values in case errors.
*/ int peci_ep_pci_local_read(struct peci_device *device, u8 seg,
u8 bus, u8 dev, u8 func, u16 reg, u32 *data)
{ struct peci_request *req; int ret;
/** * peci_mmio_read() - read 32-bit memory location using 64-bit bar offset address * @device: PECI device to which request is going to be sent * @bar: PCI bar * @seg: PCI segment * @bus: bus * @dev: device * @func: function * @address: 64-bit MMIO address * @data: where to store the read data * * It uses RdEndpointConfig PECI command. * * Return: 0 if succeeded, other values in case errors.
*/ int peci_mmio_read(struct peci_device *device, u8 bar, u8 seg,
u8 bus, u8 dev, u8 func, u64 address, u32 *data)
{ struct peci_request *req; int ret;
req = peci_xfer_ep_mmio64_readl(device, bar, seg, bus, dev, func, address); if (IS_ERR(req)) return PTR_ERR(req);
ret = peci_request_status(req); if (ret) goto out_req_free;
for (i = 0; i < ARRAY_SIZE(peci_adev_types); i++) {
ret = devm_adev_add(dev, i); if (ret) {
dev_warn(dev, "Failed to register PECI auxiliary: %s, ret = %d\n",
peci_adev_types[i], ret); continue;
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.