* [PATCH] omap4: pandaboard: fix up mmc card detect logic
@ 2010-10-15 13:24 Nishanth Menon
2010-10-15 13:37 ` Nishanth Menon
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Nishanth Menon @ 2010-10-15 13:24 UTC (permalink / raw)
To: l-o
Cc: Dave, Nishanth Menon, Tony Lindgren, Madhusudhan Chikkature,
Adrian Hunter, Samuel Ortiz
For MMC1 Controller, card detect interrupt source is
twl6030 which is non-gpio. The card detect call back function provides
card present/absent status by reading MMC Control register present
on twl6030. This functionality was introduced in mfd tree on
track to kernel.org
Sync pandaboard to the same and make mmc work.
Cc: Tony Lindgren <tony@atomide.com>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
Depends on
http://git.kernel.org/?p=linux/kernel/git/sameo/mfd-2.6.git;a=commitdiff;h=1bf5197061a4aec99e9fd4f92d4a543310f83585;hp=0c9b33e5a23e2053165c9e30ffff3b3a3cf1b2b8
This patch probably should be squashed to that.
arch/arm/mach-omap2/board-omap4panda.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index a9d8a19..47cc8d2 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -160,10 +160,19 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
struct platform_device, dev);
struct omap_mmc_platform_data *pdata = dev->platform_data;
+ if (!pdata) {
+ dev_err(dev, "%s: NULL platform data\n", __func__);
+ return -EINVAL;
+ }
/* Setting MMC1 Card detect Irq */
- if (pdev->id == 0)
- pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
- MMCDETECT_INTR_OFFSET;
+ if (pdev->id == 0) {
+ ret = twl6030_mmc_card_detect_config();
+ if (ret)
+ dev_err(dev, "%s: Error card detect config(%d)\n",
+ __func__, ret);
+ else
+ pdata->slots[0].card_detect = twl6030_mmc_card_detect;
+ }
return ret;
}
--
1.6.3.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] omap4: pandaboard: fix up mmc card detect logic
2010-10-15 13:24 [PATCH] omap4: pandaboard: fix up mmc card detect logic Nishanth Menon
@ 2010-10-15 13:37 ` Nishanth Menon
2010-10-16 8:12 ` Jarkko Nikula
2010-10-18 17:06 ` Madhusudhan
2 siblings, 0 replies; 5+ messages in thread
From: Nishanth Menon @ 2010-10-15 13:37 UTC (permalink / raw)
To: l-o
Cc: Anders, David, Tony Lindgren, Chikkature Rajashekar, Madhusudhan,
Adrian Hunter, Samuel Ortiz
Menon, Nishanth had written, on 10/15/2010 08:24 AM, the following:
> For MMC1 Controller, card detect interrupt source is
> twl6030 which is non-gpio. The card detect call back function provides
> card present/absent status by reading MMC Control register present
> on twl6030. This functionality was introduced in mfd tree on
> track to kernel.org
>
> Sync pandaboard to the same and make mmc work.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
> Cc: Adrian Hunter <adrian.hunter@nokia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
>
> Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>
> Depends on
> http://git.kernel.org/?p=linux/kernel/git/sameo/mfd-2.6.git;a=commitdiff;h=1bf5197061a4aec99e9fd4f92d4a543310f83585;hp=0c9b33e5a23e2053165c9e30ffff3b3a3cf1b2b8
> This patch probably should be squashed to that.
Note to Tony/Sameo:
I generated this patch for linux-omap after cherry picking the above
patch. reason being:
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=shortlog;h=refs/heads/omap-for-linus
has fixes we need for Pandaboard
I am at a loss however which tree this patch might be carried on..
>
> arch/arm/mach-omap2/board-omap4panda.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
> index a9d8a19..47cc8d2 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -160,10 +160,19 @@ static int omap4_twl6030_hsmmc_late_init(struct device *dev)
> struct platform_device, dev);
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> + if (!pdata) {
> + dev_err(dev, "%s: NULL platform data\n", __func__);
> + return -EINVAL;
> + }
> /* Setting MMC1 Card detect Irq */
> - if (pdev->id == 0)
> - pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
> - MMCDETECT_INTR_OFFSET;
> + if (pdev->id == 0) {
> + ret = twl6030_mmc_card_detect_config();
> + if (ret)
> + dev_err(dev, "%s: Error card detect config(%d)\n",
> + __func__, ret);
> + else
> + pdata->slots[0].card_detect = twl6030_mmc_card_detect;
> + }
> return ret;
> }
>
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] omap4: pandaboard: fix up mmc card detect logic
2010-10-15 13:24 [PATCH] omap4: pandaboard: fix up mmc card detect logic Nishanth Menon
2010-10-15 13:37 ` Nishanth Menon
@ 2010-10-16 8:12 ` Jarkko Nikula
2010-10-18 17:06 ` Madhusudhan
2 siblings, 0 replies; 5+ messages in thread
From: Jarkko Nikula @ 2010-10-16 8:12 UTC (permalink / raw)
To: Nishanth Menon
Cc: l-o, Dave, Tony Lindgren, Madhusudhan Chikkature, Adrian Hunter,
Samuel Ortiz
On Fri, 15 Oct 2010 08:24:47 -0500
Nishanth Menon <nm@ti.com> wrote:
> For MMC1 Controller, card detect interrupt source is
> twl6030 which is non-gpio. The card detect call back function provides
> card present/absent status by reading MMC Control register present
> on twl6030. This functionality was introduced in mfd tree on
> track to kernel.org
>
> Sync pandaboard to the same and make mmc work.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
> Cc: Adrian Hunter <adrian.hunter@nokia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
>
> Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>
> Depends on
> http://git.kernel.org/?p=linux/kernel/git/sameo/mfd-2.6.git;a=commitdiff;h=1bf5197061a4aec99e9fd4f92d4a543310f83585;hp=0c9b33e5a23e2053165c9e30ffff3b3a3cf1b2b8
> This patch probably should be squashed to that.
>
> arch/arm/mach-omap2/board-omap4panda.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
FWIW,
With the reference patch above and this I can mount the mmc root on
Panda EA1.
Tested-by: Jarkko Nikula <jhnikula@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] omap4: pandaboard: fix up mmc card detect logic
2010-10-15 13:24 [PATCH] omap4: pandaboard: fix up mmc card detect logic Nishanth Menon
2010-10-15 13:37 ` Nishanth Menon
2010-10-16 8:12 ` Jarkko Nikula
@ 2010-10-18 17:06 ` Madhusudhan
2010-10-19 0:31 ` Tony Lindgren
2 siblings, 1 reply; 5+ messages in thread
From: Madhusudhan @ 2010-10-18 17:06 UTC (permalink / raw)
To: 'Nishanth Menon', 'l-o'
Cc: 'Dave', 'Tony Lindgren', 'Adrian Hunter',
'Samuel Ortiz'
> -----Original Message-----
> From: Nishanth Menon [mailto:nm@ti.com]
> Sent: Friday, October 15, 2010 8:25 AM
> To: l-o
> Cc: Dave; Nishanth Menon; Tony Lindgren; Madhusudhan Chikkature; Adrian
> Hunter; Samuel Ortiz
> Subject: [PATCH] omap4: pandaboard: fix up mmc card detect logic
>
> For MMC1 Controller, card detect interrupt source is
> twl6030 which is non-gpio. The card detect call back function provides
> card present/absent status by reading MMC Control register present
> on twl6030. This functionality was introduced in mfd tree on
> track to kernel.org
>
> Sync pandaboard to the same and make mmc work.
>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
> Cc: Adrian Hunter <adrian.hunter@nokia.com>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
>
> Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
The patch looks good.
Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
> Signed-off-by: Nishanth Menon <nm@ti.com>
> ---
>
> Depends on
> http://git.kernel.org/?p=linux/kernel/git/sameo/mfd-
> 2.6.git;a=commitdiff;h=1bf5197061a4aec99e9fd4f92d4a543310f83585;hp=0c9b33e
> 5a23e2053165c9e30ffff3b3a3cf1b2b8
> This patch probably should be squashed to that.
>
> arch/arm/mach-omap2/board-omap4panda.c | 15 ++++++++++++---
> 1 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-
> omap2/board-omap4panda.c
> index a9d8a19..47cc8d2 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -160,10 +160,19 @@ static int omap4_twl6030_hsmmc_late_init(struct
> device *dev)
> struct platform_device, dev);
> struct omap_mmc_platform_data *pdata = dev->platform_data;
>
> + if (!pdata) {
> + dev_err(dev, "%s: NULL platform data\n", __func__);
> + return -EINVAL;
> + }
> /* Setting MMC1 Card detect Irq */
> - if (pdev->id == 0)
> - pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
> - MMCDETECT_INTR_OFFSET;
> + if (pdev->id == 0) {
> + ret = twl6030_mmc_card_detect_config();
> + if (ret)
> + dev_err(dev, "%s: Error card detect config(%d)\n",
> + __func__, ret);
> + else
> + pdata->slots[0].card_detect =
twl6030_mmc_card_detect;
> + }
> return ret;
> }
>
> --
> 1.6.3.3
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] omap4: pandaboard: fix up mmc card detect logic
2010-10-18 17:06 ` Madhusudhan
@ 2010-10-19 0:31 ` Tony Lindgren
0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2010-10-19 0:31 UTC (permalink / raw)
To: Madhusudhan
Cc: 'Nishanth Menon', 'l-o', 'Dave',
'Adrian Hunter', 'Samuel Ortiz'
* Madhusudhan <madhu.cr@ti.com> [101018 09:57]:
>
>
> > -----Original Message-----
> > From: Nishanth Menon [mailto:nm@ti.com]
> > Sent: Friday, October 15, 2010 8:25 AM
> > To: l-o
> > Cc: Dave; Nishanth Menon; Tony Lindgren; Madhusudhan Chikkature; Adrian
> > Hunter; Samuel Ortiz
> > Subject: [PATCH] omap4: pandaboard: fix up mmc card detect logic
> >
> > For MMC1 Controller, card detect interrupt source is
> > twl6030 which is non-gpio. The card detect call back function provides
> > card present/absent status by reading MMC Control register present
> > on twl6030. This functionality was introduced in mfd tree on
> > track to kernel.org
> >
> > Sync pandaboard to the same and make mmc work.
> >
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
> > Cc: Adrian Hunter <adrian.hunter@nokia.com>
> > Cc: Samuel Ortiz <sameo@linux.intel.com>
> >
> > Acked-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
>
> The patch looks good.
> Acked-by: Madhusudhan Chikkature <madhu.cr@ti.com>
>
> > Signed-off-by: Nishanth Menon <nm@ti.com>
> > ---
> >
> > Depends on
> > http://git.kernel.org/?p=linux/kernel/git/sameo/mfd-
> > 2.6.git;a=commitdiff;h=1bf5197061a4aec99e9fd4f92d4a543310f83585;hp=0c9b33e
> > 5a23e2053165c9e30ffff3b3a3cf1b2b8
> > This patch probably should be squashed to that.
Nishant, please post one more time with linux-arm-kernel list
also cc'd for review and add all the acks.
After that, Samuel, can you please apply it to your queue because
of the depenency above?
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-19 0:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-15 13:24 [PATCH] omap4: pandaboard: fix up mmc card detect logic Nishanth Menon
2010-10-15 13:37 ` Nishanth Menon
2010-10-16 8:12 ` Jarkko Nikula
2010-10-18 17:06 ` Madhusudhan
2010-10-19 0:31 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox