* added 0.99 linux version
[mascara-docs.git] / i386 / linux / linux-2.3.21 / arch / mips / lib / rtc-std.c
bloba601d187917868837c2b236d3291436b4f9ab0c4
1 /* $Id: rtc-std.c,v 1.2 1998/06/25 20:19:16 ralf Exp $
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details.
7 * RTC routines for PC style attached Dallas chip.
9 * Copyright (C) 1998 by Ralf Baechle
11 #include <linux/mc146818rtc.h>
12 #include <asm/io.h>
14 static unsigned char std_rtc_read_data(unsigned long addr)
16 outb_p(addr, RTC_PORT(0));
17 return inb_p(RTC_PORT(1));
20 static void std_rtc_write_data(unsigned char data, unsigned long addr)
22 outb_p(addr, RTC_PORT(0));
23 outb_p(data, RTC_PORT(1));
26 static int std_rtc_bcd_mode(void)
28 return 1;
31 struct rtc_ops std_rtc_ops = {
32 &std_rtc_read_data,
33 &std_rtc_write_data,
34 &std_rtc_bcd_mode