rtc.h revision 4968
1246149Ssjg/*- 2246149Ssjg * Copyright (c) 1990 The Regents of the University of California. 3246149Ssjg * All rights reserved. 4246149Ssjg * 5246149Ssjg * This code is derived from software contributed to Berkeley by 6246149Ssjg * William Jolitz. 7246149Ssjg * 8246149Ssjg * Redistribution and use in source and binary forms, with or without 9246149Ssjg * modification, are permitted provided that the following conditions 10246149Ssjg * are met: 11246149Ssjg * 1. Redistributions of source code must retain the above copyright 12246149Ssjg * notice, this list of conditions and the following disclaimer. 13246149Ssjg * 2. Redistributions in binary form must reproduce the above copyright 14246149Ssjg * notice, this list of conditions and the following disclaimer in the 15246149Ssjg * documentation and/or other materials provided with the distribution. 16246149Ssjg * 3. All advertising materials mentioning features or use of this software 17246149Ssjg * must display the following acknowledgement: 18246149Ssjg * This product includes software developed by the University of 19246149Ssjg * California, Berkeley and its contributors. 20246149Ssjg * 4. Neither the name of the University nor the names of its contributors 21246149Ssjg * may be used to endorse or promote products derived from this software 22246149Ssjg * without specific prior written permission. 23246149Ssjg * 24246149Ssjg * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25246149Ssjg * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26246149Ssjg * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27246149Ssjg * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28246149Ssjg * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29246149Ssjg * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30246149Ssjg * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31246149Ssjg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32246149Ssjg * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33246149Ssjg * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34246149Ssjg * SUCH DAMAGE. 35246149Ssjg * 36246149Ssjg * from: @(#)rtc.h 7.1 (Berkeley) 5/12/91 37246149Ssjg * $Id: rtc.h,v 1.6 1994/09/20 00:31:07 ache Exp $ 38246149Ssjg */ 39246149Ssjg 40246149Ssjg#ifndef _I386_ISA_RTC_H_ 41246149Ssjg#define _I386_ISA_RTC_H_ 1 42246149Ssjg 43246149Ssjg/* 44246149Ssjg * RTC Register locations 45246149Ssjg */ 46246149Ssjg 47246149Ssjg#define RTC_SEC 0x00 /* seconds */ 48246149Ssjg#define RTC_SECALRM 0x01 /* seconds alarm */ 49246149Ssjg#define RTC_MIN 0x02 /* minutes */ 50246149Ssjg#define RTC_MINALRM 0x03 /* minutes alarm */ 51246149Ssjg#define RTC_HRS 0x04 /* hours */ 52246149Ssjg#define RTC_HRSALRM 0x05 /* hours alarm */ 53246149Ssjg#define RTC_WDAY 0x06 /* week day */ 54246149Ssjg#define RTC_DAY 0x07 /* day of month */ 55246149Ssjg#define RTC_MONTH 0x08 /* month of year */ 56246149Ssjg#define RTC_YEAR 0x09 /* month of year */ 57246149Ssjg 58246149Ssjg#define RTC_STATUSA 0x0a /* status register A */ 59246149Ssjg#define RTCSA_TUP 0x80 /* time update, don't look now */ 60246149Ssjg#define RTCSA_DIVIDER 0x20 /* divider correct for 32768 Hz */ 61246149Ssjg#define RTCSA_8192 0x03 62246149Ssjg#define RTCSA_4096 0x04 63246149Ssjg#define RTCSA_2048 0x05 64246149Ssjg#define RTCSA_1024 0x06 /* default for profiling */ 65246149Ssjg#define RTCSA_PROF RTCSA_1024 66246149Ssjg#define RTC_PROFRATE 1024 67246149Ssjg#define RTCSA_512 0x07 68246149Ssjg#define RTCSA_256 0x08 69246149Ssjg#define RTCSA_128 0x09 70246149Ssjg#define RTCSA_NOPROF RTCSA_128 71246149Ssjg#define RTC_NOPROFRATE 128 72246149Ssjg#define RTCSA_64 0x0a 73246149Ssjg#define RTCSA_32 0x0b 74246149Ssjg 75246149Ssjg#define RTC_STATUSB 0x0b /* status register B */ 76246149Ssjg#define RTCSB_DST 0x01 /* Daylight Savings Time enable */ 77246149Ssjg#define RTCSB_24HR 0x02 /* 0 = 12 hours, 1 = 24 hours */ 78246149Ssjg#define RTCSB_BCD 0x04 /* 0 = BCD, 1 = Binary coded time */ 79246149Ssjg#define RTCSB_SQWE 0x08 /* 1 = output sqare wave at SQW pin */ 80246149Ssjg#define RTCSB_UINTR 0x10 /* 1 = enable update-ended interrupt */ 81246149Ssjg#define RTCSB_AINTR 0x20 /* 1 = enable alarm interrupt */ 82246149Ssjg#define RTCSB_PINTR 0x40 /* 1 = enable periodic clock interrupt */ 83246149Ssjg#define RTCSB_HALT 0x80 /* stop clock updates */ 84246149Ssjg 85246149Ssjg#define RTC_INTR 0x0c /* status register C (R) interrupt source */ 86246149Ssjg#define RTCIR_UPDATE 0x10 /* update intr */ 87246149Ssjg#define RTCIR_ALARM 0x20 /* alarm intr */ 88246149Ssjg#define RTCIR_PERIOD 0x40 /* periodic intr */ 89246149Ssjg#define RTCIR_INT 0x80 /* interrupt output signal */ 90246149Ssjg 91246149Ssjg#define RTC_STATUSD 0x0d /* status register D (R) Lost Power */ 92246149Ssjg#define RTCSD_PWR 0x80 /* clock lost power */ 93246149Ssjg 94246149Ssjg#define RTC_DIAG 0x0e /* status register E - bios diagnostic */ 95246149Ssjg#define RTCDG_BITS "\020\010clock_battery\007ROM_cksum\006config_unit\005memory_size\004fixed_disk\003invalid_time" 96246149Ssjg 97246149Ssjg#define RTC_RESET 0x0f /* status register F - reset code byte */ 98246149Ssjg#define RTCRS_RST 0x00 /* normal reset */ 99246149Ssjg#define RTCRS_LOAD 0x04 /* load system */ 100246149Ssjg 101246149Ssjg#define RTC_FDISKETTE 0x10 /* diskette drive type in upper/lower nibble */ 102246149Ssjg#define RTCFDT_NONE 0 /* none present */ 103246149Ssjg#define RTCFDT_360K 0x10 /* 360K */ 104246149Ssjg#define RTCFDT_12M 0x20 /* 1.2M */ 105246149Ssjg#define RTCFDT_720K 0x30 /* 720K */ 106246149Ssjg#define RTCFDT_144M 0x40 /* 1.44M */ 107246149Ssjg#define RTCFDT_288M 0x60 /* 2.88M */ 108246149Ssjg 109246149Ssjg#define RTC_BASELO 0x15 /* low byte of basemem size */ 110246149Ssjg#define RTC_BASEHI 0x16 /* high byte of basemem size */ 111246149Ssjg#define RTC_EXTLO 0x17 /* low byte of extended mem size */ 112246149Ssjg#define RTC_EXTHI 0x18 /* low byte of extended mem size */ 113246149Ssjg 114246149Ssjg#define RTC_CENTURY 0x32 /* current century */ 115246149Ssjg#endif /* _I386_ISA_RTC_H_ */ 116246149Ssjg