home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / include / asm-mips / mach-dec / mc146818rtc.h next >
Encoding:
C/C++ Source or Header  |  2006-08-11  |  1.1 KB  |  42 lines

  1. /*
  2.  * RTC definitions for DECstation style attached Dallas DS1287 chip.
  3.  *
  4.  * Copyright (C) 1998, 2001 by Ralf Baechle
  5.  * Copyright (C) 1998 by Harald Koerfgen
  6.  * Copyright (C) 2002, 2005  Maciej W. Rozycki
  7.  *
  8.  * This program is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU General Public License
  10.  * as published by the Free Software Foundation; either version
  11.  * 2 of the License, or (at your option) any later version.
  12.  */
  13. #ifndef __ASM_MIPS_DEC_RTC_DEC_H
  14. #define __ASM_MIPS_DEC_RTC_DEC_H
  15.  
  16. #include <linux/types.h>
  17. #include <asm/addrspace.h>
  18. #include <asm/dec/system.h>
  19.  
  20. extern volatile u8 *dec_rtc_base;
  21.  
  22. #define RTC_PORT(x)    CPHYSADDR((long)dec_rtc_base)
  23. #define RTC_IO_EXTENT    dec_kn_slot_size
  24. #define RTC_IOMAPPED    0
  25. #undef RTC_IRQ
  26.  
  27. #define RTC_DEC_YEAR    0x3f    /* Where we store the real year on DECs.  */
  28.  
  29. static inline unsigned char CMOS_READ(unsigned long addr)
  30. {
  31.     return dec_rtc_base[addr * 4];
  32. }
  33.  
  34. static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
  35. {
  36.     dec_rtc_base[addr * 4] = data;
  37. }
  38.  
  39. #define RTC_ALWAYS_BCD    0
  40.  
  41. #endif /* __ASM_MIPS_DEC_RTC_DEC_H */
  42.