drivers/crypto/ti/dthev2-common.h
Source file repositories/reference/linux-study-clean/drivers/crypto/ti/dthev2-common.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/ti/dthev2-common.h- Extension
.h- Size
- 3335 bytes
- Lines
- 135
- Domain
- Driver Families
- Bucket
- drivers/crypto
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/aead.hcrypto/aes.hcrypto/algapi.hcrypto/engine.hcrypto/hash.hcrypto/internal/aead.hcrypto/internal/hash.hcrypto/internal/skcipher.hlinux/delay.hlinux/dmaengine.hlinux/dmapool.hlinux/dma-mapping.hlinux/io.hlinux/scatterlist.h
Detected Declarations
struct dthe_datastruct dthe_liststruct dthe_tfm_ctxstruct dthe_aes_req_ctxenum dthe_aes_mode
Annotated Snippet
struct dthe_data {
struct device *dev;
void __iomem *regs;
struct list_head list;
struct crypto_engine *engine;
struct dma_chan *dma_aes_rx;
struct dma_chan *dma_aes_tx;
struct dma_chan *dma_sha_tx;
};
/**
* struct dthe_list - device data list head
* @dev_list: linked list head
* @lock: Spinlock protecting accesses to the list
*/
struct dthe_list {
struct list_head dev_list;
spinlock_t lock;
};
/**
* struct dthe_tfm_ctx - Transform ctx struct containing ctx for all sub-components of DTHE V2
* @dev_data: Device data struct pointer
* @keylen: AES key length
* @authsize: Authentication size for modes with authentication
* @key: AES key
* @aes_mode: AES mode
* @aead_fb: Fallback crypto aead handle
* @skcipher_fb: Fallback crypto skcipher handle for AES-XTS mode
*/
struct dthe_tfm_ctx {
struct dthe_data *dev_data;
unsigned int keylen;
unsigned int authsize;
u32 key[DTHE_MAX_KEYSIZE / sizeof(u32)];
enum dthe_aes_mode aes_mode;
union {
struct crypto_sync_aead *aead_fb;
struct crypto_sync_skcipher *skcipher_fb;
};
};
/**
* struct dthe_aes_req_ctx - AES engine req ctx struct
* @enc: flag indicating encryption or decryption operation
* @padding: padding buffer for handling unaligned data
* @aes_compl: Completion variable for use in manual completion in case of DMA callback failure
*/
struct dthe_aes_req_ctx {
int enc;
u8 padding[2 * AES_BLOCK_SIZE];
struct completion aes_compl;
};
/* Struct definitions end */
struct dthe_data *dthe_get_dev(struct dthe_tfm_ctx *ctx);
/**
* dthe_copy_sg - Copy sg entries from src to dst
* @dst: Destination sg to be filled
* @src: Source sg to be copied from
* @buflen: Number of bytes to be copied
*
* Description:
* Copy buflen bytes of data from src to dst.
*
**/
struct scatterlist *dthe_copy_sg(struct scatterlist *dst,
struct scatterlist *src,
int buflen);
int dthe_register_aes_algs(void);
void dthe_unregister_aes_algs(void);
#endif
Annotation
- Immediate include surface: `crypto/aead.h`, `crypto/aes.h`, `crypto/algapi.h`, `crypto/engine.h`, `crypto/hash.h`, `crypto/internal/aead.h`, `crypto/internal/hash.h`, `crypto/internal/skcipher.h`.
- Detected declarations: `struct dthe_data`, `struct dthe_list`, `struct dthe_tfm_ctx`, `struct dthe_aes_req_ctx`, `enum dthe_aes_mode`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.