linux/arch/arm/mach-tcc8k
Hans J. Koch fe03a9f7bb arm: tcc8k: Fix clock rate calculation
The calculation of the best divider value for a requested clock rate
always returned a value that was slightly too large. It was also not
protected against possible divisions by zero.

Request for very low, but non zero rates would cause the ACLK divisor
field to overflow. Catch this situation by using the maximum value.

The internal function aclk_set_rate() calculates the correct divider
value, but doesn't write it back to the register. Add the write back.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Oskar Schirmer <oskar@linutronix.de>
Cc: bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-11 10:06:06 +01:00
..
board-tcc8000-sdk.c arm: tcc8k: Choose PLL settings conforming to board layout 2011-03-11 10:06:05 +01:00
clock.c arm: tcc8k: Fix clock rate calculation 2011-03-11 10:06:06 +01:00
common.h ARM: Add common platform devices for TCC8xxx SoCs 2010-09-17 21:55:09 +02:00
devices.c ARM: Add common platform devices for TCC8xxx SoCs 2010-09-17 21:55:09 +02:00
io.c ARM: Basic IO mappings for mach-tcc8k 2010-09-17 21:55:08 +02:00
irq.c ARM: tcc8k: irq_data conversion. 2011-01-13 17:19:03 +01:00
Kconfig ARM: Add board support for Telechips TCC8000-SDK board 2010-09-17 21:55:09 +02:00
Makefile ARM: Add board support for Telechips TCC8000-SDK board 2010-09-17 21:55:09 +02:00
Makefile.boot ARM: Add board support for Telechips TCC8000-SDK board 2010-09-17 21:55:09 +02:00
time.c ARM: tcc8k: update clock source registration 2010-12-22 22:44:37 +00:00