diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 22:20:36 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 22:20:36 (GMT) |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-ppc/m48t35.h | |
download | linux-fsl-qoriq-1da177e4c3f41524e886b7f1b8a0c1fc7321cac2.tar.xz |
Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-ppc/m48t35.h')
-rw-r--r-- | include/asm-ppc/m48t35.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/include/asm-ppc/m48t35.h b/include/asm-ppc/m48t35.h new file mode 100644 index 0000000..f3c5e5d --- /dev/null +++ b/include/asm-ppc/m48t35.h @@ -0,0 +1,77 @@ +/* + * Registers for the SGS-Thomson M48T35 Timekeeper RAM chip + * and + * Registers for the SGS-Thomson M48T37 Timekeeper RAM chip + * The 37 is the 35 plus alarm and century thus the offsets + * are shifted by the extra registers. + */ + +#ifndef __PPC_M48T35_H +#define __PPC_M48T35_H + +/* RTC offsets */ +#define M48T35_RTC_FLAGS (-8) /* the negative regs are really T37 only */ +#define M48T35_RTC_CENTURY (-7) +#define M48T35_RTC_AL_SEC (-6) +#define M48T35_RTC_AL_MIN (-5) +#define M48T35_RTC_AL_HRS (-4) +#define M48T35_RTC_AL_DOM (-3) +#define M48T35_RTC_INTERRUPT (-2) +#define M48T35_RTC_WATCHDOG (-1) +#define M48T35_RTC_CONTROL 0 /* T35 starts here */ +#define M48T35_RTC_SECONDS 1 +#define M48T35_RTC_MINUTES 2 +#define M48T35_RTC_HOURS 3 +#define M48T35_RTC_DAY 4 +#define M48T35_RTC_DOM 5 +#define M48T35_RTC_MONTH 6 +#define M48T35_RTC_YEAR 7 + +/* this way help us know which bits go with which regs */ +#define M48T35_RTC_FLAGS_BL 0x10 +#define M48T35_RTC_FLAGS_AF 0x40 +#define M48T35_RTC_FLAGS_WDF 0x80 + +#define M48T35_RTC_INTERRUPT_AFE 0x80 +#define M48T35_RTC_INTERRUPT_ABE 0x20 +#define M48T35_RTC_INTERRUPT_ALL (M48T35_RTC_INTERRUPT_AFE|M48T35_RTC_INTERRUPT_ABE) + +#define M48T35_RTC_WATCHDOG_RB 0x03 +#define M48T35_RTC_WATCHDOG_BMB 0x7c +#define M48T35_RTC_WATCHDOG_WDS 0x80 +#define M48T35_RTC_WATCHDOG_ALL (M48T35_RTC_WATCHDOG_RB|M48T35_RTC_WATCHDOG_BMB|M48T35_RTC_W + +#define M48T35_RTC_CONTROL_WRITE 0x80 +#define M48T35_RTC_CONTROL_READ 0x40 +#define M48T35_RTC_CONTROL_CAL_SIGN 0x20 +#define M48T35_RTC_CONTROL_CAL_VALUE 0x1f +#define M48T35_RTC_CONTROL_LOCKED (M48T35_RTC_WRITE|M48T35_RTC_READ) +#define M48T35_RTC_CONTROL_CALIBRATION (M48T35_RTC_CONTROL_CAL_SIGN|M48T35_RTC_CONTROL_CAL_VALUE) + +#define M48T35_RTC_SECONDS_SEC_1 0x0f +#define M48T35_RTC_SECONDS_SEC_10 0x70 +#define M48T35_RTC_SECONDS_ST 0x80 +#define M48T35_RTC_SECONDS_SEC_ALL (M48T35_RTC_SECONDS_SEC_1|M48T35_RTC_SECONDS_SEC_10) + +#define M48T35_RTC_MINUTES_MIN_1 0x0f +#define M48T35_RTC_MINUTES_MIN_10 0x70 +#define M48T35_RTC_MINUTES_MIN_ALL (M48T35_RTC_MINUTES_MIN_1|M48T35_RTC_MINUTES_MIN_10) + +#define M48T35_RTC_HOURS_HRS_1 0x0f +#define M48T35_RTC_HOURS_HRS_10 0x30 +#define M48T35_RTC_HOURS_HRS_ALL (M48T35_RTC_HOURS_HRS_1|M48T35_RTC_HOURS_HRS_10) + +#define M48T35_RTC_DAY_DAY_1 0x03 +#define M48T35_RTC_DAY_FT 0x40 + +#define M48T35_RTC_ALARM_OFF 0x00 +#define M48T35_RTC_WATCHDOG_OFF 0x00 + + +/* legacy */ +#define M48T35_RTC_SET 0x80 +#define M48T35_RTC_STOPPED 0x80 +#define M48T35_RTC_READ 0x40 + + +#endif |