1 // SPDX-License-Identifier: BSD-2-Clause 2 /* 3 * Copyright 2018-2019 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)12void caam_hal_clk_enable(bool enable) 13 { 14 vaddr_t pcc2_base = (vaddr_t)phys_to_virt(PCC2_BASE, MEM_AREA_IO_SEC, 15 PCC_CAAM + sizeof(uint32_t)); 16 17 if (enable) 18 io_write32(pcc2_base + PCC_CAAM, PCC_ENABLE_CLOCK); 19 else 20 io_write32(pcc2_base + PCC_CAAM, PCC_DISABLE_CLOCK); 21 } 22