| Submitter | Haojian Zhuang |
|---|---|
| Date | Aug. 17, 2010, 12:29 p.m. |
| Message ID | <AANLkTikzdVAwOZcLhgHsDQGNhW4_-420XodbxSUmfDRW@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/61885/ |
| State | New |
| Headers | show |
Comments
On Tue, 2010-08-17 at 13:29 +0100, Haojian Zhuang wrote: > From 9064b2c877cad560fda7577564b3369c0025b7df Mon Sep 17 00:00:00 2001 > From: Lei Wen <leiwen@marvell.com> > Date: Tue, 17 Aug 2010 17:24:06 +0800 > Subject: [PATCH 01/06] pxa3xx_nand: update ns2cycle calculation method > > For the original method change from plus 1 to minus 1, > this way make the default timing like tCS become 0 after calculation, > although we set the timing as 0xa... > > Change the method to no plus and minus, and make the result > closer to what the timing specified in the NAND chip spec. > > Signed-off-by: Lei Wen <leiwen@marvell.com> I have an identical patch queued for -stable and 2.6.36 already, from Axel Lin (but with a slightly better changelog). I'll add your signed-off-by to that and send it on today. The other five I'll apply to the mtd-2.6.git on top, once I have Eric's ack. Thanks. By the way, please could you use my dwmw2@infradead.org address instead of @intel.com -- the latter has taken to corrupting incoming mail again, and they're being extremely slow to fix it.
On Wed, Aug 18, 2010 at 8:30 PM, David Woodhouse <dwmw2@infradead.org> wrote: > On Tue, 2010-08-17 at 13:29 +0100, Haojian Zhuang wrote: >> From 9064b2c877cad560fda7577564b3369c0025b7df Mon Sep 17 00:00:00 2001 >> From: Lei Wen <leiwen@marvell.com> >> Date: Tue, 17 Aug 2010 17:24:06 +0800 >> Subject: [PATCH 01/06] pxa3xx_nand: update ns2cycle calculation method >> >> For the original method change from plus 1 to minus 1, >> this way make the default timing like tCS become 0 after calculation, >> although we set the timing as 0xa... >> >> Change the method to no plus and minus, and make the result >> closer to what the timing specified in the NAND chip spec. >> >> Signed-off-by: Lei Wen <leiwen@marvell.com> > > I have an identical patch queued for -stable and 2.6.36 already, from > Axel Lin (but with a slightly better changelog). > > I'll add your signed-off-by to that and send it on today. > Sure. No problem. And I'll send this patch set again according to Eric's comments. So please ignore the first patch in your review.
Patch
From 9064b2c877cad560fda7577564b3369c0025b7df Mon Sep 17 00:00:00 2001 From: Lei Wen <leiwen@marvell.com> Date: Tue, 17 Aug 2010 17:24:06 +0800 Subject: [PATCH 01/12] pxa3xx_nand: update ns2cycle calculation method For the original method change from plus 1 to minus 1, this way make the default timing like tCS become 0 after calculation, although we set the timing as 0xa... Change the method to no plus and minus, and make the result closer to what the timing specified in the NAND chip spec. Signed-off-by: Lei Wen <leiwen@marvell.com> --- drivers/mtd/nand/pxa3xx_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index e02fa4f..4d89f37 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -363,7 +363,7 @@ static struct pxa3xx_nand_flash *builtin_flash_types[] = { #define tAR_NDTR1(r) (((r) >> 0) & 0xf) /* convert nano-seconds to nand flash controller clock cycles */ -#define ns2cycle(ns, clk) (int)(((ns) * (clk / 1000000) / 1000) - 1) +#define ns2cycle(ns, clk) (int)((ns) * (clk / 1000000) / 1000) /* convert nand flash controller clock cycles to nano-seconds */ #define cycle2ns(c, clk) ((((c) + 1) * 1000000 + clk / 500) / (clk / 1000)) -- 1.7.0.4