summaryrefslogtreecommitdiffstats
path: root/uClinux-2.4.20-uc1/arch/armnommu/mach-W90N745/time.c
blob: 067085f1254c771bedc41aefcf4694e62699ea24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
 * time.c  Timer functions for Winbond W90N745
 */

#include <linux/time.h>
#include <linux/timex.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <asm/io.h>
#include <asm/arch/hardware.h>
#include <linux/interrupt.h>

struct irqaction watchdog_irq = {
	name: "watchdog",
};

unsigned long winbond_gettimeoffset (void)
{
	return 0;
}

void winbond_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
        do_timer(regs);
}

void winbond_watchdog_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
	CSR_WRITE(WTCR, (CSR_READ(WTCR)&0xF7)|0x01);
}