• Jeffrey Lee's avatar
    Fix time warp caused by TWL6030 RTC being set running before a valid time has been programmed · 80bb48f0
    Jeffrey Lee authored
    Detail:
      s/RTC - Remove TWL6030 RTC startup code from RTC_Init, to ensure that RTC_Read is able to report that the time is invalid if the RTC isn't running. This avoids the RTC module getting confused and thinking the century needs incrementing (RTC will report a year of xx00, CMOS will hold 2015, RTC module assumes year can only go forward -> therefore must be 2100)
      Also perform a dummy read of RTC_STATUS_REG before reading actual value, as the manual warns that this is required.
    Admin:
      Tested on Pandaboard
      With CMOS available:
      - *Time defaults to year 1970 on power up (CMOS year ignored due to RTC read error)
      - After setting time and rebooting, time is retained and 4 digit year is reconstructed correctly
      Without CMOS available:
      - *Time defaults to year 1970 on power up (default CMOS year ignored due to RTC read error)
      - After setting time and rebooting, time is retained and 4 digit year is reconstructed correctly (RTC year xx15 deemed higher than CMOS default year 2000)
    
    
    Version 0.45. Tagged as 'OMAP4-0_45'
    80bb48f0
RTC 16.8 KB