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 Jazz style attached Dallas chip. 7 * 8 * Copyright (C) 1998, 2001 by Ralf Baechle 9 */ 10#include <linux/mc146818rtc.h> 11#include <asm/io.h> 12#include <asm/jazz.h> 13 14static unsigned char jazz_rtc_read_data(unsigned long addr) 15{ 16 outb_p(addr, RTC_PORT(0)); 17 return *(char *)JAZZ_RTC_BASE; 18} 19 20static void jazz_rtc_write_data(unsigned char data, unsigned long addr) 21{ 22 outb_p(addr, RTC_PORT(0)); 23 *(char *)JAZZ_RTC_BASE = data; 24} 25 26static int jazz_rtc_bcd_mode(void) 27{ 28 return 0; 29} 30 31struct rtc_ops jazz_rtc_ops = { 32 &jazz_rtc_read_data, 33 &jazz_rtc_write_data, 34 &jazz_rtc_bcd_mode 35}; 36