#5128 NORM Future : Handle RTC day and month alarm locations

Zarro Boogs per Child bugtracker at laptop.org
Fri Nov 30 15:05:48 EST 2007


#5128: Handle RTC day and month alarm locations
--------------------------------+-------------------------------------------
  Reporter:  wmb at firmworks.com  |       Owner:  JordanCrouse  
      Type:  defect             |      Status:  new           
  Priority:  normal             |   Milestone:  Future Release
 Component:  kernel             |     Version:                
Resolution:                     |    Keywords:                
  Verified:  0                  |  
--------------------------------+-------------------------------------------
Changes (by dwmw2):

 * cc: dwmw2 (added)


Comment:

 Will OF be setting the MSRs? If so all that's required is this simple
 patch, I think:

 {{{
 --- a/arch/i386/kernel/olpc-pm.c
 +++ b/arch/i386/kernel/olpc-pm.c
 @@ -890,6 +890,17 @@ struct platform_device olpc_rtc_device = {

  static int __init olpc_platform_init(void)
  {
 +       uint32_t hi, lo;
 +
 +       rdmsr(RTC_DOMA_OFFSET, lo, hi);
 +       rtc_info.rtc_day_alarm = lo;
 +
 +       rdmsr(RTC_MONA_OFFSET, lo, hi);
 +       rtc_info.rtc_mon_alarm = lo;
 +
 +       rdmsr(RTC_CEN_OFFSET, lo, hi);
 +       rtc_info.rtc_century = lo;
 +
         (void)platform_device_register(&olpc_rtc_device);
         device_init_wakeup(&olpc_rtc_device.dev, 1);

 --- a/include/asm-i386/geode.h
 +++ b/include/asm-i386/geode.h
 @@ -47,6 +47,10 @@ extern int geode_get_dev_base(unsigned int dev);
  #define MFGPT_IRQ_MSR           0x51400028
  #define MFGPT_NR_MSR            0x51400029

 +#define RTC_DOMA_OFFSET                0x51400055
 +#define RTC_MONA_OFFSET                0x51400056
 +#define RTC_CEN_OFFSET         0x51400057
 +
  /* Resource Sizes */

  #define LBAR_GPIO_SIZE          0xFF
 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/5128#comment:4>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list