linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME
@ 2010-08-20 20:11 kishore kadiyala
  2010-08-26 23:23 ` Kevin Hilman
  0 siblings, 1 reply; 3+ messages in thread
From: kishore kadiyala @ 2010-08-20 20:11 UTC (permalink / raw)
  To: linux-omap; +Cc: khilman, tony, b-cousson

Crash if enabled CONFIG_PM_RUNTIME and power_saving set.

Use get_sync/put_sync properly so that host->nesting_cnt gets
updated properly.

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
---
 drivers/mmc/host/omap_hsmmc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index c113bfd..90a69c3 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2036,7 +2036,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
 	host->dpm_state = DISABLED;

 	pm_runtime_enable(host->dev);
-	pm_runtime_get_sync(host->dev);
+	if (mmc_host_enable(host->mmc) != 0)
+		goto err1;

 	if (cpu_is_omap2430()) {
 		host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
@@ -2139,8 +2140,6 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)

 	mmc_add_host(mmc);

-	pm_runtime_put(host->dev);
-
 	if (mmc_slot(host).name != NULL) {
 		ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name);
 		if (ret < 0)
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with  CONFIG_PM_RUNTIME
  2010-08-20 20:11 [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME kishore kadiyala
@ 2010-08-26 23:23 ` Kevin Hilman
  2010-08-27 14:19   ` kishore kadiyala
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Hilman @ 2010-08-26 23:23 UTC (permalink / raw)
  To: kishore kadiyala; +Cc: linux-omap, tony, b-cousson

"kishore kadiyala" <kishore.kadiyala@ti.com> writes:

> Crash if enabled CONFIG_PM_RUNTIME and power_saving set.
>
> Use get_sync/put_sync properly so that host->nesting_cnt gets
> updated properly.

<blush>This one is my fault for not really understanding the MMC driver.

Go ahead and just fold this into the original patch when you incorporate
it.

Kevin

> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Cc: Benoit Cousson <b-cousson@ti.com>
> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
> ---
>  drivers/mmc/host/omap_hsmmc.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index c113bfd..90a69c3 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2036,7 +2036,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
>  	host->dpm_state = DISABLED;
>
>  	pm_runtime_enable(host->dev);
> -	pm_runtime_get_sync(host->dev);
> +	if (mmc_host_enable(host->mmc) != 0)
> +		goto err1;
>
>  	if (cpu_is_omap2430()) {
>  		host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
> @@ -2139,8 +2140,6 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
>
>  	mmc_add_host(mmc);
>
> -	pm_runtime_put(host->dev);
> -
>  	if (mmc_slot(host).name != NULL) {
>  		ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name);
>  		if (ret < 0)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME
  2010-08-26 23:23 ` Kevin Hilman
@ 2010-08-27 14:19   ` kishore kadiyala
  0 siblings, 0 replies; 3+ messages in thread
From: kishore kadiyala @ 2010-08-27 14:19 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: kishore kadiyala, linux-omap, tony, b-cousson

On Fri, Aug 27, 2010 at 4:53 AM, Kevin Hilman
<khilman@deeprootsystems.com> wrote:
> "kishore kadiyala" <kishore.kadiyala@ti.com> writes:
>
>> Crash if enabled CONFIG_PM_RUNTIME and power_saving set.
>>
>> Use get_sync/put_sync properly so that host->nesting_cnt gets
>> updated properly.
>
> <blush>This one is my fault for not really understanding the MMC driver.
>
> Go ahead and just fold this into the original patch when you incorporate
> it.

Sure , will take care in final series while posting to LO

Regards,
Kishore
>
> Kevin
>
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> Cc: Benoit Cousson <b-cousson@ti.com>
>> Signed-off-by: Kishore Kadiyala <kishore.kadiyala@ti.com>
>> ---
>>  drivers/mmc/host/omap_hsmmc.c |    5 ++---
>>  1 files changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
>> index c113bfd..90a69c3 100644
>> --- a/drivers/mmc/host/omap_hsmmc.c
>> +++ b/drivers/mmc/host/omap_hsmmc.c
>> @@ -2036,7 +2036,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
>>       host->dpm_state = DISABLED;
>>
>>       pm_runtime_enable(host->dev);
>> -     pm_runtime_get_sync(host->dev);
>> +     if (mmc_host_enable(host->mmc) != 0)
>> +             goto err1;
>>
>>       if (cpu_is_omap2430()) {
>>               host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
>> @@ -2139,8 +2140,6 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
>>
>>       mmc_add_host(mmc);
>>
>> -     pm_runtime_put(host->dev);
>> -
>>       if (mmc_slot(host).name != NULL) {
>>               ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name);
>>               if (ret < 0)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-27 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-20 20:11 [PATCH 09/10] [PM-WIP-MMC] OMAP MMC : Fix crash with CONFIG_PM_RUNTIME kishore kadiyala
2010-08-26 23:23 ` Kevin Hilman
2010-08-27 14:19   ` kishore kadiyala

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).