drivers/crypto/rockchip/rk3288_crypto.h
Source file repositories/reference/linux-study-clean/drivers/crypto/rockchip/rk3288_crypto.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/rockchip/rk3288_crypto.h- Extension
.h- Size
- 8576 bytes
- Lines
- 286
- 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/engine.hcrypto/internal/des.hcrypto/internal/hash.hcrypto/internal/skcipher.hcrypto/md5.hcrypto/sha1.hcrypto/sha2.hlinux/dma-mapping.hlinux/interrupt.hlinux/pm_runtime.hlinux/scatterlist.hlinux/types.h
Detected Declarations
struct rockchip_ipstruct rk_clksstruct rk_variantstruct rk_crypto_infostruct rk_ahash_ctxstruct rk_ahash_rctxstruct rk_cipher_ctxstruct rk_cipher_rctxstruct rk_crypto_tmp
Annotated Snippet
struct rockchip_ip {
struct list_head dev_list;
spinlock_t lock; /* Control access to dev_list */
struct dentry *dbgfs_dir;
struct dentry *dbgfs_stats;
};
struct rk_clks {
const char *name;
unsigned long max;
};
struct rk_variant {
int num_clks;
struct rk_clks rkclks[RK_MAX_CLKS];
};
struct rk_crypto_info {
struct list_head list;
struct device *dev;
struct clk_bulk_data *clks;
int num_clks;
struct reset_control *rst;
void __iomem *reg;
int irq;
const struct rk_variant *variant;
unsigned long nreq;
struct crypto_engine *engine;
struct completion complete;
int status;
};
/* the private variable of hash */
struct rk_ahash_ctx {
/* for fallback */
struct crypto_ahash *fallback_tfm;
};
/* the private variable of hash for fallback */
struct rk_ahash_rctx {
struct rk_crypto_info *dev;
struct ahash_request fallback_req;
u32 mode;
int nrsg;
};
/* the private variable of cipher */
struct rk_cipher_ctx {
unsigned int keylen;
u8 key[AES_MAX_KEY_SIZE];
u8 iv[AES_BLOCK_SIZE];
struct crypto_skcipher *fallback_tfm;
};
struct rk_cipher_rctx {
struct rk_crypto_info *dev;
u8 backup_iv[AES_BLOCK_SIZE];
u32 mode;
struct skcipher_request fallback_req; // keep at the end
};
struct rk_crypto_tmp {
u32 type;
struct rk_crypto_info *dev;
union {
struct skcipher_engine_alg skcipher;
struct ahash_engine_alg hash;
} alg;
unsigned long stat_req;
unsigned long stat_fb;
unsigned long stat_fb_len;
unsigned long stat_fb_sglen;
unsigned long stat_fb_align;
unsigned long stat_fb_sgdiff;
};
extern struct rk_crypto_tmp rk_ecb_aes_alg;
extern struct rk_crypto_tmp rk_cbc_aes_alg;
extern struct rk_crypto_tmp rk_ecb_des_alg;
extern struct rk_crypto_tmp rk_cbc_des_alg;
extern struct rk_crypto_tmp rk_ecb_des3_ede_alg;
extern struct rk_crypto_tmp rk_cbc_des3_ede_alg;
extern struct rk_crypto_tmp rk_ahash_sha1;
extern struct rk_crypto_tmp rk_ahash_sha256;
extern struct rk_crypto_tmp rk_ahash_md5;
struct rk_crypto_info *get_rk_crypto(void);
#endif
Annotation
- Immediate include surface: `crypto/aes.h`, `crypto/engine.h`, `crypto/internal/des.h`, `crypto/internal/hash.h`, `crypto/internal/skcipher.h`, `crypto/md5.h`, `crypto/sha1.h`, `crypto/sha2.h`.
- Detected declarations: `struct rockchip_ip`, `struct rk_clks`, `struct rk_variant`, `struct rk_crypto_info`, `struct rk_ahash_ctx`, `struct rk_ahash_rctx`, `struct rk_cipher_ctx`, `struct rk_cipher_rctx`, `struct rk_crypto_tmp`.
- 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.