[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c0dd5b4-5d9e-e559-81f5-fbf6024b67bb@intel.com>
Date: Mon, 31 Aug 2020 16:07:43 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Chun-Hung Wu <chun-hung.wu@...iatek.com>, mirq-linux@...e.qmqm.pl,
Jonathan Hunter <jonathanh@...dia.com>,
Al Cooper <alcooperx@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
bcm-kernel-feedback-list@...adcom.com,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Michal Simek <michal.simek@...inx.com>,
Thierry Reding <thierry.reding@...il.com>,
Chaotian Jing <chaotian.jing@...iatek.com>,
Mao Yong <yong.mao@...iatek.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Matthias Brugger <matthias.bgg@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Pavel Machek <pavel@....cz>,
Kate Stewart <kstewart@...uxfoundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Pan Bian <bianpan2016@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Allison Randal <allison@...utok.net>,
Mathieu Malaterre <malat@...ian.org>,
Asutosh Das <asutoshd@...eaurora.org>,
Ritesh Harjani <riteshh@...eaurora.org>,
Stanley Chu <stanley.chu@...iatek.com>,
Kuohong Wang <kuohong.wang@...iatek.com>
Cc: kernel-team@...roid.com, linux-kernel@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-mediatek@...ts.infradead.org,
devicetree@...r.kernel.org, wsd_upstream@...iatek.com,
linux-arm-kernel@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH v1 1/2] mmc: cqhci: add new cqhci_host_ops pre_enable()
and post_disable()
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@...iatek.com>
Acked-by: Adrian Hunter <adrian.hunter@...el.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)
>
Powered by blists - more mailing lists