From: kishore kadiyala <kishorek.kadiyala@gmail.com>
To: Adrian Hunter <adrian.hunter@nokia.com>
Cc: kishore kadiyala <kishore.kadiyala@ti.com>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"tony@atomide.com" <tony@atomide.com>,
"madhu.cr@ti.com" <madhu.cr@ti.com>,
"Lavinen Jarkko (Nokia-D/Helsinki)" <jarkko.lavinen@nokia.com>,
"rmk@arm.linux.org.uk" <rmk@arm.linux.org.uk>,
"paul@pwsan.com" <paul@pwsan.com>
Subject: Re: [PATCH v2 3/5] OMAP4-HSMMC: Adding MMC-TWL regulator changes
Date: Thu, 6 May 2010 21:35:12 +0530 [thread overview]
Message-ID: <w2x7f9d1ffb1005060905x9f10aaf7zb94acd4ee5a0d2cb@mail.gmail.com> (raw)
In-Reply-To: <4BE1491C.20005@nokia.com>
<<snip>>
> As I understand it, the PBIAS configuration is required for HSMMC
> irrespective of how the power is supplied, thus it is not TWL related.
> The TWL stuff should not be in hsmmc.c.
>
> Also I would suggest the only change to omap_hsmmc is:
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index e9caf69..f792cff 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -465,8 +465,6 @@ static int omap_hsmmc_gpio_init(struct
> omap_mmc_platform_data *pdata)
> int ret;
>
> if (gpio_is_valid(pdata->slots[0].switch_pin)) {
> - pdata->suspend = omap_hsmmc_suspend_cdirq;
> - pdata->resume = omap_hsmmc_resume_cdirq;
> if (pdata->slots[0].cover)
> pdata->slots[0].get_cover_state =
> omap_hsmmc_get_cover_state;
> @@ -2160,6 +2158,8 @@ static int __init omap_hsmmc_probe(struct
> platform_device *pdev)
> "Unable to grab MMC CD IRQ\n");
> goto err_irq_cd;
> }
> + pdata->suspend = omap_hsmmc_suspend_cdirq;
> + pdata->resume = omap_hsmmc_resume_cdirq;
> }
>
> OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK);
>
>
> And that the late init function is used to do the rest e.g.
> find a home for these 3 functions:
>
> static int omap4_twl6030_hsmmc_late_init(struct device *dev)
> {
> int ret = 0;
> struct platform_device *pdev = container_of(dev,
> struct platform_device, dev);
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> /* MMC1 Card detect Configuration */
> if (pdev->id == 0) {
> ret = omap4_hsmmc1_card_detect_config();
> if (ret < 0)
> pr_err("Unable to configure Card detect for MMC1\n");
> pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
> MMCDETECT_INTR_OFFSET;
> }
> return ret;
> }
>
> static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
> {
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> pdata->init = omap4_twl6030_hsmmc_late_init;
> }
>
> void __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
> {
> struct omap2_hsmmc_info *c;
>
> omap2_hsmmc_init(controllers);
>
> for (c = controllers; c->mmc; c++)
> omap4_twl6030_hsmmc_set_late_init(c->dev);
> }
>
> And then the board file becomes:
>
> static struct omap2_hsmmc_info mmc[] = {
> {
> .mmc = 1,
> .wires = 8,
> .gpio_cd = -EINVAL,
> .gpio_wp = -EINVAL,
> },
> {
> .mmc = 2,
> .wires = 8,
> .gpio_cd = -EINVAL,
> .gpio_wp = -EINVAL,
> .nonremovable = true,
> },
> {} /* Terminator */
> };
>
> static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
> {
> .supply = "vmmc",
> .dev_name = "mmci-omap-hs.0",
> },
> {
> .supply = "vmmc",
> .dev_name = "mmci-omap-hs.1",
> },
> };
>
> static int __init sdp4430_mmc_init(void)
> {
> omap4_twl6030_hsmmc_init(mmc);
> return 0;
> }
>
Thanks Adrian !
Agree and will move changes to board-4430 file
prev parent reply other threads:[~2010-05-06 16:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 16:01 [PATCH v2 3/5] OMAP4-HSMMC: Adding MMC-TWL regulator changes kishore kadiyala
2010-05-04 23:11 ` Paul Walmsley
2010-05-05 6:47 ` kishore kadiyala
2010-05-05 3:23 ` G, Manjunath Kondaiah
2010-05-05 6:49 ` kishore kadiyala
2010-05-05 6:57 ` G, Manjunath Kondaiah
2010-05-05 6:59 ` kishore kadiyala
2010-05-05 10:31 ` Adrian Hunter
2010-05-06 16:05 ` kishore kadiyala [this message]
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=w2x7f9d1ffb1005060905x9f10aaf7zb94acd4ee5a0d2cb@mail.gmail.com \
--to=kishorek.kadiyala@gmail.com \
--cc=adrian.hunter@nokia.com \
--cc=jarkko.lavinen@nokia.com \
--cc=kishore.kadiyala@ti.com \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=madhu.cr@ti.com \
--cc=paul@pwsan.com \
--cc=rmk@arm.linux.org.uk \
--cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).