public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Shawn Lin <shawn.lin@rock-chips.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org
Subject: Re: [RFC PATCH v2 6/6] mmc: sdhci: remove CONFIG_MMC_DEBUG from the driver
Date: Wed, 19 Jul 2017 11:24:09 +0300	[thread overview]
Message-ID: <3ca331c8-9e43-bcde-59ff-669cf28097a0@intel.com> (raw)
In-Reply-To: <1500450949-206953-5-git-send-email-shawn.lin@rock-chips.com>

On 19/07/17 10:55, Shawn Lin wrote:
> sdhci uses CONFIG_MMC_DEBUG for showing ADMA descriptor
> when occurring ADMA error. And it's also used to  dump the
> registers whenever calling sdhci_add_host.
> 
> On one hand, I don't see any burden to always print the state
> ADMA descriptor as it's rare and will help folks better understand
> what was happening when seeing ADMA error.
> 
> On the other, folks may be interested in checking some registers
> at probe time. So we remove the sdhci_dumpregs from __sdhci_add_host
> and print some really useful registers in sdhci_setup_host.
> 
> Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> 
> ---
> 
> Changes in v2:
> - rework the changes for sdhci suggested by Adrian
> 
>  drivers/mmc/host/sdhci.c | 15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index ecd0d43..cf2166e 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -2502,7 +2502,6 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
>  		sdhci_finish_command(host);
>  }
>  
> -#ifdef CONFIG_MMC_DEBUG
>  static void sdhci_adma_show_error(struct sdhci_host *host)
>  {
>  	void *desc = host->adma_table;
> @@ -2530,9 +2529,6 @@ static void sdhci_adma_show_error(struct sdhci_host *host)
>  			break;
>  	}
>  }
> -#else
> -static void sdhci_adma_show_error(struct sdhci_host *host) { }
> -#endif
>  
>  static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
>  {
> @@ -3230,6 +3226,13 @@ int sdhci_setup_host(struct sdhci_host *host)
>  	if (ret == -EPROBE_DEFER)
>  		return ret;
>  
> +	DBG("Version:   0x%08x | Present:  0x%08x\n",
> +	    sdhci_readw(host, SDHCI_HOST_VERSION),
> +	    sdhci_readl(host, SDHCI_PRESENT_STATE));
> +	DBG("Caps:      0x%08x | Caps_1:   0x%08x\n",
> +	    sdhci_readl(host, SDHCI_CAPABILITIES),
> +	    sdhci_readl(host, SDHCI_CAPABILITIES_1));
> +
>  	sdhci_read_caps(host);
>  
>  	override_timeout_clk = host->timeout_clk;
> @@ -3747,10 +3750,6 @@ int __sdhci_add_host(struct sdhci_host *host)
>  		goto untasklet;
>  	}
>  
> -#ifdef CONFIG_MMC_DEBUG
> -	sdhci_dumpregs(host);
> -#endif
> -
>  	ret = sdhci_led_register(host);
>  	if (ret) {
>  		pr_err("%s: Failed to register LED device: %d\n",
> 


  reply	other threads:[~2017-07-19  8:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19  7:50 [RFC PATCH v2 0/6] Try to get rid of CONFIG_MMC_DEBUG Shawn Lin
2017-07-19  7:50 ` [RFC PATCH v2 1/6] mmc: core: remove check of host->removed for rescan routine Shawn Lin
2017-07-19  7:55 ` [RFC PATCH v2 2/6] mmc: core: always check the length of sglist with total data size Shawn Lin
2017-07-19  7:55   ` [RFC PATCH v2 3/6] mmc: core: turn the pr_info under CONFIG_MMC_DEBUG into pr_debug Shawn Lin
2017-07-19  7:55   ` [RFC PATCH v2 4/6] mmc: Kconfig: downgrade CONFIG_MMC_DEBUG for host drivers only Shawn Lin
2017-07-19  7:55   ` [RFC PATCH v2 5/6] mmc: wbsd: remove CONFIG_MMC_DEBUG from the driver Shawn Lin
2017-07-19  7:55   ` [RFC PATCH v2 6/6] mmc: sdhci: " Shawn Lin
2017-07-19  8:24     ` Adrian Hunter [this message]
2017-07-27 14:48 ` [RFC PATCH v2 0/6] Try to get rid of CONFIG_MMC_DEBUG 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=3ca331c8-9e43-bcde-59ff-669cf28097a0@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    /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