From: Adrian Hunter <adrian.hunter@intel.com>
To: Chun-Hung Wu <chun-hung.wu@mediatek.com>,
mirq-linux@rere.qmqm.pl, Jonathan Hunter <jonathanh@nvidia.com>,
Al Cooper <alcooperx@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Michal Simek <michal.simek@xilinx.com>,
Thierry Reding <thierry.reding@gmail.com>,
Chaotian Jing <chaotian.jing@mediatek.com>,
Mao Yong <yong.mao@mediatek.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Pavel Machek <pavel@ucw.cz>,
Kate Stewart <kstewart@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Pan Bian <bianpan2016@163.com>,
Thomas Gleixner <tglx@linutronix.de>,
Allison Randal <allison@lohutok.net>,
Mathieu Malaterre <malat@debian.org>,
Asutosh Das <asutoshd@codeaurora.org>,
Ritesh Harjani <riteshh@codeaurora.org>,
Stanley Chu <stanley.chu@mediatek.com>,
Kuohong Wang <kuohong.wang@mediatek.com>
Cc: kernel-team@android.com, linux-kernel@vger.kernel.org,
linux-mmc@vger.kernel.org, linux-mediatek@lists.infradead.org,
devicetree@vger.kernel.org, wsd_upstream@mediatek.com,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH v1 1/2] mmc: cqhci: add new cqhci_host_ops pre_enable() and post_disable()
Date: Mon, 31 Aug 2020 16:07:43 +0300 [thread overview]
Message-ID: <9c0dd5b4-5d9e-e559-81f5-fbf6024b67bb@intel.com> (raw)
In-Reply-To: <1598520783-25250-2-git-send-email-chun-hung.wu@mediatek.com>
On 27/08/20 12:33 pm, Chun-Hung Wu wrote:
> Add pre_enable() and post_disable() for cqhci_host_ops.
> Add hook functions before cqhci enable and
> after cqhci disable for platforms need them.
>
> Signed-off-by: Chun-Hung Wu <chun-hung.wu@mediatek.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/cqhci.c | 6 ++++++
> drivers/mmc/host/cqhci.h | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/drivers/mmc/host/cqhci.c b/drivers/mmc/host/cqhci.c
> index cfa87df..697fe40 100644
> --- a/drivers/mmc/host/cqhci.c
> +++ b/drivers/mmc/host/cqhci.c
> @@ -376,6 +376,9 @@ static void cqhci_off(struct mmc_host *mmc)
> else
> pr_debug("%s: cqhci: CQE off\n", mmc_hostname(mmc));
>
> + if (cq_host->ops->post_disable)
> + cq_host->ops->post_disable(mmc);
> +
> mmc->cqe_on = false;
> }
>
> @@ -580,6 +583,9 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
> __cqhci_enable(cq_host);
>
> if (!mmc->cqe_on) {
> + if (cq_host->ops->pre_enable)
> + cq_host->ops->pre_enable(mmc);
> +
> cqhci_writel(cq_host, 0, CQHCI_CTL);
> mmc->cqe_on = true;
> pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc));
> diff --git a/drivers/mmc/host/cqhci.h b/drivers/mmc/host/cqhci.h
> index 4377001..89bf6ad 100644
> --- a/drivers/mmc/host/cqhci.h
> +++ b/drivers/mmc/host/cqhci.h
> @@ -206,6 +206,8 @@ struct cqhci_host_ops {
> void (*disable)(struct mmc_host *mmc, bool recovery);
> void (*update_dcmd_desc)(struct mmc_host *mmc, struct mmc_request *mrq,
> u64 *data);
> + void (*pre_enable)(struct mmc_host *mmc);
> + void (*post_disable)(struct mmc_host *mmc);
> };
>
> static inline void cqhci_writel(struct cqhci_host *host, u32 val, int reg)
>
next prev parent reply other threads:[~2020-08-31 13:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 9:33 [PATCH v1 0/2] mmc: cqhci: Add pre_enable() and post_disable() hook function Chun-Hung Wu
2020-08-27 9:33 ` [PATCH v1 1/2] mmc: cqhci: add new cqhci_host_ops pre_enable() and post_disable() Chun-Hung Wu
2020-08-31 13:07 ` Adrian Hunter [this message]
2020-08-27 9:33 ` [PATCH v1 2/2] mmc: mediatek: add pre_enable() and post_disable() hook function Chun-Hung Wu
2020-08-31 13:09 ` Adrian Hunter
2020-09-02 9:02 ` [PATCH v1 0/2] mmc: cqhci: Add " Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c0dd5b4-5d9e-e559-81f5-fbf6024b67bb@intel.com \
--to=adrian.hunter@intel.com \
--cc=agross@kernel.org \
--cc=alcooperx@gmail.com \
--cc=allison@lohutok.net \
--cc=asutoshd@codeaurora.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bianpan2016@163.com \
--cc=bjorn.andersson@linaro.org \
--cc=chaotian.jing@mediatek.com \
--cc=chun-hung.wu@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=kernel-team@android.com \
--cc=kstewart@linuxfoundation.org \
--cc=kuohong.wang@mediatek.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=malat@debian.org \
--cc=mark.rutland@arm.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=michal.simek@xilinx.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=pavel@ucw.cz \
--cc=riteshh@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=stanley.chu@mediatek.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=wsd_upstream@mediatek.com \
--cc=yong.mao@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®