MLK-14693 mx7ulp: Change PLL rate calculation to avoid div 0
authorYe Li <ye.li@nxp.com>
Fri, 14 Apr 2017 05:44:48 +0000 (13:44 +0800)
committerYe Li <ye.li@nxp.com>
Fri, 14 Apr 2017 06:04:30 +0000 (14:04 +0800)
commitb1d2ec2d646c5802ebdbbe6f1526c28a1f881933
treef75037afe62f310407ccb4ca49b69ddafb82052c
parente72f766c98a3df9b620feb51484e33c7d50bed3c
MLK-14693 mx7ulp: Change PLL rate calculation to avoid div 0

The new ROM patch will set DENOM and NUM of APLL and SPLL to 0 to
workaround PLL issue.
When DENOM is 0, the PLL rate calculation will divide 0 and raise a signal.

raise: Signal # 8 caught

To avoid such problem, we change our calculation.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f28cf489e1b3864bac6bae4944d8a73bab30ec32)
arch/arm/cpu/armv7/mx7ulp/scg.c