All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH: only round s3c2410 NAND timing values when necessary
@ 2007-02-12 19:34 Matt Reimer
  0 siblings, 0 replies; only message in thread
From: Matt Reimer @ 2007-02-12 19:34 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 114 bytes --]

When calculating NAND timing values, only round up when necessary.

Signed-off-by: Matt Reimer <mreimer@vpop.net>

[-- Attachment #2: calc-rate.patch --]
[-- Type: application/octet-stream, Size: 371 bytes --]

--- a/drivers/mtd/nand/s3c2410.c	Tue Jan 30 12:15:08 2007
+++ b/drivers/mtd/nand/s3c2410.c.patched	Tue Jan 30 12:15:08 2007
@@ -159,7 +159,8 @@ static int s3c_nand_calc_rate(int wanted
 	int result;
 
 	result = (wanted * clk) / NS_IN_KHZ;
-	result++;
+	if (((wanted * clk) % NS_IN_KHZ) != 0)
+		result++;
 
 	pr_debug("result %d from %ld, %d\n", result, clk, wanted);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-12 19:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 19:34 PATCH: only round s3c2410 NAND timing values when necessary Matt Reimer

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.