All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@amd.com>
To: Subhash Jadavani <subhashj@codeaurora.org>
Cc: linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	arindam.nath@amd.com
Subject: Re: [PATCH v1 1/1] mmc: bus: print bus speed mode of UHS-I card
Date: Mon, 26 Mar 2012 11:17:24 +0800	[thread overview]
Message-ID: <20120326031723.GA22292@ladygaga> (raw)
In-Reply-To: <1332482196-22572-1-git-send-email-subhashj@codeaurora.org>

Hi Subhash,

On Fri, Mar 23, 2012 at 11:26:36AM +0530, Subhash Jadavani wrote:
> When UHS-I card is detected also print the bus speed mode
> in which UHS-I card will be running.

The patch looks correct to me, except that I' m not sure if this is
needed. /sys/kernel/debug/mmc/ios also has such info.

-Aaron

> 
> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
> ---
>  drivers/mmc/core/bus.c |   26 +++++++++++++++++++++++++-
>  1 files changed, 25 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 5d011a3..0517a91 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -267,6 +267,7 @@ int mmc_add_card(struct mmc_card *card)
>  {
>  	int ret;
>  	const char *type;
> +	const char *uhs_bus_speed_mode = "";
>  
>  	dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca);
>  
> @@ -296,6 +297,28 @@ int mmc_add_card(struct mmc_card *card)
>  		break;
>  	}
>  
> +	if (mmc_sd_card_uhs(card)) {
> +		switch (card->sd_bus_speed) {
> +		case UHS_SDR104_BUS_SPEED:
> +			uhs_bus_speed_mode = "SDR104 ";
> +			break;
> +		case UHS_SDR50_BUS_SPEED:
> +			uhs_bus_speed_mode = "SDR50 ";
> +			break;
> +		case UHS_DDR50_BUS_SPEED:
> +			uhs_bus_speed_mode = "DDR50 ";
> +			break;
> +		case UHS_SDR25_BUS_SPEED:
> +			uhs_bus_speed_mode = "SDR25 ";
> +			break;
> +		case UHS_SDR12_BUS_SPEED:
> +			uhs_bus_speed_mode = "SDR12 ";
> +			break;
> +		default:
> +			uhs_bus_speed_mode = "";
> +			break;
> +		}
> +	}
>  	if (mmc_host_is_spi(card->host)) {
>  		pr_info("%s: new %s%s%s card on SPI\n",
>  			mmc_hostname(card->host),
> @@ -303,12 +326,13 @@ int mmc_add_card(struct mmc_card *card)
>  			mmc_card_ddr_mode(card) ? "DDR " : "",
>  			type);
>  	} else {
> -		pr_info("%s: new %s%s%s%s card at address %04x\n",
> +		pr_info("%s: new %s%s%s%s%s card at address %04x\n",
>  			mmc_hostname(card->host),
>  			mmc_card_uhs(card) ? "ultra high speed " :
>  			(mmc_card_highspeed(card) ? "high speed " : ""),
>  			(mmc_card_hs200(card) ? "HS200 " : ""),
>  			mmc_card_ddr_mode(card) ? "DDR " : "",
> +			uhs_bus_speed_mode,
>  			type, card->rca);
>  	}
>  
> -- 
> 1.7.1.1
> 
> --
> Sent by a consultant of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2012-03-26  3:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  5:56 [PATCH v1 1/1] mmc: bus: print bus speed mode of UHS-I card Subhash Jadavani
2012-03-26  3:17 ` Aaron Lu [this message]
2012-03-26  6:16   ` Subhash Jadavani
2012-03-26  6:30     ` Subhash Jadavani
2012-03-28  1:09       ` Aaron Lu
2012-03-26  6:25 ` Stephen Boyd
2012-04-01  3:55   ` Chris Ball

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=20120326031723.GA22292@ladygaga \
    --to=aaron.lu@amd.com \
    --cc=arindam.nath@amd.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=subhashj@codeaurora.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 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.