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, 2001 by Ralf Baechle 9 */ 10 #include <linux/module.h> 11 #include <linux/mc146818rtc.h> 12 #include <asm/io.h> 13 std_rtc_read_data(unsigned long addr)14static unsigned char std_rtc_read_data(unsigned long addr) 15 { 16 outb_p(addr, RTC_PORT(0)); 17 return inb_p(RTC_PORT(1)); 18 } 19 std_rtc_write_data(unsigned char data,unsigned long addr)20static void std_rtc_write_data(unsigned char data, unsigned long addr) 21 { 22 outb_p(addr, RTC_PORT(0)); 23 outb_p(data, RTC_PORT(1)); 24 } 25 std_rtc_bcd_mode(void)26static int std_rtc_bcd_mode(void) 27 { 28 return 1; 29 } 30 31 struct rtc_ops std_rtc_ops = { 32 &std_rtc_read_data, 33 &std_rtc_write_data, 34 &std_rtc_bcd_mode 35 }; 36 37 EXPORT_SYMBOL(rtc_ops); 38