[bsp/cvitek]修正sdhci发送命令超时后触发两次信号量的问题

修正命令超时后触发两次信号量的问题

详解:
中断状态寄存器的BIT0仅表示sdhci处理命令完成,完成结果由其它位指示,当出错时
BIT0也会值1产生中断

Signed-off-by: heyuanjie87 <943313837@qq.com>
This commit is contained in:
heyuanjie87 2024-08-29 06:33:50 +08:00 committed by GitHub
parent 4f10d05a5b
commit b3fbddda80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -403,7 +403,6 @@ static void sdhci_cmd_irq(struct rthw_sdhci *sdhci, uint32_t intmask)
if (intmask & SDIF_INT_RESPONSE)
{
sdhci->cmd_error = RT_EOK;
if (sdhci->response_type == RESP_R2)
{
/* CRC is stripped so we need to do some shifting. */
@ -419,6 +418,8 @@ static void sdhci_cmd_irq(struct rthw_sdhci *sdhci, uint32_t intmask)
sdhci->response[0] = mmio_read_32(BASE + SDIF_RESPONSE_01);
LOG_D("sdhci->response: [%08x]", sdhci->response[0]);
}
rt_sem_release(sdhci->sem_cmd);
}
}
@ -486,7 +487,6 @@ static void sdhci_transfer_handle_irq(int irqno, void *param)
if (intmask & SDIF_INT_CMD_MASK)
{
sdhci_cmd_irq(sdhci, intmask & SDIF_INT_CMD_MASK);
rt_sem_release(sdhci->sem_cmd);
}
if (intmask & SDIF_INT_DMA_END)