diff options
author | Lionel Debieve <lionel.debieve@st.com> | 2019-09-16 12:17:09 +0200 |
---|---|---|
committer | Lionel Debieve <lionel.debieve@st.com> | 2019-09-20 23:21:10 +0200 |
commit | f700423c1f2426ca3c5ccb9ee4e765743424b074 (patch) | |
tree | 52c9c935db1b117e776437e65f905774617fc319 /drivers | |
parent | b1e0b11cc9e8a850a8e479927432068ce62a815a (diff) |
bsec: move bsec_mode_is_closed_device() service to platform
This BSEC service is a platform specific service. Implementation
moved to the platform part.
Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Change-Id: I1f70ed48a446860498ed111acce01187568538c9
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/st/bsec/bsec.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/st/bsec/bsec.c b/drivers/st/bsec/bsec.c index b3c15ee8..01c369ed 100644 --- a/drivers/st/bsec/bsec.c +++ b/drivers/st/bsec/bsec.c @@ -841,22 +841,6 @@ static uint32_t bsec_power_safmem(bool power) } /* - * bsec_mode_is_closed_device: read OTP secure sub-mode. - * return: false if open_device and true of closed_device. - */ -bool bsec_mode_is_closed_device(void) -{ - uint32_t value; - - if ((bsec_shadow_register(DATA0_OTP) != BSEC_OK) || - (bsec_read_otp(&value, DATA0_OTP) != BSEC_OK)) { - return true; - } - - return (value & DATA0_OTP_SECURED) == DATA0_OTP_SECURED; -} - -/* * bsec_shadow_read_otp: Load OTP from SAFMEM and provide its value * otp_value: read value. * word: OTP number. @@ -894,7 +878,7 @@ uint32_t bsec_check_nsec_access_rights(uint32_t otp) if (otp >= STM32MP1_UPPER_OTP_START) { /* Check if BSEC is in OTP-SECURED closed_device state. */ - if (bsec_mode_is_closed_device()) { + if (stm32mp_is_closed_device()) { if (!non_secure_can_access(otp)) { return BSEC_ERROR; } |