Skip to content

Commit

Permalink
m68k: remove timer_interrupt() function
Browse files Browse the repository at this point in the history
This gets passed to a number of init functions, but is
ignored everywhere, so remove the function and change the
mach_sched_init callback to take no arguments.

Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
Arnd Bergmann committed Oct 30, 2020
1 parent 42f1d57 commit f9a0153
Show file tree
Hide file tree
Showing 24 changed files with 33 additions and 47 deletions.
2 changes: 1 addition & 1 deletion arch/m68k/68000/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static struct clocksource m68328_clk = {

/***************************************************************************/

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
int ret;

Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/amiga/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static char *amiga_models[] __initdata = {

static char amiga_model_name[13] = "Amiga ";

static void amiga_sched_init(irq_handler_t handler);
static void amiga_sched_init(void);
static void amiga_get_model(char *model);
static void amiga_get_hardware_list(struct seq_file *m);
extern void amiga_mksound(unsigned int count, unsigned int ticks);
Expand Down Expand Up @@ -483,7 +483,7 @@ static irqreturn_t ciab_timer_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}

static void __init amiga_sched_init(irq_handler_t timer_routine)
static void __init amiga_sched_init(void)
{
static struct resource sched_res = {
.name = "timer", .start = 0x00bfd400, .end = 0x00bfd5ff,
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/apollo/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ u_long cpuctrl_physaddr;
u_long timer_physaddr;
u_long apollo_model;

extern void dn_sched_init(irq_handler_t handler);
extern void dn_sched_init(void);
extern void dn_init_IRQ(void);
extern int dn_dummy_hwclk(int, struct rtc_time *);
extern void dn_dummy_reset(void);
Expand Down Expand Up @@ -179,7 +179,7 @@ irqreturn_t dn_timer_int(int irq, void *dev_id)
return IRQ_HANDLED;
}

void dn_sched_init(irq_handler_t timer_routine)
void dn_sched_init(void)
{
/* program timer 1 */
*(volatile unsigned char *)(apollo_timer + 3) = 0x01;
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/atari/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ static void atari_heartbeat(int on);
#endif

/* atari specific timer functions (in time.c) */
extern void atari_sched_init(irq_handler_t);
extern void atari_sched_init(void);
extern int atari_mste_hwclk (int, struct rtc_time *);
extern int atari_tt_hwclk (int, struct rtc_time *);

Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/atari/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static irqreturn_t mfp_timer_c_handler(int irq, void *dev_id)
}

void __init
atari_sched_init(irq_handler_t timer_routine)
atari_sched_init(void)
{
/* set Timer C data Register */
st_mfp.tim_dt_c = INT_TICKS;
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/bvme6000/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <asm/bvme6000hw.h>

static void bvme6000_get_model(char *model);
extern void bvme6000_sched_init(irq_handler_t handler);
extern void bvme6000_sched_init(void);
extern int bvme6000_hwclk (int, struct rtc_time *);
extern void bvme6000_reset (void);
void bvme6000_set_vectors (void);
Expand Down Expand Up @@ -189,7 +189,7 @@ static irqreturn_t bvme6000_timer_int (int irq, void *dev_id)
* so divide by 8 to get the microsecond result.
*/

void bvme6000_sched_init (irq_handler_t timer_routine)
void bvme6000_sched_init (void)
{
volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
unsigned char msr = rtc->msr & 0xc0;
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/coldfire/pit.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static struct clocksource pit_clk = {

/***************************************************************************/

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
int ret;

Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/coldfire/sltimers.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static struct clocksource mcfslt_clk = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
int r;

Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/coldfire/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static struct clocksource mcftmr_clk = {

/***************************************************************************/

void hw_timer_init(irq_handler_t handler)
void hw_timer_init(void)
{
int r;

Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/hp300/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ static u64 hp300_read_clk(struct clocksource *cs)
return ticks;
}

void __init hp300_sched_init(irq_handler_t vector)
void __init hp300_sched_init(void)
{
out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */
out_8(CLOCKBASE + CLKCR1, 0x1); /* reset */
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/hp300/time.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
extern void hp300_sched_init(irq_handler_t vector);
extern void hp300_sched_init(void);
5 changes: 2 additions & 3 deletions arch/m68k/include/asm/machdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct rtc_time;
struct rtc_pll_info;
struct buffer_head;

extern void (*mach_sched_init) (irq_handler_t handler);
extern void (*mach_sched_init) (void);
/* machine dependent irq functions */
extern void (*mach_init_IRQ) (void);
extern void (*mach_get_model) (char *model);
Expand All @@ -33,8 +33,7 @@ extern void (*mach_l2_flush) (int);
extern void (*mach_beep) (unsigned int, unsigned int);

/* Hardware clock functions */
extern void hw_timer_init(irq_handler_t handler);
extern unsigned long hw_timer_offset(void);
extern void hw_timer_init(void);
#ifdef CONFIG_HEARTBEAT
extern void timer_heartbeat(void);
#else
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/setup_mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static struct m68k_mem_info m68k_ramdisk __initdata;

static char m68k_command_line[CL_SIZE] __initdata;

void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
void (*mach_sched_init) (void) __initdata = NULL;
/* machine dependent irq functions */
void (*mach_init_IRQ) (void) __initdata = NULL;
void (*mach_get_model) (char *model);
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/kernel/setup_no.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ EXPORT_SYMBOL(memory_end);
char __initdata command_line[COMMAND_LINE_SIZE];

/* machine dependent timer functions */
void (*mach_sched_init)(irq_handler_t handler) __initdata = NULL;
void (*mach_sched_init)(void) __initdata = NULL;
int (*mach_hwclk) (int, struct rtc_time*);

/* machine dependent reboot functions */
Expand Down
15 changes: 1 addition & 14 deletions arch/m68k/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,6 @@
unsigned long (*mach_random_get_entropy)(void);
EXPORT_SYMBOL_GPL(mach_random_get_entropy);


/*
* timer_interrupt() needs to keep up the real-time clock,
* as well as call the "xtime_update()" routine every clocktick
*/
static irqreturn_t timer_interrupt(int irq, void *dummy)
{
xtime_update(1);
update_process_times(user_mode(get_irq_regs()));
profile_tick(CPU_PROFILING);
return IRQ_HANDLED;
}

#ifdef CONFIG_HEARTBEAT
void timer_heartbeat(void)
{
Expand Down Expand Up @@ -157,5 +144,5 @@ module_init(rtc_init);

void __init time_init(void)
{
mach_sched_init(timer_interrupt);
mach_sched_init();
}
6 changes: 3 additions & 3 deletions arch/m68k/mac/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extern int mac_hwclk(int, struct rtc_time *);
extern void iop_preinit(void);
extern void iop_init(void);
extern void via_init(void);
extern void via_init_clock(irq_handler_t func);
extern void via_init_clock(void);
extern void oss_init(void);
extern void psc_init(void);
extern void baboon_init(void);
Expand All @@ -69,9 +69,9 @@ static void mac_get_model(char *str);
static void mac_identify(void);
static void mac_report_hardware(void);

static void __init mac_sched_init(irq_handler_t vector)
static void __init mac_sched_init(void)
{
via_init_clock(vector);
via_init_clock();
}

/*
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/mac/via.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ static irqreturn_t via_timer_handler(int irq, void *dev_id)
return IRQ_HANDLED;
}

void __init via_init_clock(irq_handler_t timer_routine)
void __init via_init_clock(void)
{
if (request_irq(IRQ_MAC_TIMER_1, via_timer_handler, IRQF_TIMER, "timer",
NULL)) {
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/mvme147/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


static void mvme147_get_model(char *model);
extern void mvme147_sched_init(irq_handler_t handler);
extern void mvme147_sched_init(void);
extern int mvme147_hwclk (int, struct rtc_time *);
extern void mvme147_reset (void);

Expand Down Expand Up @@ -125,7 +125,7 @@ static irqreturn_t mvme147_timer_int (int irq, void *dev_id)
}


void mvme147_sched_init (irq_handler_t timer_routine)
void mvme147_sched_init (void)
{
if (request_irq(PCC_IRQ_TIMER1, mvme147_timer_int, IRQF_TIMER,
"timer 1", NULL))
Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/mvme16x/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern t_bdid mvme_bdid;
static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;

static void mvme16x_get_model(char *model);
extern void mvme16x_sched_init(irq_handler_t handler);
extern void mvme16x_sched_init(void);
extern int mvme16x_hwclk (int, struct rtc_time *);
extern void mvme16x_reset (void);

Expand Down Expand Up @@ -384,7 +384,7 @@ static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
return IRQ_HANDLED;
}

void mvme16x_sched_init (irq_handler_t timer_routine)
void mvme16x_sched_init(void)
{
uint16_t brdno = be16_to_cpu(mvme_bdid.brdno);
int irq;
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/q40/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

extern void q40_init_IRQ(void);
static void q40_get_model(char *model);
extern void q40_sched_init(irq_handler_t handler);
extern void q40_sched_init(void);

static int q40_hwclk(int, struct rtc_time *);
static unsigned int q40_get_ss(void);
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/q40/q40ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static irqreturn_t q40_timer_int(int irq, void *dev_id)
return IRQ_HANDLED;
}

void q40_sched_init (irq_handler_t timer_routine)
void q40_sched_init (void)
{
int timer_irq;

Expand Down
4 changes: 2 additions & 2 deletions arch/m68k/sun3/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

char sun3_reserved_pmeg[SUN3_PMEGS_NUM];

static void sun3_sched_init(irq_handler_t handler);
static void sun3_sched_init(void);
extern void sun3_get_model (char* model);
extern int sun3_hwclk(int set, struct rtc_time *t);

Expand Down Expand Up @@ -151,7 +151,7 @@ void __init config_sun3(void)
sun3_bootmem_alloc(memory_start, memory_end);
}

static void __init sun3_sched_init(irq_handler_t timer_routine)
static void __init sun3_sched_init(void)
{
sun3_disable_interrupts();
intersil_clock->cmd_reg=(INTERSIL_RUN|INTERSIL_INT_DISABLE|INTERSIL_24H_MODE);
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/sun3x/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static irqreturn_t sun3x_timer_tick(int irq, void *dev_id)
}
#endif

void __init sun3x_sched_init(irq_handler_t vector)
void __init sun3x_sched_init(void)
{

sun3_disable_interrupts();
Expand Down
2 changes: 1 addition & 1 deletion arch/m68k/sun3x/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define SUN3X_TIME_H

extern int sun3x_hwclk(int set, struct rtc_time *t);
void sun3x_sched_init(irq_handler_t vector);
void sun3x_sched_init(void);

struct mostek_dt {
volatile unsigned char csr;
Expand Down

0 comments on commit f9a0153

Please sign in to comment.