Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64056167 authored by Kevin Hilman's avatar Kevin Hilman Committed by Paul Walmsley
Browse files

OMAP24xx: CM: fix mask used for checking IDLEST status



On OMAP24xx, the polarity for the IDLEST bits is opposite of OMAP3.
The mask used to check this was using the bit position instead of the
bit mask.

This patch fixes the problem by using the bit mask instead of the bit
field.

Signed-off-by: default avatarKevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent fb2fc920
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -50,15 +50,15 @@ int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)


	cm_idlest_reg = cm_idlest_offs[idlest_id - 1];
	cm_idlest_reg = cm_idlest_offs[idlest_id - 1];


	mask = 1 << idlest_shift;

	if (cpu_is_omap24xx())
	if (cpu_is_omap24xx())
		ena = idlest_shift;
		ena = mask;
	else if (cpu_is_omap34xx())
	else if (cpu_is_omap34xx())
		ena = 0;
		ena = 0;
	else
	else
		BUG();
		BUG();


	mask = 1 << idlest_shift;

	/* XXX should be OMAP2 CM */
	/* XXX should be OMAP2 CM */
	omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena),
	omap_test_timeout(((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) == ena),
			  MAX_MODULE_READY_TIME, i);
			  MAX_MODULE_READY_TIME, i);