]> git.baikalelectronics.ru Git - uboot.git/commit
arm: stm32mp: protect DBGMCU_IDC access with BSEC
authorPatrick Delaunay <patrick.delaunay@st.com>
Tue, 16 Jun 2020 16:27:44 +0000 (18:27 +0200)
committerPatrick Delaunay <patrick.delaunay@st.com>
Tue, 7 Jul 2020 14:01:23 +0000 (16:01 +0200)
commit3be8994b82f17824b70be2999e5a2af53ae5696e
tree801d0d34f6335506ceaf86a7ee0775f226d44054
parent1104b096aa3c747f6f1c80e92e1802738564a3db
arm: stm32mp: protect DBGMCU_IDC access with BSEC

As debugger must be totally closed on Sec closed chip,
the DBGMCU_IDC register is no more accessible (self
hosted debug is disabled with OTP).

This patch adds a function bsec_dbgswenable() to check
if the DBGMCU registers are available before to access them:
BSEC_DENABLE.DBGSWENABLE = self hosted debug status.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
arch/arm/mach-stm32mp/bsec.c
arch/arm/mach-stm32mp/cpu.c
arch/arm/mach-stm32mp/include/mach/bsec.h [new file with mode: 0644]