* [PATCH 16/25] pxa3xx_nand: update ns2cycle calculation method
@ 2010-06-04 6:10 Lei Wen
0 siblings, 0 replies; 2+ messages in thread
From: Lei Wen @ 2010-06-04 6:10 UTC (permalink / raw)
To: linux-arm-kernel
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 1e75df4..bdcc881 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -318,7 +318,7 @@ static const char *mtd_names[] = {"pxa3xx_nand-0",
"pxa3xx_nand-1", NULL};
#define NDTR1_tAR(c) (min((c), 15) << 0)
/* 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)
static void pxa3xx_nand_set_timing(struct pxa3xx_nand_info *info,
const struct pxa3xx_nand_timing *t)
{
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 16/25] pxa3xx_nand: update ns2cycle calculation method
@ 2010-06-18 5:35 Haojian Zhuang
0 siblings, 0 replies; 2+ messages in thread
From: Haojian Zhuang @ 2010-06-18 5:35 UTC (permalink / raw)
To: linux-arm-kernel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-18 5:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-04 6:10 [PATCH 16/25] pxa3xx_nand: update ns2cycle calculation method Lei Wen
-- strict thread matches above, loose matches on Subject: below --
2010-06-18 5:35 Haojian Zhuang
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).