Skip to content
Snippets Groups Projects
Commit 168886ae authored by Nicolas Le Bayon's avatar Nicolas Le Bayon Committed by Sebastien Pasdeloup
Browse files

bsec: add scratch register access API


Add read/write functions for BSEC scratch register, used for communication
with external agent, and to store boot parameters.

Change-Id: If024bcce127c829d8a663df0119f0e908712405e
Signed-off-by: default avatarNicolas Le Bayon <nicolas.le.bayon@st.com>
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/tf-a/+/187860


Reviewed-by: default avatarCITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: default avatarYann GAUTIER <yann.gautier@st.com>
parent 45ebef67
No related branches found
No related tags found
No related merge requests found
......@@ -637,6 +637,26 @@ uint32_t bsec_read_debug_conf(void)
return mmio_read_32(bsec_base + BSEC_DEN_OFF);
}
/*
* bsec_write_scratch: write value in scratch register.
* val: value to write.
* return value: none.
*/
void bsec_write_scratch(uint32_t val)
{
bsec_lock();
mmio_write_32(bsec_base + BSEC_SCRATCH_OFF, val);
bsec_unlock();
}
/*
* bsec_read_scratch: return scratch register value.
*/
uint32_t bsec_read_scratch(void)
{
return mmio_read_32(bsec_base + BSEC_SCRATCH_OFF);
}
/*
* bsec_get_status: return status register value.
*/
......
......@@ -108,6 +108,9 @@ uint32_t bsec_permanent_lock_otp(uint32_t otp);
void bsec_write_debug_conf(uint32_t val);
uint32_t bsec_read_debug_conf(void);
void bsec_write_scratch(uint32_t val);
uint32_t bsec_read_scratch(void);
uint32_t bsec_get_status(void);
uint32_t bsec_get_hw_conf(void);
uint32_t bsec_get_version(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment