[PATCH] mpc5200/gpt: tiny fix for gpt period limitation
Albrecht Dreß
albrecht.dress at arcor.de
Fri Nov 13 20:24:14 EST 2009
Hi Grant:
Thanks a lot for pushing the stuff to 'test'.
> up patch 3. BUT, you're on my shit list. Patch 2 in your series
> conflicts with this patch. I had to fix it up by hand. This patch
I'm sorry for that confusion! I actually merged this patch into <http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-November/077715.html>:
<quote>
Note: The patch does also include the tiny GPT api changes from
<http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-November/077647.html>.
</quote>
Actually, this was not *really* the truth...
> should have been part of the series, or at least base the series on
> this patch. Take a look in my -test branch and make sure I fixed it
> right.
...because I now see the following diff between your test branch and my local version:
<snip>
adress at pc-adr2:/opt/eldk-4.2/usr/src/linux-2.6-secretlab$ diff -uBb arch/powerpc/platforms/52xx/mpc52xx_gpt.c ../linux-2.6-secretlab__/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
--- arch/powerpc/platforms/52xx/mpc52xx_gpt.c 2009-11-13 09:31:40.000000000 +0100
+++ ../linux-2.6-secretlab__/arch/powerpc/platforms/52xx/mpc52xx_gpt.c 2009-11-12 14:37:39.000000000 +0100
@@ -414,9 +414,10 @@
/* Determine the number of clocks in the requested period. 64 bit
* arithmatic is done here to preserve the precision until the value
* is scaled back down into the u32 range. Period is in 'ns', bus
- * frequency is in Hz. */
+ * frequency is in Hz. The maximum timeout @33MHz IPB clock is ~130
+ * seconds*/
clocks = period * (u64)gpt->ipb_freq;
- do_div(clocks, 1000000000); /* Scale it down to ns range */
+ do_div(clocks, 1000000000ULL); /* Scale it down to ns range */
/* This device cannot handle a clock count greater than 32 bits */
if (clocks > 0xffffffff)
@@ -460,7 +461,7 @@
/**
* mpc52xx_gpt_start_timer - Set and enable the GPT timer
* @gpt: Pointer to gpt private data structure
- * @period: period of timer in ns; max. ~130s @ 33MHz IPB clock
+ * @period: period of timer in ns
* @continuous: set to 1 to make timer continuous free running
*
* An interrupt will be generated every time the timer fires
</snip>
Again, I'm really sorry for the chaos! Apparently, submitting patches after two glasses of red wine is a questionable idea... :-/
Thanks, Albrecht.
Jetzt NEU: Do it youself E-Cards bei Arcor.de!
Stellen Sie Ihr eigenes Unikat zusammen und machen Sie dem Empfänger eine ganz persönliche Freude!
E-Card Marke Eigenbau: HIER KLICKEN: http://www.arcor.de/rd/footer.ecard
More information about the Linuxppc-dev
mailing list