Commit 2a10e0b2 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarPaul Gortmaker <p_gortmaker@yahoo.com>
Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 28fd1298
...@@ -96,7 +96,8 @@ static struct rtc_ops rtc_ops = { ...@@ -96,7 +96,8 @@ static struct rtc_ops rtc_ops = {
.set_alarm = rtc_set_alarm, .set_alarm = rtc_set_alarm,
}; };
static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
writel(0, rtc_base + RTC_EOI); writel(0, rtc_base + RTC_EOI);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -124,7 +125,7 @@ static int rtc_probe(struct amba_device *dev, void *id) ...@@ -124,7 +125,7 @@ static int rtc_probe(struct amba_device *dev, void *id)
xtime.tv_sec = __raw_readl(rtc_base + RTC_DR); xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT, ret = request_irq(dev->irq[0], arm_rtc_interrupt, SA_INTERRUPT,
"rtc-pl030", dev); "rtc-pl030", dev);
if (ret) if (ret)
goto map_out; goto map_out;
......
...@@ -259,8 +259,6 @@ __setup("hpet=", hpet_setup); ...@@ -259,8 +259,6 @@ __setup("hpet=", hpet_setup);
#include <linux/mc146818rtc.h> #include <linux/mc146818rtc.h>
#include <linux/rtc.h> #include <linux/rtc.h>
extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
#define DEFAULT_RTC_INT_FREQ 64 #define DEFAULT_RTC_INT_FREQ 64
#define RTC_NUM_INTS 1 #define RTC_NUM_INTS 1
......
...@@ -417,7 +417,7 @@ static __init unsigned int get_cpu_hz(void) ...@@ -417,7 +417,7 @@ static __init unsigned int get_cpu_hz(void)
/* /*
** Regardless the toolchain, force the compiler to use the ** Regardless the toolchain, force the compiler to use the
** arbitrary register r3 as a clock tick counter. ** arbitrary register r3 as a clock tick counter.
** NOTE: r3 must be in accordance with rtc_interrupt() ** NOTE: r3 must be in accordance with sh64_rtc_interrupt()
*/ */
register unsigned long long __rtc_irq_flag __asm__ ("r3"); register unsigned long long __rtc_irq_flag __asm__ ("r3");
...@@ -482,7 +482,8 @@ static __init unsigned int get_cpu_hz(void) ...@@ -482,7 +482,8 @@ static __init unsigned int get_cpu_hz(void)
#endif #endif
} }
static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs) static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id,
struct pt_regs *regs)
{ {
ctrl_outb(0, RCR1); /* Disable Carry Interrupts */ ctrl_outb(0, RCR1); /* Disable Carry Interrupts */
regs->regs[3] = 1; /* Using r3 */ 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,7 +492,7 @@ static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
static struct irqaction irq1 = { rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL}; static struct irqaction irq1 = { sh64_rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL};
void __init time_init(void) void __init time_init(void)
{ {
......
...@@ -1075,8 +1075,6 @@ device_initcall(time_init_device); ...@@ -1075,8 +1075,6 @@ device_initcall(time_init_device);
*/ */
#include <linux/rtc.h> #include <linux/rtc.h>
extern irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
#define DEFAULT_RTC_INT_FREQ 64 #define DEFAULT_RTC_INT_FREQ 64
#define RTC_NUM_INTS 1 #define RTC_NUM_INTS 1
......
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#ifndef _LINUX_RTC_H_ #ifndef _LINUX_RTC_H_
#define _LINUX_RTC_H_ #define _LINUX_RTC_H_
#include <linux/interrupt.h>
/* /*
* The struct used to pass data via the following ioctl. Similar to the * The struct used to pass data via the following ioctl. Similar to the
* struct tm in <time.h>, but it needs to be here so that the kernel * 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); ...@@ -102,6 +104,7 @@ int rtc_register(rtc_task_t *task);
int rtc_unregister(rtc_task_t *task); int rtc_unregister(rtc_task_t *task);
int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg);
void rtc_get_rtc_time(struct rtc_time *rtc_tm); void rtc_get_rtc_time(struct rtc_time *rtc_tm);
irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment