Browse Source

fix(intel): always set doorbell to SDM after sending command

This patch fixes the mailbox stall issue when sending mailbox command
that is larger than mailbox command FIFO size.

Large mailbox command will be sent to SDM in multiple chunks. HPS will
set doorbell to SDM when command FIFO full (is_doorbell_triggered will
be set to 1) to notify SDM to read the command data from FIFO, so that
HPS can continue to send the next chunk of command data.

However, HPS will not set the doorbell to SDM at the end if the doorbell
have been set earlier due to FIFO full. This will cause SDM mailbox
service stall because it is still waiting for last chunk of command data.

This patch fixes the code to always set the doorbell to SDM at the end
to get rid of stall issue.

Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Change-Id: Idbe62410a00d92a30c7aeaa26d53d79a910cac0a
pull/1985/head
Siew Chin Lim 3 years ago
committed by Sieu Mun Tang
parent
commit
e93551bb3b
  1. 6
      plat/intel/soc/common/soc/socfpga_mailbox.c

6
plat/intel/soc/common/soc/socfpga_mailbox.c

@ -1,5 +1,5 @@
/*
* Copyright (c) 2020, Intel Corporation. All rights reserved.
* Copyright (c) 2020-2022, Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@ -107,9 +107,7 @@ static int fill_mailbox_circular_buffer(uint32_t header_cmd, uint32_t *args,
}
}
if (!is_doorbell_triggered) {
mmio_write_32(MBOX_OFFSET + MBOX_DOORBELL_TO_SDM, 1U);
}
mmio_write_32(MBOX_OFFSET + MBOX_DOORBELL_TO_SDM, 1U);
return MBOX_RET_OK;

Loading…
Cancel
Save