drivers/crypto/amlogic/amlogic-gxl.h
Source file repositories/reference/linux-study-clean/drivers/crypto/amlogic/amlogic-gxl.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/crypto/amlogic/amlogic-gxl.h- Extension
.h- Size
- 4454 bytes
- Lines
- 160
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
crypto/aes.hcrypto/engine.hcrypto/skcipher.hlinux/debugfs.hlinux/crypto.hlinux/scatterlist.h
Detected Declarations
struct meson_descstruct meson_flowstruct meson_devstruct meson_cipher_req_ctxstruct meson_cipher_tfm_ctxstruct meson_alg_template
Annotated Snippet
struct meson_desc {
__le32 t_status;
__le32 t_src;
__le32 t_dst;
};
/*
* struct meson_flow - Information used by each flow
* @engine: ptr to the crypto_engine for this flow
* @keylen: keylen for this flow operation
* @complete: completion for the current task on this flow
* @status: set to 1 by interrupt if task is done
* @t_phy: Physical address of task
* @tl: pointer to the current ce_task for this flow
* @stat_req: number of request done by this flow
*/
struct meson_flow {
struct crypto_engine *engine;
struct completion complete;
int status;
unsigned int keylen;
dma_addr_t t_phy;
struct meson_desc *tl;
#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
unsigned long stat_req;
#endif
};
/*
* struct meson_dev - main container for all this driver information
* @base: base address of amlogic-crypto
* @busclk: bus clock for amlogic-crypto
* @dev: the platform device
* @chanlist: array of all flow
* @flow: flow to use in next request
* @irqs: IRQ numbers for amlogic-crypto
* @dbgfs_dir: Debugfs dentry for statistic directory
* @dbgfs_stats: Debugfs dentry for statistic counters
*/
struct meson_dev {
void __iomem *base;
struct clk *busclk;
struct device *dev;
struct meson_flow *chanlist;
atomic_t flow;
int irqs[MAXFLOW];
#ifdef CONFIG_CRYPTO_DEV_AMLOGIC_GXL_DEBUG
struct dentry *dbgfs_dir;
#endif
};
/*
* struct meson_cipher_req_ctx - context for a skcipher request
* @op_dir: direction (encrypt vs decrypt) for this request
* @flow: the flow to use for this request
*/
struct meson_cipher_req_ctx {
u32 op_dir;
int flow;
struct skcipher_request fallback_req; // keep at the end
};
/*
* struct meson_cipher_tfm_ctx - context for a skcipher TFM
* @key: pointer to key data
* @keylen: len of the key
* @keymode: The keymode(type and size of key) associated with this TFM
* @mc: pointer to the private data of driver handling this TFM
* @fallback_tfm: pointer to the fallback TFM
*/
struct meson_cipher_tfm_ctx {
u32 *key;
u32 keylen;
u32 keymode;
struct meson_dev *mc;
struct crypto_skcipher *fallback_tfm;
};
/*
* struct meson_alg_template - crypto_alg template
* @type: the CRYPTO_ALG_TYPE for this template
* @blockmode: the type of block operation
* @mc: pointer to the meson_dev structure associated with this template
* @alg: one of sub struct must be used
* @stat_req: number of request done on this template
* @stat_fb: total of all data len done on this template
*/
struct meson_alg_template {
u32 type;
u32 blockmode;
Annotation
- Immediate include surface: `crypto/aes.h`, `crypto/engine.h`, `crypto/skcipher.h`, `linux/debugfs.h`, `linux/crypto.h`, `linux/scatterlist.h`.
- Detected declarations: `struct meson_desc`, `struct meson_flow`, `struct meson_dev`, `struct meson_cipher_req_ctx`, `struct meson_cipher_tfm_ctx`, `struct meson_alg_template`.
- Atlas domain: Driver Families / drivers/crypto.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.