All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nand: Remove meaningless delay from nand_unlock
@ 2011-06-01 13:56 jiri.pinkava
  2011-06-02 16:23 ` Brian Norris
  2011-06-03 15:32 ` Artem Bityutskiy
  0 siblings, 2 replies; 7+ messages in thread
From: jiri.pinkava @ 2011-06-01 13:56 UTC (permalink / raw)
  To: dedekind1; +Cc: linux-mtd, Jiri Pinkava, dwmw2

From: Jiri Pinkava <jiri.pinkava@vscht.cz>

This delay is meaningless. If delay is needed it is device specific
and must be reimplemented by specific driver, otherwise no delay is
needed.

This function is not used by any current kernel code, affects only
external code (like main).

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
 drivers/mtd/nand/nand_base.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index a46e9bb..290a1db 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -919,7 +919,6 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
 
 	/* Call wait ready function */
 	status = chip->waitfunc(mtd, chip);
-	udelay(1000);
 	/* See if device thinks it succeeded */
 	if (status & 0x01) {
 		DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n",
@@ -1028,7 +1027,6 @@ int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
 
 	/* Call wait ready function */
 	status = chip->waitfunc(mtd, chip);
-	udelay(1000);
 	/* See if device thinks it succeeded */
 	if (status & 0x01) {
 		DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n",
-- 
1.7.5.2

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

* Re: [PATCH] nand: Remove meaningless delay from nand_unlock
  2011-06-01 13:56 [PATCH] nand: Remove meaningless delay from nand_unlock jiri.pinkava
@ 2011-06-02 16:23 ` Brian Norris
  2011-06-02 16:26   ` Brian Norris
  2011-06-02 18:24   ` Vimal Singh
  2011-06-03 15:32 ` Artem Bityutskiy
  1 sibling, 2 replies; 7+ messages in thread
From: Brian Norris @ 2011-06-02 16:23 UTC (permalink / raw)
  To: jiri.pinkava; +Cc: dwmw2, Vimal Singh, linux-mtd, dedekind1

On Wed, Jun 1, 2011 at 6:56 AM,  <jiri.pinkava@vscht.cz> wrote:
> From: Jiri Pinkava <jiri.pinkava@vscht.cz>
>
> This delay is meaningless. If delay is needed it is device specific
> and must be reimplemented by specific driver, otherwise no delay is
> needed.
>
> This function is not used by any current kernel code, affects only
> external code (like main).

Looks ok to me, but I don't have hardware to test this with.

CC'ing Vimal who added this code originally.

Brian

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

* Re: [PATCH] nand: Remove meaningless delay from nand_unlock
  2011-06-02 16:23 ` Brian Norris
@ 2011-06-02 16:26   ` Brian Norris
  2011-06-02 18:24   ` Vimal Singh
  1 sibling, 0 replies; 7+ messages in thread
From: Brian Norris @ 2011-06-02 16:26 UTC (permalink / raw)
  To: jiri.pinkava; +Cc: dwmw2, linux-mtd, Vimal Singh, dedekind1

On Thu, Jun 2, 2011 at 9:23 AM, Brian Norris
<computersforpeace@gmail.com> wrote:
> CC'ing Vimal who added this code originally.

Apparently I had the wrong address for Vimal...I think he has used
this one more recently.

Brian

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

* Re: [PATCH] nand: Remove meaningless delay from nand_unlock
  2011-06-02 16:23 ` Brian Norris
  2011-06-02 16:26   ` Brian Norris
@ 2011-06-02 18:24   ` Vimal Singh
  1 sibling, 0 replies; 7+ messages in thread
From: Vimal Singh @ 2011-06-02 18:24 UTC (permalink / raw)
  To: Brian Norris; +Cc: dwmw2, Vimal Singh, jiri.pinkava, linux-mtd, dedekind1

On Thu, Jun 2, 2011 at 9:53 PM, Brian Norris
<computersforpeace@gmail.com> wrote:
> On Wed, Jun 1, 2011 at 6:56 AM,  <jiri.pinkava@vscht.cz> wrote:
>> From: Jiri Pinkava <jiri.pinkava@vscht.cz>
>>
>> This delay is meaningless. If delay is needed it is device specific
>> and must be reimplemented by specific driver, otherwise no delay is
>> needed.
Indeed, these delays are not required. I guess it was left out code
before posting the patch.
Here is my ack:

Acked-by: Vimal Singh <vimal.newwork@gmail.com>

-- 
Regards,
Vimal Singh

>>
>> This function is not used by any current kernel code, affects only
>> external code (like main).
>
> Looks ok to me, but I don't have hardware to test this with.
>
> CC'ing Vimal who added this code originally.
>
> Brian
>

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

* Re: [PATCH] nand: Remove meaningless delay from nand_unlock
  2011-06-01 13:56 [PATCH] nand: Remove meaningless delay from nand_unlock jiri.pinkava
  2011-06-02 16:23 ` Brian Norris
@ 2011-06-03 15:32 ` Artem Bityutskiy
  1 sibling, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2011-06-03 15:32 UTC (permalink / raw)
  To: jiri.pinkava; +Cc: linux-mtd, dwmw2

On Wed, 2011-06-01 at 15:56 +0200, jiri.pinkava@vscht.cz wrote:
> From: Jiri Pinkava <jiri.pinkava@vscht.cz>
> 
> This delay is meaningless. If delay is needed it is device specific
> and must be reimplemented by specific driver, otherwise no delay is
> needed.
> 
> This function is not used by any current kernel code, affects only
> external code (like main).
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>

Pushed to l2-mtd-2.6.git, thanks.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

* Re: [PATCH] nand: Remove meaningless delay from nand_unlock
  2011-04-10  2:30 jiri.pinkava
@ 2011-04-13  3:28 ` Artem Bityutskiy
  0 siblings, 0 replies; 7+ messages in thread
From: Artem Bityutskiy @ 2011-04-13  3:28 UTC (permalink / raw)
  To: jiri.pinkava, Vimal Singh; +Cc: sjhill, tglx, dwmw2, linux-mtd

On Sun, 2011-04-10 at 04:30 +0200, jiri.pinkava@vscht.cz wrote:
> From: Jiří Pinkava <jiri.pinkava@vscht.cz>
> 
> This delay is meaningless. If delay is needed it is device specific
> and must be reimplemented by specific driver, otherwise no delay is needed.
> 
> This function is not used by any current kernel code, affects only
> external code (like main).
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
> ---
>  drivers/mtd/nand/nand_base.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 2aef58e..5b5aff5 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -922,7 +922,6 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
>  
>  	/* Call wait ready function */
>  	status = chip->waitfunc(mtd, chip);
> -	udelay(1000);
>  	/* See if device thinks it succeeded */
>  	if (status & 0x01) {
>  		DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n",

Hi, it looks sane to remove this udelay. However,

1. If you do this, then you also have to do it in __nand_lock() - there
is a similar udelay()
2. Let's CC Vimal who is the author of this code - may be he'll tell us
why he added the delays.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)

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

* [PATCH] nand: Remove meaningless delay from nand_unlock
@ 2011-04-10  2:30 jiri.pinkava
  2011-04-13  3:28 ` Artem Bityutskiy
  0 siblings, 1 reply; 7+ messages in thread
From: jiri.pinkava @ 2011-04-10  2:30 UTC (permalink / raw)
  To: dwmw2; +Cc: sjhill, tglx, Jiří Pinkava, linux-mtd

From: Jiří Pinkava <jiri.pinkava@vscht.cz>

This delay is meaningless. If delay is needed it is device specific
and must be reimplemented by specific driver, otherwise no delay is needed.

This function is not used by any current kernel code, affects only
external code (like main).

Signed-off-by: Jiri Pinkava <jiri.pinkava@vscht.cz>
---
 drivers/mtd/nand/nand_base.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 2aef58e..5b5aff5 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -922,7 +922,6 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
 
 	/* Call wait ready function */
 	status = chip->waitfunc(mtd, chip);
-	udelay(1000);
 	/* See if device thinks it succeeded */
 	if (status & 0x01) {
 		DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n",
-- 
1.7.4.4

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

end of thread, other threads:[~2011-06-03 15:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-01 13:56 [PATCH] nand: Remove meaningless delay from nand_unlock jiri.pinkava
2011-06-02 16:23 ` Brian Norris
2011-06-02 16:26   ` Brian Norris
2011-06-02 18:24   ` Vimal Singh
2011-06-03 15:32 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2011-04-10  2:30 jiri.pinkava
2011-04-13  3:28 ` Artem Bityutskiy

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.