1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright 2021 NXP
4  *
5  * Brief   CAAM Clock functions.
6  */
7 #include <caam_hal_clk.h>
8 #include <io.h>
9 #include <mm/core_memprot.h>
10 #include <platform_config.h>
11 
caam_hal_clk_enable(bool enable)12 void caam_hal_clk_enable(bool enable)
13 {
14 	vaddr_t pcc3_base = (vaddr_t)phys_to_virt(PCC3_BASE, MEM_AREA_IO_SEC,
15 						  PCC3_SIZE);
16 
17 	if (enable)
18 		io_setbits32(pcc3_base + PCC_CAAM, PCC_ENABLE_CLOCK);
19 	else
20 		io_clrbits32(pcc3_base + PCC_CAAM, PCC_ENABLE_CLOCK);
21 }
22