arch_timer.c (27a5569dc66ecce06cb532542ddcd0b6da8783f6) | arch_timer.c (923df96b9f31b7d08d8438ff9677326d9537accf) |
---|---|
1/* 2 * linux/arch/arm/kernel/arch_timer.c 3 * 4 * Copyright (C) 2011 ARM Ltd. 5 * All Rights Reserved 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 123 unchanged lines hidden (view full) --- 132 return 0; 133} 134 135static int __cpuinit arch_timer_setup(struct clock_event_device *clk) 136{ 137 /* Be safe... */ 138 arch_timer_disable(); 139 | 1/* 2 * linux/arch/arm/kernel/arch_timer.c 3 * 4 * Copyright (C) 2011 ARM Ltd. 5 * All Rights Reserved 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 123 unchanged lines hidden (view full) --- 132 return 0; 133} 134 135static int __cpuinit arch_timer_setup(struct clock_event_device *clk) 136{ 137 /* Be safe... */ 138 arch_timer_disable(); 139 |
140 clk->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP; | 140 clk->features = CLOCK_EVT_FEAT_ONESHOT; |
141 clk->name = "arch_sys_timer"; 142 clk->rating = 450; 143 clk->set_mode = arch_timer_set_mode; 144 clk->set_next_event = arch_timer_set_next_event; 145 clk->irq = arch_timer_ppi; 146 147 clockevents_config_and_register(clk, arch_timer_rate, 148 0xf, 0x7fffffff); --- 69 unchanged lines hidden (view full) --- 218 return (u32)(cntvct & (u32)~0); 219} 220 221static cycle_t arch_counter_read(struct clocksource *cs) 222{ 223 return arch_counter_get_cntpct(); 224} 225 | 141 clk->name = "arch_sys_timer"; 142 clk->rating = 450; 143 clk->set_mode = arch_timer_set_mode; 144 clk->set_next_event = arch_timer_set_next_event; 145 clk->irq = arch_timer_ppi; 146 147 clockevents_config_and_register(clk, arch_timer_rate, 148 0xf, 0x7fffffff); --- 69 unchanged lines hidden (view full) --- 218 return (u32)(cntvct & (u32)~0); 219} 220 221static cycle_t arch_counter_read(struct clocksource *cs) 222{ 223 return arch_counter_get_cntpct(); 224} 225 |
226int read_current_timer(unsigned long *timer_val) 227{ 228 if (!arch_timer_rate) 229 return -ENXIO; 230 *timer_val = arch_counter_get_cntpct(); 231 return 0; 232} 233 |
|
226static struct clocksource clocksource_counter = { 227 .name = "arch_sys_counter", 228 .rating = 400, 229 .read = arch_counter_read, 230 .mask = CLOCKSOURCE_MASK(56), 231 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 232}; 233 --- 117 unchanged lines hidden --- | 234static struct clocksource clocksource_counter = { 235 .name = "arch_sys_counter", 236 .rating = 400, 237 .read = arch_counter_read, 238 .mask = CLOCKSOURCE_MASK(56), 239 .flags = CLOCK_SOURCE_IS_CONTINUOUS, 240}; 241 --- 117 unchanged lines hidden --- |