mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 10:26:10 +01:00 
			
		
		
		
	timer: mpc83xx_timer: fix build with CONFIG_{HW_, }WATCHDOG
The code, which is likely copied from arch/powerpc/lib/interrupts.c, lacks a fallback definition of CONFIG_SYS_WATCHDOG_FREQ and refers to a non-existing timestamp variable - obviously priv->timestamp is meant. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
This commit is contained in:
		
				
					committed by
					
						 Stefan Roese
						Stefan Roese
					
				
			
			
				
	
			
			
			
						parent
						
							7dd2097e21
						
					
				
				
					commit
					2156016294
				
			| @@ -20,6 +20,10 @@ | |||||||
|  |  | ||||||
| DECLARE_GLOBAL_DATA_PTR; | DECLARE_GLOBAL_DATA_PTR; | ||||||
|  |  | ||||||
|  | #ifndef CONFIG_SYS_WATCHDOG_FREQ | ||||||
|  | #define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2) | ||||||
|  | #endif | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * struct mpc83xx_timer_priv - Private data structure for MPC83xx timer driver |  * struct mpc83xx_timer_priv - Private data structure for MPC83xx timer driver | ||||||
|  * @decrementer_count: Value to which the decrementer register should be re-set |  * @decrementer_count: Value to which the decrementer register should be re-set | ||||||
| @@ -171,7 +175,7 @@ void timer_interrupt(struct pt_regs *regs) | |||||||
| 	priv->timestamp++; | 	priv->timestamp++; | ||||||
|  |  | ||||||
| #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) | #if defined(CONFIG_WATCHDOG) || defined(CONFIG_HW_WATCHDOG) | ||||||
| 	if ((timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) | 	if ((priv->timestamp % (CONFIG_SYS_WATCHDOG_FREQ)) == 0) | ||||||
| 		WATCHDOG_RESET(); | 		WATCHDOG_RESET(); | ||||||
| #endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ | #endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */ | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user