Lines Matching refs:val
55 uint32_t val = 0, timeout = 0, sha_status, aes_status; in tegra_se_is_operation_complete() local
64 val = tegra_se_read_32(CTX_SAVE_AUTO_STATUS); in tegra_se_is_operation_complete()
65 se_is_busy = ((val & CTX_SAVE_AUTO_SE_BUSY) != 0U); in tegra_se_is_operation_complete()
101 uint32_t val = 0, timeout = 0; in tegra_se_is_ready() local
106 val = tegra_se_read_32(CTX_SAVE_AUTO_STATUS); in tegra_se_is_ready()
107 se_is_ready = (val == CTX_SAVE_AUTO_SE_READY); in tegra_se_is_ready()
195 uint32_t val = 0U; in tegra_se_sha256_hash_operation_complete() local
198 val = tegra_se_read_32(SE0_INT_STATUS_REG_OFFSET); in tegra_se_sha256_hash_operation_complete()
199 while (SE0_INT_OP_DONE(val) == SE0_INT_OP_DONE_CLEAR) { in tegra_se_sha256_hash_operation_complete()
200 val = tegra_se_read_32(SE0_INT_STATUS_REG_OFFSET); in tegra_se_sha256_hash_operation_complete()
201 if (SE0_INT_OP_DONE(val) != SE0_INT_OP_DONE_CLEAR) { in tegra_se_sha256_hash_operation_complete()
207 val = tegra_se_read_32(SE0_SHA_STATUS_0); in tegra_se_sha256_hash_operation_complete()
208 while (val != SE0_SHA_STATUS_IDLE) { in tegra_se_sha256_hash_operation_complete()
209 val = tegra_se_read_32(SE0_SHA_STATUS_0); in tegra_se_sha256_hash_operation_complete()
210 if (val == SE0_SHA_STATUS_IDLE) { in tegra_se_sha256_hash_operation_complete()
216 val = tegra_se_read_32(SE0_ERR_STATUS_REG_OFFSET); in tegra_se_sha256_hash_operation_complete()
217 if (val != 0U) { in tegra_se_sha256_hash_operation_complete()
219 val); in tegra_se_sha256_hash_operation_complete()
232 uint32_t val = 0U; in tegra_se_start_normal_operation() local
250 val = tegra_se_read_32(SE0_INT_STATUS_REG_OFFSET); in tegra_se_start_normal_operation()
251 if (val > 0U) { in tegra_se_start_normal_operation()
275 uint32_t val, last_buf, i; in tegra_se_calculate_sha256_hash() local
300 val = (uint32_t)(SE0_CONFIG_ENC_ALG_SHA | SE0_CONFIG_ENC_MODE_SHA256 | in tegra_se_calculate_sha256_hash()
302 tegra_se_write_32(SE0_SHA_CONFIG, val); in tegra_se_calculate_sha256_hash()
341 val = SE0_SHA_CONFIG_HW_INIT_HASH; in tegra_se_calculate_sha256_hash()
349 val = tegra_se_read_32(SE0_SHA_HASH_RESULT_0 + in tegra_se_calculate_sha256_hash()
352 val); in tegra_se_calculate_sha256_hash()
354 val = SE0_SHA_CONFIG_HW_INIT_HASH_DISABLE; in tegra_se_calculate_sha256_hash()
362 tegra_se_write_32(SE0_SHA_TASK_CONFIG, val); in tegra_se_calculate_sha256_hash()
387 uint32_t val = 0U, hash_offset = 0U, scratch_offset = 0U; in tegra_se_save_sha256_pmc_scratch() local
400 val = tegra_se_read_32(SE0_SHA_HASH_RESULT_0 + hash_offset); in tegra_se_save_sha256_pmc_scratch()
402 val); in tegra_se_save_sha256_pmc_scratch()
415 int32_t val = 0; in tegra_se_calculate_save_sha256() local
429 val = tegra_se_calculate_sha256_hash(src_addr, src_len_inbyte); in tegra_se_calculate_save_sha256()
430 if (val != 0) { in tegra_se_calculate_save_sha256()
432 return val; in tegra_se_calculate_save_sha256()
441 val = tegra_se_save_sha256_pmc_scratch(); in tegra_se_calculate_save_sha256()
442 if (val != 0) { in tegra_se_calculate_save_sha256()
446 return val; in tegra_se_calculate_save_sha256()