aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-01-08 04:02:15 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:13:47 -0500
commit2a10e0b28b196051ae71829e5b989cba00513289 (patch)
tree52dfa9a64cfb3dd01fa1ee1150d589481e54e28e
parent28fd129827b00e12829d48a5290f46277600619b (diff)
[PATCH] move rtc_interrupt() prototype to rtc.h
This patch moves the rtc_interrupt() prototype to rtc.h and removes the prototypes from C files. It also renames static rtc_interrupt() functions in arch/arm/mach-integrator/time.c and arch/sh64/kernel/time.c to avoid compile problems. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Paul Gortmaker <p_gortmaker@yahoo.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/arm/mach-integrator/time.c5
-rw-r--r--arch/i386/kernel/time_hpet.c2
-rw-r--r--arch/sh64/kernel/time.c7
-rw-r--r--arch/x86_64/kernel/time.c2
-rw-r--r--include/linux/rtc.h3
5 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c
index 9f46aaef8968..3c22c16b38bf 100644
--- a/arch/arm/mach-integrator/time.c
+++ b/arch/arm/mach-integrator/time.c
@@ -96,7 +96,8 @@ static struct rtc_ops rtc_ops = {
96 .set_alarm = rtc_set_alarm, 96 .set_alarm = rtc_set_alarm,
97}; 97};
98 98
99static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) 99static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id,
100 struct pt_regs *regs)
100{ 101{
101 writel(0, rtc_base + RTC_EOI); 102 writel(0, rtc_base + RTC_EOI);
102 return IRQ_HANDLED; 103 return IRQ_HANDLED;
@@ -124,7 +125,7 @@ static int rtc_probe(struct amba_device *dev, void *id)
124 125
125 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR); 126 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
126 127
127 ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT, 128 ret = request_irq(dev->irq[0], arm_rtc_interrupt, SA_INTERRUPT,
128 "rtc-pl030", dev); 129 "rtc-pl030", dev);
129 if (ret) 130 if (ret)
130 goto map_out; 131 goto map_out;
diff --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c
index 9caeaa315cd7..a529f0cdce17 100644
--- a/arch/i386/kernel/time_hpet.c
+++ b/arch/i386/kernel/time_hpet.c
@@ -259,8 +259,6 @@ __setup("hpet=", hpet_setup);
259#include <linux/mc146818rtc.h> 259#include <linux/mc146818rtc.h>
260#include <linux/rtc.h> 260#include <linux/rtc.h>
261 261
262extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
263
264#define DEFAULT_RTC_INT_FREQ 64 262#define DEFAULT_RTC_INT_FREQ 64
265#define RTC_NUM_INTS 1 263#define RTC_NUM_INTS 1
266 264
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c
index 870fe5327e09..1195af37ee5a 100644
--- a/arch/sh64/kernel/time.c
+++ b/arch/sh64/kernel/time.c
@@ -417,7 +417,7 @@ static __init unsigned int get_cpu_hz(void)
417 /* 417 /*
418 ** Regardless the toolchain, force the compiler to use the 418 ** Regardless the toolchain, force the compiler to use the
419 ** arbitrary register r3 as a clock tick counter. 419 ** arbitrary register r3 as a clock tick counter.
420 ** NOTE: r3 must be in accordance with rtc_interrupt() 420 ** NOTE: r3 must be in accordance with sh64_rtc_interrupt()
421 */ 421 */
422 register unsigned long long __rtc_irq_flag __asm__ ("r3"); 422 register unsigned long long __rtc_irq_flag __asm__ ("r3");
423 423
@@ -482,7 +482,8 @@ static __init unsigned int get_cpu_hz(void)
482#endif 482#endif
483} 483}
484 484
485static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) 485static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id,
486 struct pt_regs *regs)
486{ 487{
487 ctrl_outb(0, RCR1); /* Disable Carry Interrupts */ 488 ctrl_outb(0, RCR1); /* Disable Carry Interrupts */
488 regs->regs[3] = 1; /* Using r3 */ 489 regs->regs[3] = 1; /* Using r3 */
@@ -491,7 +492,7 @@ static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
491} 492}
492 493
493static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; 494static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
494static struct irqaction irq1 = { rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL}; 495static struct irqaction irq1 = { sh64_rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL};
495 496
496void __init time_init(void) 497void __init time_init(void)
497{ 498{
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 74102796e5c0..43c9fa0f8d5f 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -1075,8 +1075,6 @@ device_initcall(time_init_device);
1075 */ 1075 */
1076#include <linux/rtc.h> 1076#include <linux/rtc.h>
1077 1077
1078extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
1079
1080#define DEFAULT_RTC_INT_FREQ 64 1078#define DEFAULT_RTC_INT_FREQ 64
1081#define RTC_NUM_INTS 1 1079#define RTC_NUM_INTS 1
1082 1080
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index e1aaf1fac8e0..0b2ba67ff13c 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -11,6 +11,8 @@
11#ifndef _LINUX_RTC_H_ 11#ifndef _LINUX_RTC_H_
12#define _LINUX_RTC_H_ 12#define _LINUX_RTC_H_
13 13
14#include <linux/interrupt.h>
15
14/* 16/*
15 * The struct used to pass data via the following ioctl. Similar to the 17 * The struct used to pass data via the following ioctl. Similar to the
16 * struct tm in <time.h>, but it needs to be here so that the kernel 18 * struct tm in <time.h>, but it needs to be here so that the kernel
@@ -102,6 +104,7 @@ int rtc_register(rtc_task_t *task);
102int rtc_unregister(rtc_task_t *task); 104int rtc_unregister(rtc_task_t *task);
103int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); 105int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
104void rtc_get_rtc_time(struct rtc_time *rtc_tm); 106void rtc_get_rtc_time(struct rtc_time *rtc_tm);
107irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
105 108
106#endif /* __KERNEL__ */ 109#endif /* __KERNEL__ */
107 110