Import 2.3.18pre1
[davej-history.git] / include / asm-ppc / nvram.h
blobea7bf19146f681f54f3c5d55b39ba733e2d7d433
1 /*
2 * PreP compliant NVRAM access
3 */
5 #ifndef _PPC_NVRAM_H
6 #define _PPC_NVRAM_H
8 #define NVRAM_AS0 0x74
9 #define NVRAM_AS1 0x75
10 #define NVRAM_DATA 0x77
13 /* RTC Offsets */
15 #define MOTO_RTC_SECONDS 0x1FF9
16 #define MOTO_RTC_MINUTES 0x1FFA
17 #define MOTO_RTC_HOURS 0x1FFB
18 #define MOTO_RTC_DAY_OF_WEEK 0x1FFC
19 #define MOTO_RTC_DAY_OF_MONTH 0x1FFD
20 #define MOTO_RTC_MONTH 0x1FFE
21 #define MOTO_RTC_YEAR 0x1FFF
22 #define MOTO_RTC_CONTROLA 0x1FF8
23 #define MOTO_RTC_CONTROLB 0x1FF9
25 #ifndef BCD_TO_BIN
26 #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
27 #endif
29 #ifndef BIN_TO_BCD
30 #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
31 #endif
33 #endif