drivers/crypto/starfive/jh7110-cryp.h
Source file repositories/reference/linux-study-clean/drivers/crypto/starfive/jh7110-cryp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/starfive/jh7110-cryp.h- Extension
.h- Size
- 5498 bytes
- Lines
- 241
- 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/aes.hcrypto/hash.hcrypto/scatterwalk.hcrypto/sha2.hcrypto/sm3.hlinux/delay.hlinux/dma-mapping.hlinux/dmaengine.hlinux/interrupt.h
Detected Declarations
struct starfive_rsa_keystruct starfive_cryp_ctxstruct starfive_cryp_devstruct starfive_cryp_request_ctx
Annotated Snippet
struct starfive_rsa_key {
u8 *n;
u8 *e;
u8 *d;
int e_bitlen;
int d_bitlen;
int bitlen;
size_t key_sz;
};
union starfive_alg_cr {
u32 v;
struct {
u32 start :1;
u32 aes_dma_en :1;
u32 rsvd_0 :1;
u32 hash_dma_en :1;
u32 alg_done :1;
u32 rsvd_1 :3;
u32 clear :1;
u32 rsvd_2 :23;
};
};
struct starfive_cryp_ctx {
struct starfive_cryp_dev *cryp;
struct starfive_cryp_request_ctx *rctx;
unsigned int hash_mode;
u8 key[MAX_KEY_SIZE];
int keylen;
bool is_hmac;
struct starfive_rsa_key rsa_key;
struct crypto_akcipher *akcipher_fbk;
struct crypto_ahash *ahash_fbk;
struct crypto_aead *aead_fbk;
struct crypto_skcipher *skcipher_fbk;
};
struct starfive_cryp_dev {
struct list_head list;
struct device *dev;
struct clk *hclk;
struct clk *ahb;
struct reset_control *rst;
void __iomem *base;
phys_addr_t phys_base;
u32 dma_maxburst;
struct dma_chan *tx;
struct dma_chan *rx;
struct dma_slave_config cfg_in;
struct dma_slave_config cfg_out;
struct crypto_engine *engine;
struct completion dma_done;
size_t assoclen;
size_t total_in;
size_t total_out;
u32 tag_in[4];
u32 tag_out[4];
unsigned int authsize;
unsigned long flags;
int err;
bool side_chan;
union starfive_alg_cr alg_cr;
union {
struct ahash_request *hreq;
struct aead_request *areq;
struct skcipher_request *sreq;
} req;
};
struct starfive_cryp_request_ctx {
union {
union starfive_hash_csr hash;
union starfive_pka_cacr pka;
union starfive_aes_csr aes;
} csr;
struct scatterlist *in_sg;
struct scatterlist *out_sg;
size_t total;
unsigned int blksize;
unsigned int digsize;
unsigned long in_sg_len;
unsigned char *adata;
u8 rsa_data[STARFIVE_RSA_MAX_KEYSZ] __aligned(sizeof(u32));
/* Must be last as it ends in a flexible-array member. */
Annotation
- Immediate include surface: `crypto/aes.h`, `crypto/hash.h`, `crypto/scatterwalk.h`, `crypto/sha2.h`, `crypto/sm3.h`, `linux/delay.h`, `linux/dma-mapping.h`, `linux/dmaengine.h`.
- Detected declarations: `struct starfive_rsa_key`, `struct starfive_cryp_ctx`, `struct starfive_cryp_dev`, `struct starfive_cryp_request_ctx`.
- 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.