diff options
author | Hans J. Koch <hjk@linutronix.de> | 2011-02-17 16:42:59 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-11 10:06:06 +0100 |
commit | fe03a9f7bb89e920e60fd1bb074adab2eed2bf48 (patch) | |
tree | 4389363bf88c7d8d04b1bfc5f3421333470decb4 /arch/h8300 | |
parent | 85922e54a3a14a6aee6c0b1fc67d81ef0c60fc9c (diff) |
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>
Diffstat (limited to 'arch/h8300')
0 files changed, 0 insertions, 0 deletions