diff options
| author | Tom Rini <trini@konsulko.com> | 2020-07-07 14:00:44 -0400 | 
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2020-07-07 14:00:44 -0400 | 
| commit | 1e88e78177da80fa8e9fa9fc7613657478d61d1e (patch) | |
| tree | 9b713c7aab282891762ed8cdd6c1fffa195bd1ac /arch/arm/mach-stm32mp/cpu.c | |
| parent | c4df37bfa916d6516d67dde6ef9d1b18b36041d3 (diff) | |
| parent | 6c393e8c0fae98a3a6e2909fc79697075552a152 (diff) | |
Merge tag 'u-boot-stm32-20200707' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm
- arch and board update for stm32mp15:
  - use OPP information in device tree for 800MHz/650MHz support
  - ram: inprovments of test command
  - solve boot on closed chip when access to DBGMCU_IDC is protected
  - stm32prog command: Add "device anme" during USB enumeration
  - update configs: activate WATCHDOG and 'env erase' command,
    increase teed partition, support SD card after NOR boot by default and
    use env info in env_check
  - some sboard cleanups: gpio hog in dh board, specific driver for
    type-c stusb1600 controller code in a driver move part of code in spl.c
    and in common directory
- fix STM32 compatible for dwc_eth_qos driver
- support of new pinctrl ops get_dir_flags/set_dir_flags in stm32 and stmfx
  drivers
- vrefbuf: fix a possible overshoot when re-enabling
Diffstat (limited to 'arch/arm/mach-stm32mp/cpu.c')
| -rw-r--r-- | arch/arm/mach-stm32mp/cpu.c | 22 | 
1 files changed, 18 insertions, 4 deletions
| diff --git a/arch/arm/mach-stm32mp/cpu.c b/arch/arm/mach-stm32mp/cpu.c index 472b140321f..382067190ca 100644 --- a/arch/arm/mach-stm32mp/cpu.c +++ b/arch/arm/mach-stm32mp/cpu.c @@ -12,6 +12,7 @@  #include <misc.h>  #include <net.h>  #include <asm/io.h> +#include <asm/arch/bsec.h>  #include <asm/arch/stm32.h>  #include <asm/arch/sys_proto.h>  #include <dm/device.h> @@ -155,8 +156,13 @@ static void dbgmcu_init(void)  {  	setbits_le32(RCC_DBGCFGR, RCC_DBGCFGR_DBGCKEN); -	/* Freeze IWDG2 if Cortex-A7 is in debug mode */ -	setbits_le32(DBGMCU_APB4FZ1, DBGMCU_APB4FZ1_IWDG2); +	/* +	 * Freeze IWDG2 if Cortex-A7 is in debug mode +	 * done in TF-A for TRUSTED boot and +	 * DBGMCU access is controlled by BSEC_DENABLE.DBGSWENABLE +	*/ +	if (!IS_ENABLED(CONFIG_TFABOOT) && bsec_dbgswenable()) +		setbits_le32(DBGMCU_APB4FZ1, DBGMCU_APB4FZ1_IWDG2);  }  #endif /* !defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD) */ @@ -276,9 +282,17 @@ void enable_caches(void)  static u32 read_idc(void)  { -	setbits_le32(RCC_DBGCFGR, RCC_DBGCFGR_DBGCKEN); +	/* DBGMCU access is controlled by BSEC_DENABLE.DBGSWENABLE */ +	if (bsec_dbgswenable()) { +		setbits_le32(RCC_DBGCFGR, RCC_DBGCFGR_DBGCKEN); -	return readl(DBGMCU_IDC); +		return readl(DBGMCU_IDC); +	} + +	if (CONFIG_IS_ENABLED(STM32MP15x)) +		return CPU_DEV_STM32MP15; /* STM32MP15x and unknown revision */ +	else +		return 0x0;  }  u32 get_cpu_dev(void) | 
