Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nios2-v4.2' of git://git.rocketboards.org/linux-socfpga-next

Pull nios2 update from Ley Foon Tan:
"Check number of timer instances"

* tag 'nios2-v4.2' of git://git.rocketboards.org/linux-socfpga-next:
nios2: check number of timer instances

+13 -2
+13 -2
arch/nios2/kernel/time.c
··· 19 19 #include <linux/io.h> 20 20 #include <linux/slab.h> 21 21 22 - #define ALTERA_TIMER_STATUS_REG 0 22 + #define ALTR_TIMER_COMPATIBLE "altr,timer-1.0" 23 + 24 + #define ALTERA_TIMER_STATUS_REG 0 23 25 #define ALTERA_TIMER_CONTROL_REG 4 24 26 #define ALTERA_TIMER_PERIODL_REG 8 25 27 #define ALTERA_TIMER_PERIODH_REG 12 ··· 306 304 307 305 void __init time_init(void) 308 306 { 307 + struct device_node *np; 308 + int count = 0; 309 + 310 + for_each_compatible_node(np, NULL, ALTR_TIMER_COMPATIBLE) 311 + count++; 312 + 313 + if (count < 2) 314 + panic("%d timer is found, it needs 2 timers in system\n", count); 315 + 309 316 clocksource_of_init(); 310 317 } 311 318 312 - CLOCKSOURCE_OF_DECLARE(nios2_timer, "altr,timer-1.0", nios2_time_init); 319 + CLOCKSOURCE_OF_DECLARE(nios2_timer, ALTR_TIMER_COMPATIBLE, nios2_time_init);