aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-04-21 15:24:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 16:41:47 -0400
commit8e19608e8b5c001e4a66ce482edc474f05fb7355 (patch)
tree06af4be339136da7476396604c30112238d84339 /arch/mips
parentff14ed5db6e7e5e5dc23712d3c877891d4d9a1a8 (diff)
clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources. This allows us to share the callback between multiple instances. [hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods] [akpm@linux-foundation.org: cleanup] Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/kernel/cevt-txx9.c2
-rw-r--r--arch/mips/kernel/csrc-bcm1480.c2
-rw-r--r--arch/mips/kernel/csrc-ioasic.c6
-rw-r--r--arch/mips/kernel/csrc-r4k.c2
-rw-r--r--arch/mips/kernel/csrc-sb1250.c2
-rw-r--r--arch/mips/kernel/i8253.c2
-rw-r--r--arch/mips/nxp/pnx8550/common/time.c2
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c2
8 files changed, 10 insertions, 10 deletions
diff --git a/arch/mips/kernel/cevt-txx9.c b/arch/mips/kernel/cevt-txx9.c
index eccf7d6096bd..2e911e3da8d3 100644
--- a/arch/mips/kernel/cevt-txx9.c
+++ b/arch/mips/kernel/cevt-txx9.c
@@ -22,7 +22,7 @@
22 22
23static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr; 23static struct txx9_tmr_reg __iomem *txx9_cs_tmrptr;
24 24
25static cycle_t txx9_cs_read(void) 25static cycle_t txx9_cs_read(struct clocksource *cs)
26{ 26{
27 return __raw_readl(&txx9_cs_tmrptr->trr); 27 return __raw_readl(&txx9_cs_tmrptr->trr);
28} 28}
diff --git a/arch/mips/kernel/csrc-bcm1480.c b/arch/mips/kernel/csrc-bcm1480.c
index 868745e7184b..51489f8a825e 100644
--- a/arch/mips/kernel/csrc-bcm1480.c
+++ b/arch/mips/kernel/csrc-bcm1480.c
@@ -28,7 +28,7 @@
28 28
29#include <asm/sibyte/sb1250.h> 29#include <asm/sibyte/sb1250.h>
30 30
31static cycle_t bcm1480_hpt_read(void) 31static cycle_t bcm1480_hpt_read(struct clocksource *cs)
32{ 32{
33 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT)); 33 return (cycle_t) __raw_readq(IOADDR(A_SCD_ZBBUS_CYCLE_COUNT));
34} 34}
diff --git a/arch/mips/kernel/csrc-ioasic.c b/arch/mips/kernel/csrc-ioasic.c
index 1d5f63cf8997..b551f48d3a07 100644
--- a/arch/mips/kernel/csrc-ioasic.c
+++ b/arch/mips/kernel/csrc-ioasic.c
@@ -25,7 +25,7 @@
25#include <asm/dec/ioasic.h> 25#include <asm/dec/ioasic.h>
26#include <asm/dec/ioasic_addrs.h> 26#include <asm/dec/ioasic_addrs.h>
27 27
28static cycle_t dec_ioasic_hpt_read(void) 28static cycle_t dec_ioasic_hpt_read(struct clocksource *cs)
29{ 29{
30 return ioasic_read(IO_REG_FCTR); 30 return ioasic_read(IO_REG_FCTR);
31} 31}
@@ -47,13 +47,13 @@ void __init dec_ioasic_clocksource_init(void)
47 while (!ds1287_timer_state()) 47 while (!ds1287_timer_state())
48 ; 48 ;
49 49
50 start = dec_ioasic_hpt_read(); 50 start = dec_ioasic_hpt_read(&clocksource_dec);
51 51
52 while (i--) 52 while (i--)
53 while (!ds1287_timer_state()) 53 while (!ds1287_timer_state())
54 ; 54 ;
55 55
56 end = dec_ioasic_hpt_read(); 56 end = dec_ioasic_hpt_read(&clocksource_dec);
57 57
58 freq = (end - start) * 10; 58 freq = (end - start) * 10;
59 printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq); 59 printk(KERN_INFO "I/O ASIC clock frequency %dHz\n", freq);
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c
index f1a2893931ed..e95a3cd48eea 100644
--- a/arch/mips/kernel/csrc-r4k.c
+++ b/arch/mips/kernel/csrc-r4k.c
@@ -10,7 +10,7 @@
10 10
11#include <asm/time.h> 11#include <asm/time.h>
12 12
13static cycle_t c0_hpt_read(void) 13static cycle_t c0_hpt_read(struct clocksource *cs)
14{ 14{
15 return read_c0_count(); 15 return read_c0_count();
16} 16}
diff --git a/arch/mips/kernel/csrc-sb1250.c b/arch/mips/kernel/csrc-sb1250.c
index 92212bbb8e45..d14d3d1907fa 100644
--- a/arch/mips/kernel/csrc-sb1250.c
+++ b/arch/mips/kernel/csrc-sb1250.c
@@ -33,7 +33,7 @@
33 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over 33 * The HPT is free running from SB1250_HPT_VALUE down to 0 then starts over
34 * again. 34 * again.
35 */ 35 */
36static cycle_t sb1250_hpt_read(void) 36static cycle_t sb1250_hpt_read(struct clocksource *cs)
37{ 37{
38 unsigned int count; 38 unsigned int count;
39 39
diff --git a/arch/mips/kernel/i8253.c b/arch/mips/kernel/i8253.c
index 689719e34f08..ed20e7fe65e3 100644
--- a/arch/mips/kernel/i8253.c
+++ b/arch/mips/kernel/i8253.c
@@ -128,7 +128,7 @@ void __init setup_pit_timer(void)
128 * to just read by itself. So use jiffies to emulate a free 128 * to just read by itself. So use jiffies to emulate a free
129 * running counter: 129 * running counter:
130 */ 130 */
131static cycle_t pit_read(void) 131static cycle_t pit_read(struct clocksource *cs)
132{ 132{
133 unsigned long flags; 133 unsigned long flags;
134 int count; 134 int count;
diff --git a/arch/mips/nxp/pnx8550/common/time.c b/arch/mips/nxp/pnx8550/common/time.c
index cf293b279098..8df43e9e4d90 100644
--- a/arch/mips/nxp/pnx8550/common/time.c
+++ b/arch/mips/nxp/pnx8550/common/time.c
@@ -35,7 +35,7 @@
35 35
36static unsigned long cpj; 36static unsigned long cpj;
37 37
38static cycle_t hpt_read(void) 38static cycle_t hpt_read(struct clocksource *cs)
39{ 39{
40 return read_c0_count2(); 40 return read_c0_count2();
41} 41}
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index f024057a35f8..f10a7cd64f7e 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -159,7 +159,7 @@ static void __init hub_rt_clock_event_global_init(void)
159 setup_irq(irq, &hub_rt_irqaction); 159 setup_irq(irq, &hub_rt_irqaction);
160} 160}
161 161
162static cycle_t hub_rt_read(void) 162static cycle_t hub_rt_read(struct clocksource *cs)
163{ 163{
164 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT); 164 return REMOTE_HUB_L(cputonasid(0), PI_RT_COUNT);
165} 165}