Hello.
Atsushi Nemoto wrote:
Convert jmr3927_clock_event_device to more generic
txx9tmr_clock_event_device which supports one-shot mode. The
txx9tmr_clock_event_device can be used for TX49 too if the cp0 timer
interrupt was not available.
Convert jmr3927_hpt_read to txx9_clocksource driver which does not
depends jiffies anymore. The txx9_clocksource itself can be used for
TX49, but normally TX49 uses higher precision clocksource_mips.
Signed-off-by: Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
---
Changes from "take 1" (suggested by Sergei Shtylyov)
* Define TXX9_CLOCKSOURCE_BITS and add a comment.
* Remove #ifdef around txx9_clocksource. It can be used for TX49 too.
* Move TXX9_TIMER_BITS into txx9tmr.h.
* Fix typo.
arch/mips/Kconfig | 6 +
arch/mips/jmr3927/rbhma3100/setup.c | 83 +---------
arch/mips/kernel/Makefile | 1 +
arch/mips/kernel/cevt-txx9.c | 171 ++++++++++++++++++++
.../toshiba_rbtx4927/toshiba_rbtx4927_setup.c | 17 +-
arch/mips/tx4938/toshiba_rbtx4938/setup.c | 19 +--
include/asm-mips/jmr3927/jmr3927.h | 9 +-
include/asm-mips/jmr3927/tx3927.h | 4 +-
include/asm-mips/jmr3927/txx927.h | 37 -----
include/asm-mips/tx4927/tx4927_pci.h | 3 +
include/asm-mips/tx4938/tx4938.h | 1 -
include/asm-mips/txx9tmr.h | 67 ++++++++
12 files changed, 273 insertions(+), 145 deletions(-)
@@ -736,6 +739,9 @@ config CEVT_GT641XX
config CEVT_R4K
bool
+config CEVT_TXX9
+ bool
+
Oh, the large economy -- instead of CEVT_* ISO CLOCKEVENT_*... :-)
@@ -937,12 +939,11 @@ void __init toshiba_rbtx4927_setup(void)
void __init
toshiba_rbtx4927_time_init(void)
{
- TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIME_INIT, "-\n");
-
mips_hpt_frequency = tx4927_cpu_clock / 2;
-
- TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIME_INIT, "+\n");
-
+ if (tx4927_ccfgptr->ccfg & TX4927_CCFG_TINTDIS)
+ txx9_clockevent_init(TX4927_TMR_REG(0) & 0xfffffffffULL,
+ TXX9_IRQ_BASE + 17,
+ 50000000);
Wait, you're not registering TXx9 clocksource anyway, so it's only taking
space indeed. Maybe we should register clock source/event regardless of the
value of CCFG.TINTDIS, and let them be selected according to rating?
WBR, Sergei