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#include <linux/init.h>
8#include <asm/mc146818rtc.h>
9
10static unsigned char ddb_rtc_read_data(unsigned long addr)
11{
12	outb_p(addr, RTC_PORT(0));
13
14	return inb_p(RTC_PORT(1));
15}
16
17static void ddb_rtc_write_data(unsigned char data, unsigned long addr)
18{
19	outb_p(addr, RTC_PORT(0));
20	outb_p(data, RTC_PORT(1));
21}
22
23static int ddb_rtc_bcd_mode(void)
24{
25	return 1;
26}
27
28struct rtc_ops ddb_rtc_ops = {
29	ddb_rtc_read_data,
30	ddb_rtc_write_data,
31	ddb_rtc_bcd_mode
32};
33