summaryrefslogtreecommitdiffstats
path: root/arch/mips/ddb5476/time.c
blob: 452aaec30962814e0f11ac6115683fdb8a3c71a4 (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
31
32
/*
 *  arch/mips/ddb5074/time.c -- Timer routines
 *
 *  Copyright (C) 2000 Geert Uytterhoeven <geert@sonycom.com>
 *                     Sony Software Development Center Europe (SDCE), Brussels
 */
#include <linux/init.h>

#include <asm/mc146818rtc.h>

static unsigned char ddb_rtc_read_data(unsigned long addr)
{
	outb_p(addr, RTC_PORT(0));
	return inb_p(RTC_PORT(1));
}

static void ddb_rtc_write_data(unsigned char data, unsigned long addr)
{
	outb_p(addr, RTC_PORT(0));
	outb_p(data, RTC_PORT(1));
}

static int ddb_rtc_bcd_mode(void)
{
	return 1;
}

struct rtc_ops ddb_rtc_ops = {
	ddb_rtc_read_data,
	ddb_rtc_write_data,
	ddb_rtc_bcd_mode
};