Lines Matching +full:pre +full:- +full:delay
4 * SPDX-License-Identifier: Apache-2.0
56 * This struct is used by the hardware and must be stored in RAM first 4k-byte
57 * and aligned on a 256-byte boundary.
110 gctrl_regs->GCTRL_PMER3 |= IT8XXX2_GCTRL_SRAM_CRYPTO_USED; in it8xxx2_sha256_module_calculation()
119 /* Delay 15us */ in it8xxx2_sha256_module_calculation()
120 gctrl_regs->GCTRL_WNCKR = IT8XXX2_GCTRL_WN65K; in it8xxx2_sha256_module_calculation()
130 gctrl_regs->GCTRL_PMER3 &= ~IT8XXX2_GCTRL_SRAM_CRYPTO_USED; in it8xxx2_sha256_module_calculation()
131 gctrl_regs->GCTRL_PMER3; in it8xxx2_sha256_module_calculation()
138 return -ETIMEDOUT; in it8xxx2_sha256_module_calculation()
150 uint32_t rem_len = pkt->in_len; in it8xxx2_hash_handler()
160 rem_len = rem_len - SHA_SHA256_SRAM_BUF; in it8xxx2_hash_handler()
164 pkt->in_buf[in_buf_idx++]; in it8xxx2_hash_handler()
178 rem_len--; in it8xxx2_hash_handler()
180 pkt->in_buf[in_buf_idx++]; in it8xxx2_hash_handler()
200 chip_ctx.total_len += pkt->in_len; in it8xxx2_hash_handler()
203 uint32_t *ob_ptr = (uint32_t *)pkt->out_buf; in it8xxx2_hash_handler()
205 /* Pre-processing (Padding) */ in it8xxx2_hash_handler()
207 0, SHA_SHA256_BLOCK_LEN - chip_ctx.w_input_index); in it8xxx2_hash_handler()
226 0, SHA_SHA256_BLOCK_LEN - chip_ctx.w_input_index); in it8xxx2_hash_handler()
230 * Since input data (big-endian) are copied 1byte by 1byte to in it8xxx2_hash_handler()
231 * it8xxx2 memory (little-endian), so the bit length needs to in it8xxx2_hash_handler()
232 * be transformed into big-endian format and then write to memory. in it8xxx2_hash_handler()
253 gctrl_regs->GCTRL_PMER3 |= IT8XXX2_GCTRL_SRAM_CRYPTO_USED; in it8xxx2_hash_handler()
260 /* Delay 15us */ in it8xxx2_hash_handler()
261 gctrl_regs->GCTRL_WNCKR = IT8XXX2_GCTRL_WN65K; in it8xxx2_hash_handler()
272 gctrl_regs->GCTRL_PMER3 &= ~IT8XXX2_GCTRL_SRAM_CRYPTO_USED; in it8xxx2_hash_handler()
273 gctrl_regs->GCTRL_PMER3; in it8xxx2_hash_handler()
280 return -ETIMEDOUT; in it8xxx2_hash_handler()
311 return -EINVAL; in it8xxx2_hash_begin_session()
314 if (ctx->flags & ~(it8xxx2_query_hw_caps(dev))) { in it8xxx2_hash_begin_session()
316 return -EINVAL; in it8xxx2_hash_begin_session()
320 ctx->hash_hndlr = it8xxx2_hash_handler; in it8xxx2_hash_begin_session()
330 gctrl_regs->GCTRL_PMER3 &= ~IT8XXX2_GCTRL_SRAM_CRYPTO_USED; in it8xxx2_sha_init()
331 gctrl_regs->GCTRL_PMER3; in it8xxx2_sha_init()
335 /* Select SHA-2 Family, SHA-256 */ in it8xxx2_sha_init()