import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / arch / mips / ddb5xxx / ddb5074 / time.c
1 /*
2  *  arch/mips/ddb5074/time.c -- Timer routines
3  *
4  *  Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com>
5  *                     Sony Software Development Center Europe (SDCE), Brussels
6  *
7  */
8 #include <linux/init.h>
9 #include <asm/mc146818rtc.h>
10 #include <asm/ddb5xxx/ddb5074.h>
11 #include <asm/ddb5xxx/ddb5xxx.h>
12
13
14 static unsigned char ddb_rtc_read_data(unsigned long addr)
15 {
16         return *(volatile unsigned char *)(KSEG1ADDR(DDB_PCI_MEM_BASE)+addr);
17 }
18
19 static void ddb_rtc_write_data(unsigned char data, unsigned long addr)
20 {
21         *(volatile unsigned char *)(KSEG1ADDR(DDB_PCI_MEM_BASE)+addr)=data;
22 }
23
24 static int ddb_rtc_bcd_mode(void)
25 {
26         return 1;
27 }
28
29 struct rtc_ops ddb_rtc_ops = {
30         ddb_rtc_read_data,
31         ddb_rtc_write_data,
32         ddb_rtc_bcd_mode
33 };