mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
ssb: extif: add check for max value before setting watchdog register
Prevent the watchdog register on the extif core to be set to a too high value. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
7ffbffe37d
commit
7280b51a29
2 changed files with 4 additions and 2 deletions
|
|
@ -112,9 +112,10 @@ void ssb_extif_get_clockcontrol(struct ssb_extif *extif,
|
|||
*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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue