[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <50346181.3010406@samsung.com>
Date: Wed, 22 Aug 2012 13:35:13 +0900
From: Jaehoon Chung <jh80.chung@...sung.com>
To: Doug Anderson <dianders@...omium.org>
Cc: linux-mmc@...r.kernel.org, Olof Johansson <olof@...om.net>,
Alim Akhtar <alim.akhtar@...sung.com>,
Thomas P Abraham <thomas.ab@...sung.com>,
Chris Ball <cjb@...top.org>,
Will Newton <will.newton@...tec.com>,
Seungwon Jeon <tgih.jun@...sung.com>,
Jaehoon Chung <jh80.chung@...sung.com>,
James Hogan <james.hogan@...tec.com>,
linux-kernel@...r.kernel.org,
Linus Walleij <linus.walleij@...aro.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH 1/2] mmc: core: Add a capability for disabling mmc cards
Hi Doug,
I didn't know what purpose is.
Why need to add the MMC_CAP2_NO_MMC?
If card is SD or SDIO, mmc_attach_mmc(host) should not be entered.
Could you explain to me in more detail?
Best Regards,
Jaehoon Chung
On 08/22/2012 01:05 PM, Doug Anderson wrote:
> On some systems we need a way to disable MMC card support in a MMC/SD
> card slot. Add support in the core SD/MMC code to support this.
>
> Signed-off-by: Doug Anderson <dianders@...omium.org>
> Signed-off-by: Alim Akhtar <alim.akhtar@...sung.com>
> ---
> drivers/mmc/core/core.c | 2 +-
> include/linux/mmc/host.h | 1 +
> 2 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 8ac5246..3214972 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1981,7 +1981,7 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
> return 0;
> if (!mmc_attach_sd(host))
> return 0;
> - if (!mmc_attach_mmc(host))
> + if (!(host->caps2 & MMC_CAP2_NO_MMC) && !mmc_attach_mmc(host))
> return 0;
>
> mmc_power_off(host);
> diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
> index f578a71..f36370e 100644
> --- a/include/linux/mmc/host.h
> +++ b/include/linux/mmc/host.h
> @@ -257,6 +257,7 @@ struct mmc_host {
> #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */
> #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */
> #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */
> +#define MMC_CAP2_NO_MMC (1 << 12) /* Only SD supported, not MMC */
>
> mmc_pm_flag_t pm_caps; /* supported pm features */
> unsigned int power_notify_type;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists