• Home
  • Raw
  • Download

Lines Matching refs:fd

103 static inline dma_addr_t dpaa2_fd_get_addr(const struct dpaa2_fd *fd)  in dpaa2_fd_get_addr()  argument
105 return (dma_addr_t)le64_to_cpu(fd->simple.addr); in dpaa2_fd_get_addr()
113 static inline void dpaa2_fd_set_addr(struct dpaa2_fd *fd, dma_addr_t addr) in dpaa2_fd_set_addr() argument
115 fd->simple.addr = cpu_to_le64(addr); in dpaa2_fd_set_addr()
124 static inline u32 dpaa2_fd_get_frc(const struct dpaa2_fd *fd) in dpaa2_fd_get_frc() argument
126 return le32_to_cpu(fd->simple.frc); in dpaa2_fd_get_frc()
134 static inline void dpaa2_fd_set_frc(struct dpaa2_fd *fd, u32 frc) in dpaa2_fd_set_frc() argument
136 fd->simple.frc = cpu_to_le32(frc); in dpaa2_fd_set_frc()
145 static inline u32 dpaa2_fd_get_ctrl(const struct dpaa2_fd *fd) in dpaa2_fd_get_ctrl() argument
147 return le32_to_cpu(fd->simple.ctrl); in dpaa2_fd_get_ctrl()
155 static inline void dpaa2_fd_set_ctrl(struct dpaa2_fd *fd, u32 ctrl) in dpaa2_fd_set_ctrl() argument
157 fd->simple.ctrl = cpu_to_le32(ctrl); in dpaa2_fd_set_ctrl()
166 static inline dma_addr_t dpaa2_fd_get_flc(const struct dpaa2_fd *fd) in dpaa2_fd_get_flc() argument
168 return (dma_addr_t)le64_to_cpu(fd->simple.flc); in dpaa2_fd_get_flc()
176 static inline void dpaa2_fd_set_flc(struct dpaa2_fd *fd, dma_addr_t flc_addr) in dpaa2_fd_set_flc() argument
178 fd->simple.flc = cpu_to_le64(flc_addr); in dpaa2_fd_set_flc()
181 static inline bool dpaa2_fd_short_len(const struct dpaa2_fd *fd) in dpaa2_fd_short_len() argument
183 return !!((le16_to_cpu(fd->simple.format_offset) >> in dpaa2_fd_short_len()
193 static inline u32 dpaa2_fd_get_len(const struct dpaa2_fd *fd) in dpaa2_fd_get_len() argument
195 if (dpaa2_fd_short_len(fd)) in dpaa2_fd_get_len()
196 return le32_to_cpu(fd->simple.len) & FD_SHORT_LEN_MASK; in dpaa2_fd_get_len()
198 return le32_to_cpu(fd->simple.len); in dpaa2_fd_get_len()
206 static inline void dpaa2_fd_set_len(struct dpaa2_fd *fd, u32 len) in dpaa2_fd_set_len() argument
208 fd->simple.len = cpu_to_le32(len); in dpaa2_fd_set_len()
217 static inline uint16_t dpaa2_fd_get_offset(const struct dpaa2_fd *fd) in dpaa2_fd_get_offset() argument
219 return le16_to_cpu(fd->simple.format_offset) & FD_OFFSET_MASK; in dpaa2_fd_get_offset()
227 static inline void dpaa2_fd_set_offset(struct dpaa2_fd *fd, uint16_t offset) in dpaa2_fd_set_offset() argument
229 fd->simple.format_offset &= cpu_to_le16(~FD_OFFSET_MASK); in dpaa2_fd_set_offset()
230 fd->simple.format_offset |= cpu_to_le16(offset); in dpaa2_fd_set_offset()
240 const struct dpaa2_fd *fd) in dpaa2_fd_get_format() argument
242 return (enum dpaa2_fd_format)((le16_to_cpu(fd->simple.format_offset) in dpaa2_fd_get_format()
251 static inline void dpaa2_fd_set_format(struct dpaa2_fd *fd, in dpaa2_fd_set_format() argument
254 fd->simple.format_offset &= in dpaa2_fd_set_format()
256 fd->simple.format_offset |= cpu_to_le16(format << FD_FORMAT_SHIFT); in dpaa2_fd_set_format()
265 static inline uint16_t dpaa2_fd_get_bpid(const struct dpaa2_fd *fd) in dpaa2_fd_get_bpid() argument
267 return le16_to_cpu(fd->simple.bpid) & FD_BPID_MASK; in dpaa2_fd_get_bpid()
275 static inline void dpaa2_fd_set_bpid(struct dpaa2_fd *fd, uint16_t bpid) in dpaa2_fd_set_bpid() argument
277 fd->simple.bpid &= cpu_to_le16(~(FD_BPID_MASK)); in dpaa2_fd_set_bpid()
278 fd->simple.bpid |= cpu_to_le16(bpid); in dpaa2_fd_set_bpid()