mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 22:44:27 -05:00 
			
		
		
		
	This watchdog driver should work with SoC having a PMU. This fixes #11720. SVN-Revision: 34323
		
			
				
	
	
		
			26 lines
		
	
	
		
			739 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			739 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
--- a/drivers/ssb/driver_extif.c
 | 
						|
+++ b/drivers/ssb/driver_extif.c
 | 
						|
@@ -112,9 +112,10 @@ void ssb_extif_get_clockcontrol(struct s
 | 
						|
 	*m = extif_read32(extif, SSB_EXTIF_CLOCK_SB);
 | 
						|
 }
 | 
						|
 
 | 
						|
-void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
 | 
						|
-				  u32 ticks)
 | 
						|
+void ssb_extif_watchdog_timer_set(struct ssb_extif *extif, u32 ticks)
 | 
						|
 {
 | 
						|
+	if (ticks > SSB_EXTIF_WATCHDOG_MAX_TIMER)
 | 
						|
+		ticks = SSB_EXTIF_WATCHDOG_MAX_TIMER;
 | 
						|
 	extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks);
 | 
						|
 }
 | 
						|
 
 | 
						|
--- a/include/linux/ssb/ssb_driver_extif.h
 | 
						|
+++ b/include/linux/ssb/ssb_driver_extif.h
 | 
						|
@@ -152,6 +152,7 @@
 | 
						|
 /* watchdog */
 | 
						|
 #define SSB_EXTIF_WATCHDOG_CLK		48000000	/* Hz */
 | 
						|
 
 | 
						|
+#define SSB_EXTIF_WATCHDOG_MAX_TIMER	((1 << 28) - 1)
 | 
						|
 
 | 
						|
 
 | 
						|
 #ifdef CONFIG_SSB_DRIVER_EXTIF
 |