mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 20:38:03 +00:00
feat(st-bsec): use early traces
Replace trace macros with their corresponding EARLY_* macros. Add some early traces in bsec2 driver. Change-Id: I65e2feee6e7ba2524fb0a334557aa6e883672765 Signed-off-by: Yann Gautier <yann.gautier@st.com>
This commit is contained in:
parent
94cad75a35
commit
cf237f8d55
2 changed files with 14 additions and 4 deletions
|
@ -166,11 +166,13 @@ static void bsec_late_init(void)
|
||||||
struct dt_node_info bsec_info;
|
struct dt_node_info bsec_info;
|
||||||
|
|
||||||
if (fdt_get_address(&fdt) == 0) {
|
if (fdt_get_address(&fdt) == 0) {
|
||||||
|
EARLY_ERROR("%s: DT not found\n", __func__);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = bsec_get_dt_node(&bsec_info);
|
node = bsec_get_dt_node(&bsec_info);
|
||||||
if (node < 0) {
|
if (node < 0) {
|
||||||
|
EARLY_ERROR("%s: BSEC node not found\n", __func__);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,13 +228,21 @@ static uint32_t bsec_check_error(uint32_t otp, bool check_disturbed)
|
||||||
*/
|
*/
|
||||||
uint32_t bsec_probe(void)
|
uint32_t bsec_probe(void)
|
||||||
{
|
{
|
||||||
|
uint32_t version;
|
||||||
|
uint32_t id;
|
||||||
|
|
||||||
if (is_otp_invalid_mode()) {
|
if (is_otp_invalid_mode()) {
|
||||||
|
EARLY_ERROR("%s: otp_invalid_mod\n", __func__);
|
||||||
return BSEC_ERROR;
|
return BSEC_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((bsec_get_version() != BSEC_IP_VERSION_1_1) &&
|
version = bsec_get_version();
|
||||||
(bsec_get_version() != BSEC_IP_VERSION_2_0)) ||
|
id = bsec_get_id();
|
||||||
(bsec_get_id() != BSEC_IP_ID_2)) {
|
|
||||||
|
if (((version != BSEC_IP_VERSION_1_1) &&
|
||||||
|
(version != BSEC_IP_VERSION_2_0)) ||
|
||||||
|
(id != BSEC_IP_ID_2)) {
|
||||||
|
EARLY_ERROR("%s: version = 0x%x, id = 0x%x\n", __func__, version, id);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ uint32_t bsec_probe(void)
|
||||||
uint32_t id = bsec_get_id();
|
uint32_t id = bsec_get_id();
|
||||||
|
|
||||||
if ((version != BSEC_IP_VERSION_1_0) || (id != BSEC_IP_ID_3)) {
|
if ((version != BSEC_IP_VERSION_1_0) || (id != BSEC_IP_ID_3)) {
|
||||||
ERROR("%s: version = 0x%x, id = 0x%x\n", __func__, version, id);
|
EARLY_ERROR("%s: version = 0x%x, id = 0x%x\n", __func__, version, id);
|
||||||
panic();
|
panic();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue