Skip to content

Commit afdfcb0

Browse files
committed
drivers: stm32_bsec: fix debug not open on MP1
Align MP1 behaviour with MP2. We open the full debug even if the debug configuration return 0. Reading the debug configuration does not make any sense since we are opening the full debug all the bits. Change-Id: I06702e9f2fbf3be02a679d8842036fa5e2c82244 Signed-off-by: Thomas Bourgoin <[email protected]> Reviewed-on: https://gerrit.st.com/c/mpu/oe/optee/optee_os/+/533365 ACI: CITOOLS <[email protected]> Domain-Review: Yann GAUTIER <[email protected]> ACI: CIBUILD <[email protected]>
1 parent da492f6 commit afdfcb0

File tree

1 file changed

+2
-3
lines changed
  • core/arch/arm/plat-stm32mp1

1 file changed

+2
-3
lines changed

core/arch/arm/plat-stm32mp1/main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -534,19 +534,18 @@ static bool __maybe_unused bank_is_valid(unsigned int bank)
534534
static TEE_Result init_debug(void)
535535
{
536536
TEE_Result res = TEE_SUCCESS;
537-
uint32_t conf = stm32_bsec_read_debug_conf();
538537
struct clk *dbg_clk = stm32mp_rcc_clock_id_to_clk(CK_DBG);
539538
uint32_t state = 0;
540539

541540
res = stm32_bsec_get_state(&state);
542541
if (res)
543542
return res;
544543

545-
if (state != BSEC_STATE_SEC_CLOSED && conf) {
544+
if (state != BSEC_STATE_SEC_CLOSED) {
546545
if (IS_ENABLED(CFG_INSECURE))
547546
IMSG("WARNING: All debug accesses are allowed");
548547

549-
res = stm32_bsec_write_debug_conf(conf | STM32_BSEC_DEBUG_ALL);
548+
res = stm32_bsec_write_debug_conf(STM32_BSEC_DEBUG_ALL);
550549
if (res)
551550
return res;
552551

0 commit comments

Comments
 (0)