Skip to content
Snippets Groups Projects
  • Etienne Carriere's avatar
    a9b83c8d
    clk: stm32mp1: pm for clock under secure RCC registers · a9b83c8d
    Etienne Carriere authored
    
    When RCC[TZEN] is enabled secure world needs to save the secure and
    non-secure clock configuration settings and restore them when
    resuming.
    
    Function stm32mp1_clk_mpu_suspend()/stm32mp1_clk_mpu_resume() are
    made local and renamed clk_mpu_suspend()/clk_mpu_resume(). The
    overall clock configuration is saved with stm32mp1_clock_suspend()
    and restored with stm32mp1_clock_resume().
    
    Change-Id: I1fc0c693c59ffe972961c2b23f30a39a520f3aaa
    Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
    a9b83c8d
    History
    clk: stm32mp1: pm for clock under secure RCC registers
    Etienne Carriere authored
    
    When RCC[TZEN] is enabled secure world needs to save the secure and
    non-secure clock configuration settings and restore them when
    resuming.
    
    Function stm32mp1_clk_mpu_suspend()/stm32mp1_clk_mpu_resume() are
    made local and renamed clk_mpu_suspend()/clk_mpu_resume(). The
    overall clock configuration is saved with stm32mp1_clock_suspend()
    and restored with stm32mp1_clock_resume().
    
    Change-Id: I1fc0c693c59ffe972961c2b23f30a39a520f3aaa
    Signed-off-by: default avatarEtienne Carriere <etienne.carriere@st.com>
stm32mp1_context.h 1.03 KiB
/*
 * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef STM32MP1_CONTEXT_H
#define STM32MP1_CONTEXT_H

#include <stdbool.h>
#include <stdint.h>

#define DDR_CRC_GRANULE		32

void stm32_clean_context(void);
int stm32_save_context(uint32_t zq0cr0_zdata);
int stm32_restore_context(void);
unsigned long long stm32_get_stgen_from_context(void);
int stm32_restore_backup_reg(void);
uint32_t stm32_get_zdata_from_context(void);
int stm32_get_pll1_settings_from_context(void);
bool stm32_are_pll1_settings_valid_in_context(void);
int stm32_save_boot_interface(uint32_t interface, uint32_t instance);
int stm32_get_boot_interface(uint32_t *interface, uint32_t *instance);
void stm32_save_ddr_training_area(void);
void stm32_restore_ddr_training_area(void);
uint32_t stm32_pm_get_optee_ep(void);

void stm32mp1_pm_save_clock_cfg(size_t offset, uint8_t *data, size_t size);
void stm32mp1_pm_restore_clock_cfg(size_t offset, uint8_t *data, size_t size);

#endif /* STM32MP1_CONTEXT_H */