Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
arch
/
arm
/
common
/
icst.c
diff --git
a/kernel/arch/arm/common/icst.c
b/kernel/arch/arm/common/icst.c
index
2dc6da7
..
d7ed252
100644
(file)
--- a/
kernel/arch/arm/common/icst.c
+++ b/
kernel/arch/arm/common/icst.c
@@
-16,7
+16,7
@@
*/
#include <linux/module.h>
#include <linux/kernel.h>
*/
#include <linux/module.h>
#include <linux/kernel.h>
-
+#include <asm/div64.h>
#include <asm/hardware/icst.h>
/*
#include <asm/hardware/icst.h>
/*
@@
-29,7
+29,11
@@
EXPORT_SYMBOL(icst525_s2div);
unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco)
{
unsigned long icst_hz(const struct icst_params *p, struct icst_vco vco)
{
- return p->ref * 2 * (vco.v + 8) / ((vco.r + 2) * p->s2div[vco.s]);
+ u64 dividend = p->ref * 2 * (u64)(vco.v + 8);
+ u32 divisor = (vco.r + 2) * p->s2div[vco.s];
+
+ do_div(dividend, divisor);
+ return (unsigned long)dividend;
}
EXPORT_SYMBOL(icst_hz);
}
EXPORT_SYMBOL(icst_hz);
@@
-58,6
+62,7
@@
icst_hz_to_vco(const struct icst_params *p, unsigned long freq)
if (f > p->vco_min && f <= p->vco_max)
break;
if (f > p->vco_min && f <= p->vco_max)
break;
+ i++;
} while (i < 8);
if (i >= 8)
} while (i < 8);
if (i >= 8)