Commit 6ee8241d authored by Tony Lindgren's avatar Tony Lindgren
Browse files

bus: ti-sysc: Fix handling of forced idle



For some devices we can get the following warning on boot:

ti-sysc 48485200.target-module: sysc_disable_module: invalid midlemode

Fix this by treating SYSC_IDLE_FORCE like we do for the other bits
for idlemodes mask.

Fixes: d59b6056 ("bus: ti-sysc: Add generic enable/disable functions")
Cc: Roger Quadros <rogerq@ti.com>
Reviewed-by: default avatarSuman Anna <s-anna@ti.com>
Tested-by: default avatarKeerthy <j-keerthy@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent afd58b16
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -949,7 +949,7 @@ static int sysc_best_idle_mode(u32 idlemodes, u32 *best_mode)
		*best_mode = SYSC_IDLE_SMART_WKUP;
		*best_mode = SYSC_IDLE_SMART_WKUP;
	else if (idlemodes & BIT(SYSC_IDLE_SMART))
	else if (idlemodes & BIT(SYSC_IDLE_SMART))
		*best_mode = SYSC_IDLE_SMART;
		*best_mode = SYSC_IDLE_SMART;
	else if (idlemodes & SYSC_IDLE_FORCE)
	else if (idlemodes & BIT(SYSC_IDLE_FORCE))
		*best_mode = SYSC_IDLE_FORCE;
		*best_mode = SYSC_IDLE_FORCE;
	else
	else
		return -EINVAL;
		return -EINVAL;