aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-10 00:25:23 -0400
committerIngo Molnar <mingo@kernel.org>2013-10-10 00:25:23 -0400
commit8a749de5e32d2b72def93f7bd7a2745580d75872 (patch)
treee46d9059d0328bcb2faea1c084d17f749338cfe4 /drivers
parenta44eb870f815356dac56adf3a380ee9b94787424 (diff)
parentb4042ceaabbd913bc5b397ddd1e396eeb312d72f (diff)
Merge branch 'fortglx/3.13/time' of git://git.linaro.org/people/jstultz/linux into timers/core
Pull more timekeeping items for v3.13 from John Stultz: * Small cleanup in the clocksource code. * Fix for rtc-pl031 to let it work with alarmtimers. * Move arm64 to using the generic sched_clock framework & resulting cleanup in the generic sched_clock code. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clocksource/arm_arch_timer.c10
-rw-r--r--drivers/rtc/rtc-pl031.c3
2 files changed, 11 insertions, 2 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index b94b0d44c158..f655036b524f 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -20,6 +20,7 @@
20#include <linux/of_address.h> 20#include <linux/of_address.h>
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/sched_clock.h>
23 24
24#include <asm/arch_timer.h> 25#include <asm/arch_timer.h>
25#include <asm/virt.h> 26#include <asm/virt.h>
@@ -514,6 +515,15 @@ static int __init arch_timer_register(void)
514 goto out; 515 goto out;
515 } 516 }
516 517
518 clocksource_register_hz(&clocksource_counter, arch_timer_rate);
519 cyclecounter.mult = clocksource_counter.mult;
520 cyclecounter.shift = clocksource_counter.shift;
521 timecounter_init(&timecounter, &cyclecounter,
522 arch_counter_get_cntvct());
523
524 /* 56 bits minimum, so we assume worst case rollover */
525 sched_clock_register(arch_timer_read_counter, 56, arch_timer_rate);
526
517 if (arch_timer_use_virtual) { 527 if (arch_timer_use_virtual) {
518 ppi = arch_timer_ppi[VIRT_PPI]; 528 ppi = arch_timer_ppi[VIRT_PPI];
519 err = request_percpu_irq(ppi, arch_timer_handler_virt, 529 err = request_percpu_irq(ppi, arch_timer_handler_virt,
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 0f0609b1aa2c..e3b25712b659 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -371,6 +371,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
371 } 371 }
372 } 372 }
373 373
374 device_init_wakeup(&adev->dev, 1);
374 ldata->rtc = rtc_device_register("pl031", &adev->dev, ops, 375 ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
375 THIS_MODULE); 376 THIS_MODULE);
376 if (IS_ERR(ldata->rtc)) { 377 if (IS_ERR(ldata->rtc)) {
@@ -384,8 +385,6 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
384 goto out_no_irq; 385 goto out_no_irq;
385 } 386 }
386 387
387 device_init_wakeup(&adev->dev, 1);
388
389 return 0; 388 return 0;
390 389
391out_no_irq: 390out_no_irq: