From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Maurus Cuelenaere' <mcuelenaere@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-mmc@vger.kernel.org,
ben-linux@fluff.org, akpm@linux-foundation.org,
'Hyuk Lee' <hyuk1.lee@samsung.com>
Subject: RE: [PATCH v3 3/3] sdhci-s3c: Add SDHCI_QUIRK_NO_WP_BIT quirk for Samsung SoC
Date: Wed, 28 Jul 2010 13:42:56 +0900 [thread overview]
Message-ID: <008b01cb2e0f$5c2de590$1489b0b0$%kim@samsung.com> (raw)
In-Reply-To: <4C4F06EC.2020902@gmail.com>
Maurus Cuelenaere wrote:
>
> Op 27-07-10 13:58, Kukjin Kim schreef:
> > Maurus Cuelenaere wrote:
> >> Op 23-07-10 13:56, Kukjin Kim schreef:
> >>> From: Hyuk Lee <hyuk1.lee@samsung.com>
> >>>
> >>> If host controller doesn't have WP pin which should be connnected with
> SDMMC
> >>> card WP pin, can implement get_ro function with using the allocated gpio.
> >>> In order to use this quirk wp_gpio in the platform data must be set.
> >>>
> >>> Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
> >>> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> >>> ---
> >>> drivers/mmc/host/sdhci-s3c.c | 43
> >> ++++++++++++++++++++++++++++++++++++++++++
> >>> drivers/mmc/host/sdhci.c | 3 ++
> >>> drivers/mmc/host/sdhci.h | 3 ++
> >>> 3 files changed, 49 insertions(+), 0 deletions(-)
> >>>
> >>> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> >>> index 0d25285..0b75e57 100644
> >>> --- a/drivers/mmc/host/sdhci-s3c.c
> >>> +++ b/drivers/mmc/host/sdhci-s3c.c
> >>> @@ -22,6 +22,7 @@
> >>>
> >>> #include <linux/mmc/host.h>
> >>>
> >>> +#include <plat/gpio-cfg.h>
> >>> #include <plat/sdhci.h>
> >>> #include <plat/regs-sdhci.h>
> >>>
> >>> @@ -213,6 +214,36 @@ static void sdhci_s3c_set_clock(struct sdhci_host
> *host,
> >> unsigned int clock)
> >>> }
> >>>
> >>> /**
> >>> + * sdhci_s3c_get_ro - callback for get_ro
> >>> + * @host: The SDHCI host being changed
> >>> + *
> >>> + * If the WP pin is connected with GPIO, can get the value which indicates
> >>> + * the card is locked or not.
> >>> +*/
> >>> +static int sdhci_s3c_get_ro(struct mmc_host *mmc)
> >>> +{
> >>> + struct sdhci_s3c *sc;
> >>> + struct sdhci_host *host;
> >>> +
> >>> + host = mmc_priv(mmc);
> >>> + sc = sdhci_priv(host);
> >> This can be done as static initializer if you reverse the order above.
> > Could you please kindly explain about this?
> > Sorry, I cannot get the exactly meaning...
>
> +static int sdhci_s3c_get_ro(struct mmc_host *mmc)
> +{
> + struct sdhci_host *host = mmc_priv(mmc);
> + struct sdhci_s3c *sc = sdhci_priv(host);
>
Hahaha, no need more words ;-)
Thanks for your kindly explanation.
I think, v4 patch seems to satisfy your suggestion...even though need v5 patch right now.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
next prev parent reply other threads:[~2010-07-28 4:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 11:56 [PATCH v3 0/3] Add support WP on SMDKV210 and SDHCI_QUIRK_NO_WP_BIT quirk Kukjin Kim
2010-07-23 11:56 ` [PATCH v3 1/3] ARM: SAMSUNG: Add the member of platdata to implement SDMMC Write Protection Kukjin Kim
2010-07-23 11:56 ` [PATCH v3 2/3] ARM: S5PV210: Add support SDMMC WP through EXT_INT on SMDKV210 Kukjin Kim
2010-07-23 11:56 ` [PATCH v3 3/3] sdhci-s3c: Add SDHCI_QUIRK_NO_WP_BIT quirk for Samsung SoC Kukjin Kim
2010-07-23 12:12 ` Maurus Cuelenaere
2010-07-27 11:58 ` Kukjin Kim
2010-07-27 16:18 ` Maurus Cuelenaere
2010-07-28 4:42 ` Kukjin Kim [this message]
2010-07-23 12:50 ` Kyungmin Park
2010-07-27 12:21 ` Kukjin Kim
2010-07-28 3:17 ` nitin vishnoi
2010-07-23 13:17 ` Marek Szyprowski
2010-07-27 12:21 ` Kukjin Kim
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='008b01cb2e0f$5c2de590$1489b0b0$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=ben-linux@fluff.org \
--cc=hyuk1.lee@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mcuelenaere@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox