All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ritesh Harjani <ritesh.list@gmail.com>
To: Seunghwan Baek <sh8267.baek@samsung.com>,
	linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org,
	ulf.hansson@linaro.org, quic_asutoshd@quicinc.com,
	adrian.hunter@intel.com
Cc: grant.jung@samsung.com, jt77.jang@samsung.com,
	junwoo80.lee@samsung.com, dh0421.hwang@samsung.com,
	jangsub.yi@samsung.com, sh043.lee@samsung.com,
	cw9316.lee@samsung.com, sh8267.baek@samsung.com,
	wkon.kim@samsung.com
Subject: Re: [PATCH v2 2/2] cqhci-core: Make use cqhci_halted() routine
Date: Thu, 29 Aug 2024 12:18:33 +0530	[thread overview]
Message-ID: <87r0a7rfi6.fsf@gmail.com> (raw)
In-Reply-To: <20240829061823.3718-3-sh8267.baek@samsung.com>

Seunghwan Baek <sh8267.baek@samsung.com> writes:

> Code to check whether cqe is in halt state is modified to cqhci_halted,
> which has already been implemented.
>
> Signed-off-by: Seunghwan Baek <sh8267.baek@samsung.com>

LGTM. Please feel free to add - 

Reviewed-by: Ritesh Harjani <ritesh.list@gmail.com> 


> ---
>  drivers/mmc/host/cqhci-core.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c
> index a02da26a1efd..178277d90c31 100644
> --- a/drivers/mmc/host/cqhci-core.c
> +++ b/drivers/mmc/host/cqhci-core.c
> @@ -33,6 +33,11 @@ struct cqhci_slot {
>  #define CQHCI_HOST_OTHER	BIT(4)
>  };
>  
> +static bool cqhci_halted(struct cqhci_host *cq_host)
> +{
> +	return cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT;
> +}
> +
>  static inline u8 *get_desc(struct cqhci_host *cq_host, u8 tag)
>  {
>  	return cq_host->desc_base + (tag * cq_host->slot_sz);
> @@ -282,7 +287,7 @@ static void __cqhci_enable(struct cqhci_host *cq_host)
>  
>  	cqhci_writel(cq_host, cqcfg, CQHCI_CFG);
>  
> -	if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT)
> +	if (cqhci_halted(cq_host))
>  		cqhci_writel(cq_host, 0, CQHCI_CTL);
>  
>  	mmc->cqe_on = true;
> @@ -617,7 +622,7 @@ static int cqhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
>  		cqhci_writel(cq_host, 0, CQHCI_CTL);
>  		mmc->cqe_on = true;
>  		pr_debug("%s: cqhci: CQE on\n", mmc_hostname(mmc));
> -		if (cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT) {
> +		if (cqhci_halted(cq_host)) {
>  			pr_err("%s: cqhci: CQE failed to exit halt state\n",
>  			       mmc_hostname(mmc));
>  		}
> @@ -953,11 +958,6 @@ static bool cqhci_clear_all_tasks(struct mmc_host *mmc, unsigned int timeout)
>  	return ret;
>  }
>  
> -static bool cqhci_halted(struct cqhci_host *cq_host)
> -{
> -	return cqhci_readl(cq_host, CQHCI_CTL) & CQHCI_HALT;
> -}
> -
>  static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout)
>  {
>  	struct cqhci_host *cq_host = mmc->cqe_private;
> -- 
> 2.17.1

  reply	other threads:[~2024-08-29  6:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240829061834epcas1p127b6ec517e904efbf1eba945fbfd4bb0@epcas1p1.samsung.com>
2024-08-29  6:18 ` [PATCH v2 0/2] mmc: cqhci: Fix for check CQHCI_HALT state Seunghwan Baek
2024-08-29  6:18   ` [PATCH v2 1/2] mmc: cqhci: Fix checking of " Seunghwan Baek
2024-08-29  6:46     ` Ritesh Harjani
2024-09-02 10:27     ` Adrian Hunter
2024-09-03 12:37     ` Ulf Hansson
2024-08-29  6:18   ` [PATCH v2 2/2] cqhci-core: Make use cqhci_halted() routine Seunghwan Baek
2024-08-29  6:48     ` Ritesh Harjani [this message]
2024-09-02 10:34     ` Adrian Hunter
2024-09-03 12:37     ` 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=87r0a7rfi6.fsf@gmail.com \
    --to=ritesh.list@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=cw9316.lee@samsung.com \
    --cc=dh0421.hwang@samsung.com \
    --cc=grant.jung@samsung.com \
    --cc=jangsub.yi@samsung.com \
    --cc=jt77.jang@samsung.com \
    --cc=junwoo80.lee@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=quic_asutoshd@quicinc.com \
    --cc=sh043.lee@samsung.com \
    --cc=sh8267.baek@samsung.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wkon.kim@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.