1. 24 3月, 2012 17 次提交
  2. 06 3月, 2012 1 次提交
  3. 14 2月, 2012 1 次提交
  4. 27 1月, 2012 3 次提交
    • R
      rtc: Disable the alarm in the hardware (v2) · 41c7f742
      Rabin Vincent 提交于
      Currently, the RTC code does not disable the alarm in the hardware.
      
      This means that after a sequence such as the one below (the files are in the
      RTC sysfs), the box will boot up after 2 minutes even though we've
      asked for the alarm to be turned off.
      
      	# echo $((`cat since_epoch`)+120) > wakealarm
      	# echo 0 > wakealarm
      	# poweroff
      
      Fix this by disabling the alarm when there are no timers to run.
      
      The original version of this patch was reverted. This version
      disables the irq directly instead of setting a disabled timer
      in the future.
      
      Cc: stable@kernel.org
      Cc: John Stultz <john.stultz@linaro.org>
      Signed-off-by: NRabin Vincent <rabin.vincent@stericsson.com>
      [Merged in the second revision from Rabin]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      41c7f742
    • N
      rtc: Expire alarms after the time is set. (v2) · 5f9679d2
      NeilBrown 提交于
      If the alarm time programming in the rtc is ever in the past, it won't fire,
      and any other alarm will be queued after it so they won't fire either.
      
      So any time that the alarm might be in the past, we need to trigger
      the irq handler to ensure the old alarm is cleared and the timer queue
      is fully in the future.
      
      This is done whenever the RTC clock is set.
      
      This is the second revision of this patch, which was earlier reverted.
      This version avoids the initialization problem, which is handled by
      a different patch.
      Tested-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      [Remove problematic initialization change, update commit log, also
      catch set_mmss case -jstultz]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      5f9679d2
    • J
      rtc: Avoid setting alarm to a time in the past · bd729d72
      John Stultz 提交于
      In some cases at boot up, the RTC alarm may be set in the past,
      but still have the enabled flag on. This was causing problems,
      because we would then enqueue the alarm into the timerqueue,
      but it would never fire. This would clog up the timerqueue
      and keep other alarms from working.
      
      The fix is to check the alarm against the current rtc time at
      boot and avoid enqueueing the alarm if it is in the past.
      Reported-by: NNeilBrown <neilb@suse.de>
      Tested-by: NNeilBrown <neilb@suse.de>
      Tested-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      bd729d72
  5. 20 1月, 2012 2 次提交
    • R
      Revert "RTC: sa1100: remove redundant code of setting alarm" · 57270fcd
      Russell King 提交于
      This reverts commit 42874759.
      
      This wasn't tested as a stand-alone patch, and it has build errors
      without the following patches applied:
      
      drivers/rtc/rtc-sa1100.c: In function 'sa1100_rtc_set_alarm':
      drivers/rtc/rtc-sa1100.c:208: error: 'now' undeclared (first use in this function)
      drivers/rtc/rtc-sa1100.c:208: error: (Each undeclared identifier is reported only once
      drivers/rtc/rtc-sa1100.c:208: error: for each function it appears in.)
      drivers/rtc/rtc-sa1100.c:210: error: incompatible type for argument 3 of 'rtc_next_alarm_time'
      drivers/rtc/rtc-sa1100.c:211: error: 'time' undeclared (first use in this function)
      
      So it too gets reverted to bring us back to a working point.
      57270fcd
    • R
      Revert "RTC: sa1100: support sa1100, pxa and mmp soc families" · a0164a57
      Russell King 提交于
      This reverts commit 7cea0065.
      
      The sa1100 cleanups fatally broke the SA1100 RTC driver - the first
      hint that something is wrong are these compiler warnings:
      
      drivers/rtc/rtc-sa1100.c:42:1: warning: "RCNR" redefined
      In file included from arch/arm/mach-sa1100/include/mach/hardware.h:73,
                       from drivers/rtc/rtc-sa1100.c:35:
      arch/arm/mach-sa1100/include/mach/SA-1100.h:877:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:43:1: warning: "RTAR" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:876:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:44:1: warning: "RTSR" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:879:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:45:1: warning: "RTTR" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:878:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:47:1: warning: "RTSR_HZE" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:891:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:48:1: warning: "RTSR_ALE" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:890:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:49:1: warning: "RTSR_HZ" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:889:1: warning: this is the location of the previous definition
      drivers/rtc/rtc-sa1100.c:50:1: warning: "RTSR_AL" redefined
      arch/arm/mach-sa1100/include/mach/SA-1100.h:888:1: warning: this is the location of the previous definition
      
      and the second problem, which is far more severe, are the different
      register layouts, resulting in the wrong registers being read on
      SA11x0 platforms.  This patch adds:
      
      	#define RCNR           0x00    /* RTC Count Register */
      	#define RTAR           0x04    /* RTC Alarm Register */
      	#define RTSR           0x08    /* RTC Status Register */
      	#define RTTR           0x0c    /* RTC Timer Trim Register */
      
      but the SA11x0 registers are:
      
      	#define RTAR            __REG(0x90010000)  /* RTC Alarm Reg. */
      	#define RCNR            __REG(0x90010004)  /* RTC CouNt Reg. */
      	#define RTTR            __REG(0x90010008)  /* RTC Trim Reg. */
      	#define RTSR            __REG(0x90010010)  /* RTC Status Reg. */
      a0164a57
  6. 11 1月, 2012 15 次提交
  7. 10 1月, 2012 1 次提交
    • G
      rtc-puv3: solve section mismatch in rtc-puv3.c · b3a0aa3a
      Guan Xuetao 提交于
      The patch renames puv3_rtcdrv to puv3_rtc_driver, so that modpost will know
      that this is simply a list of pointers to driver functions, in which case
      the section mismatch is OK. (Thanks Michal Marek)
      
      Cc: Axel Lin <axel.lin@gmail.com>
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: rtc-linux@googlegroups.com
      Signed-off-by: NGuan Xuetao <gxt@mprc.pku.edu.cn>
      
      --
      Section mismatch warning information:
      
      WARNING: drivers/rtc/built-in.o(.data+0x90): Section mismatch in
      reference from the variable puv3_rtcdrv to the
      function .devinit.text:puv3_rtc_probe()
      The variable puv3_rtcdrv references
      the function __devinit puv3_rtc_probe()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the
      variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
      *_console
      
      WARNING: drivers/rtc/built-in.o(.data+0x94): Section mismatch in
      reference from the variable puv3_rtcdrv to the
      function .devexit.text:puv3_rtc_remove()
      The variable puv3_rtcdrv references
      the function __devexit puv3_rtc_remove()
      If the reference is valid then annotate the
      variable with __exit* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
      *_console
      
      WARNING: drivers/built-in.o(.data+0x6c04): Section mismatch in reference
      from the variable puv3_rtcdrv to the
      function .devinit.text:puv3_rtc_probe()
      The variable puv3_rtcdrv references
      the function __devinit puv3_rtc_probe()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the
      variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
      *_console
      
      WARNING: drivers/built-in.o(.data+0x6c08): Section mismatch in reference
      from the variable puv3_rtcdrv to the
      function .devexit.text:puv3_rtc_remove()
      The variable puv3_rtcdrv references
      the function __devexit puv3_rtc_remove()
      If the reference is valid then annotate the
      variable with __exit* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
      *_console
      
      WARNING: vmlinux.o(.data+0x1126c): Section mismatch in reference from
      the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe()
      The variable puv3_rtcdrv references
      the function __devinit puv3_rtc_probe()
      If the reference is valid then annotate the
      variable with __init* or __refdata (see linux/init.h) or name the
      variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
      *_console
      
      WARNING: vmlinux.o(.data+0x11270): Section mismatch in reference from
      the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove()
      The variable puv3_rtcdrv references
      the function __devexit puv3_rtc_remove()
      If the reference is valid then annotate the
      variable with __exit* (see linux/init.h) or name the variable:
      *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
      *_console
      b3a0aa3a