1 /*
2 * Registers for the SGS-Thomson M48T35 Timekeeper RAM chip
3 */
4
5 #ifndef __PPC_M48T35_H
6 #define __PPC_M48T35_H
7
8 /* RTC offsets */
9 #define M48T35_RTC_CONTROL 0
10 #define M48T35_RTC_SECONDS 1
11 #define M48T35_RTC_MINUTES 2
12 #define M48T35_RTC_HOURS 3
13 #define M48T35_RTC_DAY 4
14 #define M48T35_RTC_DOM 5
15 #define M48T35_RTC_MONTH 6
16 #define M48T35_RTC_YEAR 7
17
18 #define M48T35_RTC_SET 0x80
19 #define M48T35_RTC_STOPPED 0x80
20 #define M48T35_RTC_READ 0x40
21
22 #ifndef BCD_TO_BIN
23 #define BCD_TO_BIN(x) ((x)=((x)&15) + ((x)>>4)*10)
24 #endif
25
26 #ifndef BIN_TO_BCD
27 #define BIN_TO_BCD(x) ((x)=(((x)/10)<<4) + (x)%10)
28 #endif
29
30 #endif
31
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.