From: Kukjin Kim <kgene.kim@samsung.com>
To: 'Ben Dooks' <ben-linux@fluff.org>
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
'Lee Hyuk' <hyuk1.lee@samsung.com>
Subject: RE: [PATCH 1/3] ARM: SAMSUNG: Add the member of platdata to implement SDMMC Write Protection
Date: Sat, 03 Jul 2010 10:15:26 +0900 [thread overview]
Message-ID: <009401cb1a4d$3abd4e80$b037eb80$%kim@samsung.com> (raw)
In-Reply-To: <20100615120245.GD7248@trinity.fluff.org>
Ben Dooks wrote:
>
> On Tue, Jun 15, 2010 at 08:27:46PM +0900, Kukjin Kim wrote:
> > From: Lee Hyuk <hyuk1.lee@samsung.com>
> >
> > This patch adds the members of platdata which are cfg_wp and get_ro.
> > The cfg_wp is the function for setting the specific GPIO for WP pin
> > and get_ro is the function for getting data from the assigned GPIO.
>
> Why not just pass gpio numbers, and have the sdhci-s3c driver claim them
> if they are valid?
>
Ok..fixed it as your comments.
> > Signed-off-by: Hyuk Lee <hyuk1.lee@samsung.com>
> > Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> > ---
> > arch/arm/plat-samsung/dev-hsmmc.c | 4 ++++
> > arch/arm/plat-samsung/dev-hsmmc1.c | 4 ++++
> > arch/arm/plat-samsung/dev-hsmmc2.c | 4 ++++
> > arch/arm/plat-samsung/dev-hsmmc3.c | 4 ++++
> > arch/arm/plat-samsung/include/plat/sdhci.h | 6 ++++++
> > 5 files changed, 22 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/plat-samsung/dev-hsmmc.c
b/arch/arm/plat-samsung/dev-
> hsmmc.c
> > index 4c05b39..f2bae6f 100644
> > --- a/arch/arm/plat-samsung/dev-hsmmc.c
> > +++ b/arch/arm/plat-samsung/dev-hsmmc.c
> > @@ -65,4 +65,8 @@ void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata
> *pd)
> > set->cfg_gpio = pd->cfg_gpio;
> > if (pd->cfg_card)
> > set->cfg_card = pd->cfg_card;
> > + if (pd->cfg_wp)
> > + set->cfg_wp = pd->cfg_wp;
> > + if (pd->get_ro)
> > + set->get_ro = pd->get_ro;
> > }
> > diff --git a/arch/arm/plat-samsung/dev-hsmmc1.c
b/arch/arm/plat-samsung/dev-
> hsmmc1.c
> > index e49bc4c..b326e0d 100644
> > --- a/arch/arm/plat-samsung/dev-hsmmc1.c
> > +++ b/arch/arm/plat-samsung/dev-hsmmc1.c
> > @@ -65,4 +65,8 @@ void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata
> *pd)
> > set->cfg_gpio = pd->cfg_gpio;
> > if (pd->cfg_card)
> > set->cfg_card = pd->cfg_card;
> > + if (pd->cfg_wp)
> > + set->cfg_wp = pd->cfg_wp;
> > + if (pd->get_ro)
> > + set->get_ro = pd->get_ro;
> > }
> > diff --git a/arch/arm/plat-samsung/dev-hsmmc2.c
b/arch/arm/plat-samsung/dev-
> hsmmc2.c
> > index 824580b..3474ef2 100644
> > --- a/arch/arm/plat-samsung/dev-hsmmc2.c
> > +++ b/arch/arm/plat-samsung/dev-hsmmc2.c
> > @@ -66,4 +66,8 @@ void s3c_sdhci2_set_platdata(struct s3c_sdhci_platdata
> *pd)
> > set->cfg_gpio = pd->cfg_gpio;
> > if (pd->cfg_card)
> > set->cfg_card = pd->cfg_card;
> > + if (pd->cfg_wp)
> > + set->cfg_wp = pd->cfg_wp;
> > + if (pd->get_ro)
> > + set->get_ro = pd->get_ro;
> > }
> > diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c
b/arch/arm/plat-samsung/dev-
> hsmmc3.c
> > index 05d5ea4..1da8ea7 100644
> > --- a/arch/arm/plat-samsung/dev-hsmmc3.c
> > +++ b/arch/arm/plat-samsung/dev-hsmmc3.c
> > @@ -69,4 +69,8 @@ void s3c_sdhci3_set_platdata(struct s3c_sdhci_platdata
> *pd)
> > set->cfg_gpio = pd->cfg_gpio;
> > if (pd->cfg_card)
> > set->cfg_card = pd->cfg_card;
> > + if (pd->cfg_wp)
> > + set->cfg_wp = pd->cfg_wp;
> > + if (pd->get_ro)
> > + set->get_ro = pd->get_ro;
> > }
> > diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-
> samsung/include/plat/sdhci.h
> > index 1314ffa..da198d8 100644
> > --- a/arch/arm/plat-samsung/include/plat/sdhci.h
> > +++ b/arch/arm/plat-samsung/include/plat/sdhci.h
> > @@ -29,6 +29,8 @@ struct mmc_ios;
> > * is necessary the controllers and/or GPIO blocks require
the
> > * changing of driver-strength and other controls dependant on
> > * the card and speed of operation.
> > + * @cfg_wp: Configure the GPIO in order to allocate WP pin.
> > + * @get_ro: Call back function for getting data from the allocated
GPIO.
>
> if you just used gpio calls and passed a gpio number here,
> you'd not need cfg_wp.
>
OK.
> > *
> > * Initialisation data specific to either the machine or the platform
> > * for the device driver to use or call-back when configuring gpio or
> > @@ -45,6 +47,8 @@ struct s3c_sdhci_platdata {
> > void __iomem *regbase,
> > struct mmc_ios *ios,
> > struct mmc_card *card);
> > + void (*cfg_wp)(int dev_id);
> > + int (*get_ro)(struct mmc_host *mmc);
> > };
> >
> > /**
> > @@ -234,6 +238,8 @@ extern void s5pv210_setup_sdhci_cfg_card(struct
> platform_device *dev,
> > struct mmc_ios *ios,
> > struct mmc_card *card);
> >
> > +extern void s3c_sdhci_set_platdata(void);
> > +
> > #ifdef CONFIG_S3C_DEV_HSMMC
> > static inline void s5pv210_default_sdhci0(void)
> > {
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-03 1:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 11:27 ARM: S5PV210: Add support SDMMC Write Protection on SMDKV210 Kukjin Kim
2010-06-15 11:27 ` [PATCH 1/3] ARM: SAMSUNG: Add the member of platdata to implement SDMMC Write Protection Kukjin Kim
2010-06-15 12:02 ` Ben Dooks
2010-07-03 1:15 ` Kukjin Kim [this message]
2010-06-15 11:27 ` [PATCH 2/3] ARM: S5PV210: Add support SDMMC WP through EXT_INT on SMDKV210 Kukjin Kim
2010-06-15 11:52 ` Kyungmin Park
2010-07-03 1:08 ` Kukjin Kim
2010-06-15 11:53 ` Maurus Cuelenaere
2010-07-03 1:11 ` Kukjin Kim
2010-06-15 11:59 ` Ben Dooks
2010-07-03 1:14 ` Kukjin Kim
2010-06-15 11:27 ` [PATCH 3/3] sdhci-s3c: Add SDHCI_QUIRK_NO_WP_BIT for Samsung SoC Kukjin Kim
2010-06-15 12:04 ` Ben Dooks
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='009401cb1a4d$3abd4e80$b037eb80$%kim@samsung.com' \
--to=kgene.kim@samsung.com \
--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 \
/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