summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tcc8k/clock.c
AgeCommit message (Collapse)AuthorFilesLines
2012-01-05arm: Remove mach-tcc8k directoryHans J. Koch1-580/+0
The Telechips ARM architecture is being removed. This patch deletes the arch/arm/mach-tcc8k/ folder. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Harry Sievers <hsievers@csselectronic.com> Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
2011-03-11arm: tcc8k: Fix bus clock calculationOskar Schirmer1-3/+10
There are two dividers used to derive bus clock from system clock: system clock is divided by SCKDIV+1, then by BCKDIV+1. SCKDIV divider has been ignored up to now, which is no problem as long as it is 0. Take SCKDIV into account for bus clock calculation. Signed-off-by: Oskar Schirmer <oskar@linutronix.de> Cc: bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-11arm: tcc8k: Fix indent, coding syleOskar Schirmer1-4/+3
Remove double definition of ACLKUSBH, change parameter name in root_clk_disable, as there is no reason to have a different name than in root_clk_enable. No functional change. Signed-off-by: Oskar Schirmer <oskar@linutronix.de> Cc: bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-11arm: tcc8k: Avoid reading clock register twiceOskar Schirmer1-1/+1
There is no reason why in case of PLL2 the configuration register should be read twice, while for PLL0/1 using the value previously read is used. Do the same for PLL2. Signed-off-by: Oskar Schirmer <oskar@linutronix.de> Cc: bigeasy@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-11arm: tcc8k: Fix clock rate calculationHans J. Koch1-4/+12
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>
2010-11-26ARM: 6483/1: arm & sh: factorised duplicated clkdev.cJean-Christop PLAGNIOL-VILLARD1-2/+1
factorise some generic infrastructure to assist looking up struct clks for the ARM & SH architecture. as the code is identical at 99% put the arch specific code for allocation as example in asm/clkdev.h Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-09-17ARM: Add TCC8xxx system timerHans J. Koch1-0/+1
Add the system timer using clockevents with the internal TC32 timer. This also adds a clocksource using the same timer. Signed-off-by: "Hans J. Koch" <hjk@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2010-09-17ARM: Add the clock framework for Telechips TCC8xxx processors.Hans J. Koch1-0/+566
This adds definitions and low-level functions to handle clocks in TCC8xxx processors. Signed-off-by: "Hans J. Koch" <hjk@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>