include/soc/fsl/dpaa2-fd.h
Source file repositories/reference/linux-study-clean/include/soc/fsl/dpaa2-fd.h
File Facts
- System
- Linux kernel
- Corpus path
include/soc/fsl/dpaa2-fd.h- Extension
.h- Size
- 18027 bytes
- Lines
- 682
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/byteorder/generic.hlinux/types.h
Detected Declarations
struct dpaa2_fdstruct dpaa2_fd_simplestruct dpaa2_sg_entrystruct dpaa2_fl_entryenum dpaa2_fd_formatenum dpaa2_sg_formatenum dpaa2_fl_formatfunction dpaa2_fd_get_addrfunction dpaa2_fd_set_addrfunction dpaa2_fd_get_frcfunction dpaa2_fd_set_frcfunction dpaa2_fd_get_ctrlfunction dpaa2_fd_set_ctrlfunction dpaa2_fd_get_flcfunction dpaa2_fd_set_flcfunction dpaa2_fd_short_lenfunction dpaa2_fd_get_lenfunction dpaa2_fd_set_lenfunction dpaa2_fd_get_offsetfunction dpaa2_fd_set_offsetfunction dpaa2_fd_get_formatfunction dpaa2_fd_set_formatfunction dpaa2_fd_get_bpidfunction dpaa2_fd_set_bpidfunction dpaa2_sg_get_addrfunction dpaa2_sg_set_addrfunction dpaa2_sg_short_lenfunction dpaa2_sg_get_lenfunction dpaa2_sg_set_lenfunction dpaa2_sg_get_offsetfunction dpaa2_sg_set_offsetfunction dpaa2_sg_get_formatfunction dpaa2_sg_set_formatfunction dpaa2_sg_get_bpidfunction dpaa2_sg_set_bpidfunction dpaa2_sg_is_finalfunction dpaa2_sg_set_finalfunction dpaa2_fl_get_addrfunction dpaa2_fl_set_addrfunction dpaa2_fl_get_frcfunction dpaa2_fl_set_frcfunction dpaa2_fl_get_ctrlfunction dpaa2_fl_set_ctrlfunction dpaa2_fl_get_flcfunction dpaa2_fl_set_flcfunction dpaa2_fl_short_lenfunction dpaa2_fl_get_lenfunction dpaa2_fl_set_len
Annotated Snippet
struct dpaa2_fd {
union {
u32 words[8];
struct dpaa2_fd_simple {
__le64 addr;
__le32 len;
__le16 bpid;
__le16 format_offset;
__le32 frc;
__le32 ctrl;
__le64 flc;
} simple;
};
};
#define FD_SHORT_LEN_FLAG_MASK 0x1
#define FD_SHORT_LEN_FLAG_SHIFT 14
#define FD_SHORT_LEN_MASK 0x3FFFF
#define FD_OFFSET_MASK 0x0FFF
#define FD_FORMAT_MASK 0x3
#define FD_FORMAT_SHIFT 12
#define FD_BPID_MASK 0x3FFF
#define SG_SHORT_LEN_FLAG_MASK 0x1
#define SG_SHORT_LEN_FLAG_SHIFT 14
#define SG_SHORT_LEN_MASK 0x1FFFF
#define SG_OFFSET_MASK 0x0FFF
#define SG_FORMAT_MASK 0x3
#define SG_FORMAT_SHIFT 12
#define SG_BPID_MASK 0x3FFF
#define SG_FINAL_FLAG_MASK 0x1
#define SG_FINAL_FLAG_SHIFT 15
#define FL_SHORT_LEN_FLAG_MASK 0x1
#define FL_SHORT_LEN_FLAG_SHIFT 14
#define FL_SHORT_LEN_MASK 0x3FFFF
#define FL_OFFSET_MASK 0x0FFF
#define FL_FORMAT_MASK 0x3
#define FL_FORMAT_SHIFT 12
#define FL_BPID_MASK 0x3FFF
#define FL_FINAL_FLAG_MASK 0x1
#define FL_FINAL_FLAG_SHIFT 15
/* Error bits in FD CTRL */
#define FD_CTRL_ERR_MASK 0x000000FF
#define FD_CTRL_UFD 0x00000004
#define FD_CTRL_SBE 0x00000008
#define FD_CTRL_FLC 0x00000010
#define FD_CTRL_FSE 0x00000020
#define FD_CTRL_FAERR 0x00000040
/* Annotation bits in FD CTRL */
#define FD_CTRL_PTA 0x00800000
#define FD_CTRL_PTV1 0x00400000
enum dpaa2_fd_format {
dpaa2_fd_single = 0,
dpaa2_fd_list,
dpaa2_fd_sg
};
/**
* dpaa2_fd_get_addr() - get the addr field of frame descriptor
* @fd: the given frame descriptor
*
* Return the address in the frame descriptor.
*/
static inline dma_addr_t dpaa2_fd_get_addr(const struct dpaa2_fd *fd)
{
return (dma_addr_t)le64_to_cpu(fd->simple.addr);
}
/**
* dpaa2_fd_set_addr() - Set the addr field of frame descriptor
* @fd: the given frame descriptor
* @addr: the address needs to be set in frame descriptor
*/
static inline void dpaa2_fd_set_addr(struct dpaa2_fd *fd, dma_addr_t addr)
{
fd->simple.addr = cpu_to_le64(addr);
}
/**
* dpaa2_fd_get_frc() - Get the frame context in the frame descriptor
* @fd: the given frame descriptor
*
* Return the frame context field in the frame descriptor.
*/
static inline u32 dpaa2_fd_get_frc(const struct dpaa2_fd *fd)
{
return le32_to_cpu(fd->simple.frc);
}
Annotation
- Immediate include surface: `linux/byteorder/generic.h`, `linux/types.h`.
- Detected declarations: `struct dpaa2_fd`, `struct dpaa2_fd_simple`, `struct dpaa2_sg_entry`, `struct dpaa2_fl_entry`, `enum dpaa2_fd_format`, `enum dpaa2_sg_format`, `enum dpaa2_fl_format`, `function dpaa2_fd_get_addr`, `function dpaa2_fd_set_addr`, `function dpaa2_fd_get_frc`.
- Atlas domain: Repository Root And Misc / include.
- 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.