OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [mips64/] [lib/] [rtc-std.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
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
 
14
static 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
 
20
static 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
 
26
static 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);

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.