* [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay
@ 2011-08-26 7:55 ` Chunhe Lan
0 siblings, 0 replies; 6+ messages in thread
From: Chunhe Lan @ 2011-08-26 7:55 UTC (permalink / raw)
To: linux-mmc; +Cc: linuxppc-dev, kumar.gala, Chunhe Lan, Shengzhou Liu, Chris Ball
The mmc_delay() is a wrapper function for mdelay() and msleep().
o mdelay() -- block the system when busy-waiting.
o msleep() -- suspend the currently running task to enable CPU
to process other tasks, so it is non-blocking
regarding the whole system.
When the desired delay time is more than a period of timer interrupt,
just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
CPU when busy wait.
Signed-off-by: Shengzhou Liu <b36685@freescale.com>
Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: Chris Ball <cjb@laptop.org>
---
drivers/mmc/host/sdhci.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0e02cc1..b0cf79f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -186,7 +186,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
return;
}
timeout--;
- mdelay(1);
+ mmc_delay(1);
}
if (host->ops->platform_reset_exit)
@@ -957,7 +957,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
return;
}
timeout--;
- mdelay(1);
+ mmc_delay(1);
}
mod_timer(&host->timer, jiffies + 10 * HZ);
@@ -1127,7 +1127,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
return;
}
timeout--;
- mdelay(1);
+ mmc_delay(1);
}
clk |= SDHCI_CLOCK_CARD_EN;
@@ -1192,7 +1192,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
* can apply clock after applying power
*/
if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER)
- mdelay(10);
+ mmc_delay(10);
}
/*****************************************************************************\
@@ -1712,7 +1712,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc)
ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
tuning_loop_counter--;
timeout--;
- mdelay(1);
+ mmc_delay(1);
} while (ctrl & SDHCI_CTRL_EXEC_TUNING);
/*
--
1.7.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay
@ 2011-08-26 7:55 ` Chunhe Lan
0 siblings, 0 replies; 6+ messages in thread
From: Chunhe Lan @ 2011-08-26 7:55 UTC (permalink / raw)
To: linux-mmc; +Cc: Shengzhou Liu, kumar.gala, Chris Ball, linuxppc-dev, Chunhe Lan
The mmc_delay() is a wrapper function for mdelay() and msleep().
o mdelay() -- block the system when busy-waiting.
o msleep() -- suspend the currently running task to enable CPU
to process other tasks, so it is non-blocking
regarding the whole system.
When the desired delay time is more than a period of timer interrupt,
just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
CPU when busy wait.
Signed-off-by: Shengzhou Liu <b36685@freescale.com>
Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Cc: Chris Ball <cjb@laptop.org>
---
drivers/mmc/host/sdhci.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 0e02cc1..b0cf79f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -186,7 +186,7 @@ static void sdhci_reset(struct sdhci_host *host, u8 mask)
return;
}
timeout--;
- mdelay(1);
+ mmc_delay(1);
}
if (host->ops->platform_reset_exit)
@@ -957,7 +957,7 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
return;
}
timeout--;
- mdelay(1);
+ mmc_delay(1);
}
mod_timer(&host->timer, jiffies + 10 * HZ);
@@ -1127,7 +1127,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
return;
}
timeout--;
- mdelay(1);
+ mmc_delay(1);
}
clk |= SDHCI_CLOCK_CARD_EN;
@@ -1192,7 +1192,7 @@ static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
* can apply clock after applying power
*/
if (host->quirks & SDHCI_QUIRK_DELAY_AFTER_POWER)
- mdelay(10);
+ mmc_delay(10);
}
/*****************************************************************************\
@@ -1712,7 +1712,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc)
ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2);
tuning_loop_counter--;
timeout--;
- mdelay(1);
+ mmc_delay(1);
} while (ctrl & SDHCI_CTRL_EXEC_TUNING);
/*
--
1.7.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay
2011-08-26 7:55 ` Chunhe Lan
@ 2011-09-01 4:42 ` Kumar Gala
-1 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2011-09-01 4:42 UTC (permalink / raw)
To: Chunhe Lan, Chris Ball; +Cc: linux-mmc, Shengzhou Liu, PPC list
On Aug 26, 2011, at 2:55 AM, Chunhe Lan wrote:
> The mmc_delay() is a wrapper function for mdelay() and msleep().
>
> o mdelay() -- block the system when busy-waiting.
> o msleep() -- suspend the currently running task to enable CPU
> to process other tasks, so it is non-blocking
> regarding the whole system.
>
> When the desired delay time is more than a period of timer interrupt,
> just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
> CPU when busy wait.
>
> Signed-off-by: Shengzhou Liu <b36685@freescale.com>
> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
> Cc: Chris Ball <cjb@laptop.org>
> ---
> drivers/mmc/host/sdhci.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
It might be good to either merge patch 2/3 & 3/3 or rename them since they have same commit message.
Chris,
Any comments on closing on these patches?
- k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay
@ 2011-09-01 4:42 ` Kumar Gala
0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2011-09-01 4:42 UTC (permalink / raw)
To: Chunhe Lan, Chris Ball; +Cc: Shengzhou Liu, linux-mmc, PPC list
On Aug 26, 2011, at 2:55 AM, Chunhe Lan wrote:
> The mmc_delay() is a wrapper function for mdelay() and msleep().
>=20
> o mdelay() -- block the system when busy-waiting.
> o msleep() -- suspend the currently running task to enable CPU
> to process other tasks, so it is non-blocking
> regarding the whole system.
>=20
> When the desired delay time is more than a period of timer interrupt,
> just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
> CPU when busy wait.
>=20
> Signed-off-by: Shengzhou Liu <b36685@freescale.com>
> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
> Cc: Chris Ball <cjb@laptop.org>
> ---
> drivers/mmc/host/sdhci.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
It might be good to either merge patch 2/3 & 3/3 or rename them since =
they have same commit message.
Chris,
Any comments on closing on these patches?
- k=
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay
2011-09-01 4:42 ` Kumar Gala
@ 2011-09-06 6:52 ` Chunhe Lan
-1 siblings, 0 replies; 6+ messages in thread
From: Chunhe Lan @ 2011-09-06 6:52 UTC (permalink / raw)
To: Kumar Gala, Chunhe Lan, Chris Ball; +Cc: linux-mmc, Shengzhou Liu, PPC list
On Thu, 01 Sep 2011 12:42:08 +0800, Kumar Gala <kumar.gala@freescale.com>
wrote:
>
> On Aug 26, 2011, at 2:55 AM, Chunhe Lan wrote:
>
>> The mmc_delay() is a wrapper function for mdelay() and msleep().
>>
>> o mdelay() -- block the system when busy-waiting.
>> o msleep() -- suspend the currently running task to enable CPU
>> to process other tasks, so it is non-blocking
>> regarding the whole system.
>>
>> When the desired delay time is more than a period of timer interrupt,
>> just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
>> CPU when busy wait.
>>
>> Signed-off-by: Shengzhou Liu <b36685@freescale.com>
>> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
>> Cc: Chris Ball <cjb@laptop.org>
>> ---
>> drivers/mmc/host/sdhci.c | 10 +++++-----
>> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> It might be good to either merge patch 2/3 & 3/3 or rename them since
> they have same commit message.
>
> Chris,
>
> Any comments on closing on these patches?
>
Hello Chris,
Do you any comments on these patches ?
If not, can you apply these patches to mmc-next ?
Thanks.
-Jack
> - k
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay
@ 2011-09-06 6:52 ` Chunhe Lan
0 siblings, 0 replies; 6+ messages in thread
From: Chunhe Lan @ 2011-09-06 6:52 UTC (permalink / raw)
To: Kumar Gala, Chunhe Lan, Chris Ball; +Cc: Shengzhou Liu, linux-mmc, PPC list
On Thu, 01 Sep 2011 12:42:08 +0800, Kumar Gala <kumar.gala@freescale.com>
wrote:
>
> On Aug 26, 2011, at 2:55 AM, Chunhe Lan wrote:
>
>> The mmc_delay() is a wrapper function for mdelay() and msleep().
>>
>> o mdelay() -- block the system when busy-waiting.
>> o msleep() -- suspend the currently running task to enable CPU
>> to process other tasks, so it is non-blocking
>> regarding the whole system.
>>
>> When the desired delay time is more than a period of timer interrupt,
>> just use msleep(). Change mdelay() to mmc_delay() to avoid chewing
>> CPU when busy wait.
>>
>> Signed-off-by: Shengzhou Liu <b36685@freescale.com>
>> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
>> Cc: Chris Ball <cjb@laptop.org>
>> ---
>> drivers/mmc/host/sdhci.c | 10 +++++-----
>> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> It might be good to either merge patch 2/3 & 3/3 or rename them since
> they have same commit message.
>
> Chris,
>
> Any comments on closing on these patches?
>
Hello Chris,
Do you any comments on these patches ?
If not, can you apply these patches to mmc-next ?
Thanks.
-Jack
> - k
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-09-06 6:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-26 7:55 [PATCH 3/3 v2] mmc: Use mmc_delay() instead of mdelay() for time delay Chunhe Lan
2011-08-26 7:55 ` Chunhe Lan
2011-09-01 4:42 ` Kumar Gala
2011-09-01 4:42 ` Kumar Gala
2011-09-06 6:52 ` Chunhe Lan
2011-09-06 6:52 ` Chunhe Lan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.