desc_constr.h (261ea058f016bc04fa064348ad9bf39d94379381) | desc_constr.h (8c419778ab57e497b5de1352aa39dbe2efb3ed54) |
---|---|
1/* 2 * caam descriptor construction helper functions 3 * 4 * Copyright 2008-2012 Freescale Semiconductor, Inc. 5 */ 6 7#include "desc.h" 8#include "regs.h" --- 63 unchanged lines hidden (view full) --- 72 options); 73} 74 75static inline void init_job_desc(u32 *desc, u32 options) 76{ 77 init_desc(desc, CMD_DESC_HDR | options); 78} 79 | 1/* 2 * caam descriptor construction helper functions 3 * 4 * Copyright 2008-2012 Freescale Semiconductor, Inc. 5 */ 6 7#include "desc.h" 8#include "regs.h" --- 63 unchanged lines hidden (view full) --- 72 options); 73} 74 75static inline void init_job_desc(u32 *desc, u32 options) 76{ 77 init_desc(desc, CMD_DESC_HDR | options); 78} 79 |
80static inline void init_job_desc_pdb(u32 *desc, u32 options, size_t pdb_bytes) 81{ 82 u32 pdb_len = (pdb_bytes + CAAM_CMD_SZ - 1) / CAAM_CMD_SZ; 83 84 init_job_desc(desc, (((pdb_len + 1) << HDR_START_IDX_SHIFT)) | options); 85} 86 |
|
80static inline void append_ptr(u32 *desc, dma_addr_t ptr) 81{ 82 dma_addr_t *offset = (dma_addr_t *)desc_end(desc); 83 84 *offset = cpu_to_caam_dma(ptr); 85 86 (*desc) = cpu_to_caam32(caam32_to_cpu(*desc) + 87 CAAM_PTR_SZ / CAAM_CMD_SZ); --- 317 unchanged lines hidden --- | 87static inline void append_ptr(u32 *desc, dma_addr_t ptr) 88{ 89 dma_addr_t *offset = (dma_addr_t *)desc_end(desc); 90 91 *offset = cpu_to_caam_dma(ptr); 92 93 (*desc) = cpu_to_caam32(caam32_to_cpu(*desc) + 94 CAAM_PTR_SZ / CAAM_CMD_SZ); --- 317 unchanged lines hidden --- |