Skip to content
Snippets Groups Projects
Commit e1cabb62 authored by Lionel Debieve's avatar Lionel Debieve Committed by Sebastien Pasdeloup
Browse files

clk: stm32mp1: add function to control MCU subsystem


Add a new function to control the MCU subsystem
security state.

Signed-off-by: default avatarLionel Debieve <lionel.debieve@st.com>
Change-Id: I070eec06fc93a1214227f25a6a4f1c40c66c86b0
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/188430


Reviewed-by: default avatarCITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: default avatarGabriel FERNANDEZ <gabriel.fernandez@st.com>
Reviewed-by: default avatarEtienne CARRIERE <etienne.carriere@st.com>
Reviewed-by: default avatarYann GAUTIER <yann.gautier@st.com>
parent 9d40030f
No related branches found
No related tags found
No related merge requests found
......@@ -3368,6 +3368,17 @@ int stm32mp1_clock_stopmode_resume(void)
return 0;
}
void stm32mp1_clk_mcuss_protect(bool enable)
{
uintptr_t rcc_base = stm32mp_rcc_base();
if (enable) {
mmio_setbits_32(rcc_base + RCC_TZCR, RCC_TZCR_MCKPROT);
} else {
mmio_clrbits_32(rcc_base + RCC_TZCR, RCC_TZCR_MCKPROT);
}
}
/* Sync secure clock refcount after all drivers probe/inits, */
void stm32mp1_dump_clocks_state(void)
{
......
/*
* Copyright (c) 2018-2019, STMicroelectronics - All Rights Reserved
* Copyright (c) 2018-2020, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -57,6 +57,8 @@ int stm32mp1_clock_stopmode_resume(void);
void restore_clock_pm_context(void);
void save_clock_pm_context(void);
void stm32mp1_clk_mcuss_protect(bool enable);
void stm32mp1_dump_clocks_state(void);
#ifdef STM32MP_SHARED_RESOURCES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment