From 07915a4fd5848fbac69dcbf28f00353eed10a942 Mon Sep 17 00:00:00 2001 From: "Abdul Halim, Muhammad Hadi Asyrafi" Date: Fri, 20 Nov 2020 11:41:59 +0800 Subject: [PATCH] fix(intel): get config status OK status Config status have different OK requirement between MBOX_CONFIG_STATUS and MBOX_RECONFIG_STATUS request. This patch adds the checking to differentiate between both command. Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi Change-Id: I45a4c3de460b031757dbcbd0b3a8055cb0a55aff Signed-off-by: Jit Loon Lim --- plat/intel/soc/common/soc/socfpga_mailbox.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plat/intel/soc/common/soc/socfpga_mailbox.c b/plat/intel/soc/common/soc/socfpga_mailbox.c index be900c967..fbb6b465e 100644 --- a/plat/intel/soc/common/soc/socfpga_mailbox.c +++ b/plat/intel/soc/common/soc/socfpga_mailbox.c @@ -507,11 +507,13 @@ int intel_mailbox_get_config_status(uint32_t cmd, bool init_done) return MBOX_CFGSTAT_STATE_ERROR_HARDWARE; } - if ((res & SOFTFUNC_STATUS_CONF_DONE) == 0U) + if ((res & SOFTFUNC_STATUS_CONF_DONE) == 0U) { return MBOX_CFGSTAT_STATE_CONFIG; + } - if (init_done && (res & SOFTFUNC_STATUS_INIT_DONE) == 0U) + if (init_done && (res & SOFTFUNC_STATUS_INIT_DONE) == 0U) { return MBOX_CFGSTAT_STATE_CONFIG; + } return MBOX_RET_OK; }