Subversion Repositories Kolibri OS

Rev

Rev 8327 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #ifndef _PXA255_RTC_H_
  2. #define _PXA255_RTC_H_
  3.  
  4. #include "mem.h"
  5. #include "CPU.h"
  6. #include "pxa255_IC.h"
  7.  
  8.  
  9. /*
  10.         PXA255 OS RTC controller
  11.        
  12.         PURRPOSE: it's nice to know what time it is
  13.  
  14. */
  15.  
  16. #define PXA255_RTC_BASE         0x40900000UL
  17. #define PXA255_RTC_SIZE         0x00001000UL
  18.  
  19.  
  20. typedef struct{
  21.  
  22.         Pxa255ic* ic;
  23.        
  24.         UInt32 RCNR_offset;     //RTC counter offset from our local time
  25.         UInt32 RTAR;            //RTC alarm
  26.         UInt32 RTSR;            //RTC status
  27.         UInt32 RTTR;            //RTC trim - we ignore this alltogether
  28.         UInt32 lastSeenTime;    //for HZ interrupt
  29.        
  30. }Pxa255rtc;
  31.  
  32. Boolean pxa255rtcInit(Pxa255rtc* rtc, ArmMem* physMem, Pxa255ic* ic);
  33. void pxa255rtcUpdate(Pxa255rtc* rtc);
  34.  
  35.  
  36. #endif
  37.  
  38.