From 108d3eb6e65f8c5147369ec94d2a43ada37cbbd7 Mon Sep 17 00:00:00 2001 From: Konstantin Dorfman Date: Sun, 31 May 2015 10:10:13 +0300 Subject: [PATCH] mmc: cmdq-host: add post halt helper after halt ack interrupt After the CQE halt on some controllers need additional actions, before wakeup of waiting thread. Change-Id: I742baa48eb3f6eccf782d77a03aafe16ab7188f1 Signed-off-by: Konstantin Dorfman --- drivers/mmc/host/cmdq_hci.c | 2 ++ drivers/mmc/host/cmdq_hci.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c index dc8e19fd1441..2bf9330399a2 100644 --- a/drivers/mmc/host/cmdq_hci.c +++ b/drivers/mmc/host/cmdq_hci.c @@ -674,6 +674,8 @@ irqreturn_t cmdq_irq(struct mmc_host *mmc, int err) } if (status & CQIS_HAC) { + if (cq_host->ops->post_cqe_halt) + cq_host->ops->post_cqe_halt(mmc); /* halt is completed, wakeup waiting thread */ complete(&cq_host->halt_comp); } diff --git a/drivers/mmc/host/cmdq_hci.h b/drivers/mmc/host/cmdq_hci.h index 05c622c057e8..100b3177e4c7 100644 --- a/drivers/mmc/host/cmdq_hci.h +++ b/drivers/mmc/host/cmdq_hci.h @@ -201,6 +201,7 @@ struct cmdq_host_ops { int (*reset)(struct mmc_host *mmc); int (*crypto_cfg)(struct mmc_host *mmc, struct mmc_request *mrq, u32 slot); + void (*post_cqe_halt)(struct mmc_host *mmc); }; static inline void cmdq_writel(struct cmdq_host *host, u32 val, int reg)