aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/tx4927/toshiba_rbtx4927
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2007-10-24 12:34:09 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-10-29 15:35:35 -0400
commit229f773ef4ee852ad7bfbe8e1238a2c35b2baa6f (patch)
tree44d9dd3f2be845140024883db13ab879b4ce1f2e /arch/mips/tx4927/toshiba_rbtx4927
parent22df3f53e33d55335e1ef43d4e6ead54b379b3a2 (diff)
[MIPS] txx9tmr clockevent/clocksource driver
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@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/tx4927/toshiba_rbtx4927')
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index c7470fba6180..0299595ce1c4 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -63,6 +63,7 @@
63#include <asm/processor.h> 63#include <asm/processor.h>
64#include <asm/reboot.h> 64#include <asm/reboot.h>
65#include <asm/time.h> 65#include <asm/time.h>
66#include <asm/txx9tmr.h>
66#include <linux/bootmem.h> 67#include <linux/bootmem.h>
67#include <linux/blkdev.h> 68#include <linux/blkdev.h>
68#ifdef CONFIG_TOSHIBA_FPCIB0 69#ifdef CONFIG_TOSHIBA_FPCIB0
@@ -93,7 +94,6 @@
93 94
94#define TOSHIBA_RBTX4927_SETUP_EFWFU ( 1 << 3 ) 95#define TOSHIBA_RBTX4927_SETUP_EFWFU ( 1 << 3 )
95#define TOSHIBA_RBTX4927_SETUP_SETUP ( 1 << 4 ) 96#define TOSHIBA_RBTX4927_SETUP_SETUP ( 1 << 4 )
96#define TOSHIBA_RBTX4927_SETUP_TIME_INIT ( 1 << 5 )
97#define TOSHIBA_RBTX4927_SETUP_PCIBIOS ( 1 << 7 ) 97#define TOSHIBA_RBTX4927_SETUP_PCIBIOS ( 1 << 7 )
98#define TOSHIBA_RBTX4927_SETUP_PCI1 ( 1 << 8 ) 98#define TOSHIBA_RBTX4927_SETUP_PCI1 ( 1 << 8 )
99#define TOSHIBA_RBTX4927_SETUP_PCI2 ( 1 << 9 ) 99#define TOSHIBA_RBTX4927_SETUP_PCI2 ( 1 << 9 )
@@ -130,7 +130,6 @@ extern void toshiba_rbtx4927_power_off(void);
130 130
131int tx4927_using_backplane = 0; 131int tx4927_using_backplane = 0;
132 132
133extern void gt64120_time_init(void);
134extern void toshiba_rbtx4927_irq_setup(void); 133extern void toshiba_rbtx4927_irq_setup(void);
135 134
136char *prom_getcmdline(void); 135char *prom_getcmdline(void);
@@ -721,6 +720,7 @@ void toshiba_rbtx4927_power_off(void)
721 720
722void __init toshiba_rbtx4927_setup(void) 721void __init toshiba_rbtx4927_setup(void)
723{ 722{
723 int i;
724 u32 cp0_config; 724 u32 cp0_config;
725 char *argptr; 725 char *argptr;
726 726
@@ -764,6 +764,9 @@ void __init toshiba_rbtx4927_setup(void)
764 _machine_halt = toshiba_rbtx4927_halt; 764 _machine_halt = toshiba_rbtx4927_halt;
765 pm_power_off = toshiba_rbtx4927_power_off; 765 pm_power_off = toshiba_rbtx4927_power_off;
766 766
767 for (i = 0; i < TX4927_NR_TMR; i++)
768 txx9_tmr_init(TX4927_TMR_REG(0) & 0xfffffffffULL);
769
767#ifdef CONFIG_PCI 770#ifdef CONFIG_PCI
768 771
769 /* PCIC */ 772 /* PCIC */
@@ -892,7 +895,6 @@ void __init toshiba_rbtx4927_setup(void)
892#ifdef CONFIG_SERIAL_TXX9 895#ifdef CONFIG_SERIAL_TXX9
893 { 896 {
894 extern int early_serial_txx9_setup(struct uart_port *port); 897 extern int early_serial_txx9_setup(struct uart_port *port);
895 int i;
896 struct uart_port req; 898 struct uart_port req;
897 for(i = 0; i < 2; i++) { 899 for(i = 0; i < 2; i++) {
898 memset(&req, 0, sizeof(req)); 900 memset(&req, 0, sizeof(req));
@@ -937,12 +939,11 @@ void __init toshiba_rbtx4927_setup(void)
937void __init 939void __init
938toshiba_rbtx4927_time_init(void) 940toshiba_rbtx4927_time_init(void)
939{ 941{
940 TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIME_INIT, "-\n");
941
942 mips_hpt_frequency = tx4927_cpu_clock / 2; 942 mips_hpt_frequency = tx4927_cpu_clock / 2;
943 943 if (tx4927_ccfgptr->ccfg & TX4927_CCFG_TINTDIS)
944 TOSHIBA_RBTX4927_SETUP_DPRINTK(TOSHIBA_RBTX4927_SETUP_TIME_INIT, "+\n"); 944 txx9_clockevent_init(TX4927_TMR_REG(0) & 0xfffffffffULL,
945 945 TXX9_IRQ_BASE + 17,
946 50000000);
946} 947}
947 948
948static int __init toshiba_rbtx4927_rtc_init(void) 949static int __init toshiba_rbtx4927_rtc_init(void)