ARM: 8519/1: ICST: try other dividends than 1
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 10 Feb 2016 08:25:17 +0000 (09:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Feb 2016 19:57:48 +0000 (11:57 -0800)
commit57cd1f0a2031e82ac1cc13e56f12b7d979ee5403
tree17a82ae50ae0d78549ebddc92e20e95456ecebbe
parente2889463b33d8b7f4bfe4d7d824dd3d621f2e3ef
ARM: 8519/1: ICST: try other dividends than 1

commit e972c37459c813190461dabfeaac228e00aae259 upstream.

Since the dawn of time the ICST code has only supported divide
by one or hang in an eternal loop. Luckily we were always dividing
by one because the reference frequency for the systems using
the ICSTs is 24MHz and the [min,max] values for the PLL input
if [10,320] MHz for ICST307 and [6,200] for ICST525, so the loop
will always terminate immediately without assigning any divisor
for the reference frequency.

But for the code to make sense, let's insert the missing i++

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/common/icst.c