summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/52xx
diff options
context:
space:
mode:
authorAlbrecht Dreß <albrecht.dress@arcor.de>2009-11-12 13:31:35 -0700
committerGrant Likely <grant.likely@secretlab.ca>2009-11-12 13:31:35 -0700
commit690b846aa1b42b4f35bfac0022b75a288d97fd13 (patch)
tree091ef9d196c9b80156bc6ce132eaa4f39e02afd4 /arch/powerpc/platforms/52xx
parent02d9e58e464b8aeed9a9cba951c3ae3c6bd06e30 (diff)
mpc5200/gpt: tiny fix for gpt period limitation
This patch changes the period parameter of mpc52xx_gpt_start_timer to a u64 to support larger timeout periods. Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch/powerpc/platforms/52xx')
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index 2c3fa13571c..77572abca6c 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -378,12 +378,12 @@ EXPORT_SYMBOL(mpc52xx_gpt_from_irq);
/**
* mpc52xx_gpt_start_timer - Set and enable the GPT timer
* @gpt: Pointer to gpt private data structure
- * @period: period of timer
+ * @period: period of timer in ns; max. ~130s @ 33MHz IPB clock
* @continuous: set to 1 to make timer continuous free running
*
* An interrupt will be generated every time the timer fires
*/
-int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, int period,
+int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, u64 period,
int continuous)
{
u32 clear, set;
@@ -400,7 +400,7 @@ int mpc52xx_gpt_start_timer(struct mpc52xx_gpt_priv *gpt, int period,
* 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. */
- clocks = (u64)period * (u64)gpt->ipb_freq;
+ clocks = period * (u64)gpt->ipb_freq;
do_div(clocks, 1000000000); /* Scale it down to ns range */
/* This device cannot handle a clock count greater than 32 bits */