mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 01:52:03 +02:00
Add support for the ISSEI (Intel Silicon Security Engine Interface) HECI PCI devices. Add the necessary PCI handling routines, hardware definitions, register mappings and hardware access routines. This enables the communication via HECI PCI device advertized by BIOS. Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com> Co-developed-by: Vitaly Lubart <lubvital@gmail.com> Signed-off-by: Vitaly Lubart <lubvital@gmail.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://patch.msgid.link/20260513-issei-for-upstream-v1-4-f590038678f9@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2023-2026 Intel Corporation */
|
|
#ifndef _ISSEI_HW_HECI_H_
|
|
#define _ISSEI_HW_HECI_H_
|
|
#include <linux/irqreturn.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/types.h>
|
|
|
|
#include "issei_dev.h"
|
|
|
|
/*
|
|
* hw_heci_cfg - issei heci device configuration
|
|
*
|
|
* @dma_length: DMA area length
|
|
*/
|
|
struct hw_heci_cfg {
|
|
const struct issei_dma_length dma_length;
|
|
};
|
|
|
|
/**
|
|
* struct issei_heci_hw - issei heci hw specific data
|
|
*
|
|
* @cfg: per device generation config and ops
|
|
* @mem_addr: io memory address
|
|
* @irq: device irq number
|
|
* @access_lock: spinlock to protect hw access
|
|
* @hbuf_depth: depth of hardware host/write buffer in slots
|
|
*/
|
|
struct issei_heci_hw {
|
|
const struct hw_heci_cfg *cfg;
|
|
void __iomem *mem_addr;
|
|
int irq;
|
|
spinlock_t access_lock;
|
|
u8 hbuf_depth;
|
|
};
|
|
|
|
#define to_heci_hw(dev) ((struct issei_heci_hw *)(dev)->hw)
|
|
|
|
const struct hw_heci_cfg *issei_heci_get_cfg(kernel_ulong_t idx);
|
|
const struct issei_hw_ops *issei_heci_get_ops(void);
|
|
|
|
void issei_heci_dev_init(struct issei_device *idev,
|
|
void __iomem *mem_addr, const struct hw_heci_cfg *cfg);
|
|
|
|
irqreturn_t issei_heci_irq_quick_handler(int irq, void *dev_id);
|
|
|
|
#endif /* _ISSEI_HW_HECI_H_ */
|