1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright 2018 NXP
4  *
5  * Brief   Delay management utilities.
6  *         Primitive to delay a delay.
7  */
8 #include <arm.h>
9 #include <caam_utils_delay.h>
10 #include <types_ext.h>
11 
caam_udelay(uint32_t time)12 void caam_udelay(uint32_t time)
13 {
14 	uint32_t counter = time * 500;
15 
16 	/* Implementation of a Software loop assuming CPU clock of 500MHz */
17 	while (counter--) {
18 		isb();
19 		dsb();
20 	};
21 }
22