Hi,
checking some patches thru www.kernel.org
I noticed in
/arch/arm/mach-omap2/cm.c
in function
int omap2_cm_wait_module_ready(s16 prcm_mod, u8 idlest_id, u8 idlest_shift)
...
while (((cm_read_mod_reg(prcm_mod, cm_idlest_reg) & mask) != ena) &&
(i++ < MAX_MODULE_READY_TIME))
udelay(1);
return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
...
assume MAX_MODULE_READY_TIME==1, if first read&check not good,
we enter inside loop and delay.
If second read&check is good, we exit loop, i==1.
We return -EBUSY Wrong!!
If second read&check is not good, we check i and exit loop, i==2. We return
-EBUSY OK!!
Simple correction could be something like
- return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
+ return (i > MAX_MODULE_READY_TIME) ? -EBUSY : 0;
Signed-off-by: "Juha Leppanen" <[email protected]>
No reply needed to me,
my spam filter will probably eat your reply.
Reported-by: "Juha Leppanen" <[email protected]>
tag would be nice in kernel.org :)
Not so many kernel hackers give credit these days :(
Happy hacking,
Mr. Juha Leppanen
Kuopio, Finland
....................................................................
Luukku Plus -paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html