1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * RTC routines for PC style attached Dallas chip. 7 * 8 * Copyright (C) 1998 by Ralf Baechle 9 */ 10#include <linux/mc146818rtc.h> 11#include <asm/io.h> 12 13static unsigned char std_rtc_read_data(unsigned long addr) 14{ 15 outb_p(addr, RTC_PORT(0)); 16 return inb_p(RTC_PORT(1)); 17} 18 19static void std_rtc_write_data(unsigned char data, unsigned long addr) 20{ 21 outb_p(addr, RTC_PORT(0)); 22 outb_p(data, RTC_PORT(1)); 23} 24 25static int std_rtc_bcd_mode(void) 26{ 27 return 1; 28} 29 30struct rtc_ops std_rtc_ops = { 31 &std_rtc_read_data, 32 &std_rtc_write_data, 33 &std_rtc_bcd_mode 34}; 35