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 DECstation style attached Dallas DS1287 chip. 7 * 8 * Copyright (C) 1998, 2001 by Ralf Baechle 9 * Copyright (C) 1998 by Harald Koerfgen 10 * Copyright (C) 2002 Maciej W. Rozycki 11 */ 12 13#include <linux/mc146818rtc.h> 14#include <linux/module.h> 15#include <linux/types.h> 16 17volatile u8 *dec_rtc_base; 18 19static unsigned char dec_rtc_read_data(unsigned long addr) 20{ 21 return dec_rtc_base[addr * 4]; 22} 23 24static void dec_rtc_write_data(unsigned char data, unsigned long addr) 25{ 26 dec_rtc_base[addr * 4] = data; 27} 28 29static int dec_rtc_bcd_mode(void) 30{ 31 return 0; 32} 33 34struct rtc_ops dec_rtc_ops = { 35 &dec_rtc_read_data, 36 &dec_rtc_write_data, 37 &dec_rtc_bcd_mode 38}; 39 40EXPORT_SYMBOL(dec_rtc_base); 41