[PATCH] S3C2412 TACLS rate calculation fix
Matt Reimer
mattjreimer at gmail.com
Tue Feb 13 13:47:27 EST 2007
On 2/13/07, Matthieu CASTET <matthieu.castet at parrot.fr> wrote:
> Ben Dooks <ben <at> fluff.org.uk> writes:
>
> >
> > The TALCs value on the S3C2412 value does not have
> > an +1 adjustment unlike the S3C2410 and S3C2440.
> >
> > The TALCs value on the S3C2440 is only 2 bits instead
> > of three, so change it to a maximum of 4.
> >
> > Re-work of an patch by Matt Reimer <mreimer <at> vpop.net>
> >
> Doesn't we lose the part that allow tacls to be 0 ?
Yes, we need that so 2410 can use 0 (which translates to 10 ns).
Also, I sent another patch that seems to have gotten hung up by the ml:
--- 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);
(Thanks the in-line clue Ben.)
Matt
More information about the linux-mtd
mailing list