public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3 clock: camera module has no target IDLEST bit
@ 2008-09-05 19:34 Paul Walmsley
  2008-09-05 22:37 ` Russell King - ARM Linux
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2008-09-05 19:34 UTC (permalink / raw)
  To: linux-omap; +Cc: saaguirre


We must not attempt to wait for the CAM module to become ready after
clock enable, since it has no target IDLEST bit.

Thanks to Sergio Alberto Aguirre Rodriguez <saaguirre@ti.com> for
reporting this and testing the patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Sergio Alberto Aguirre Rodriguez <saaguirre@ti.com>

---
 arch/arm/mach-omap2/clock.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index be5c616..189b8a6 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -256,6 +256,10 @@ static void omap2_clk_wait_ready(struct clk *clk)
 	/* REVISIT: What are the appropriate exclusions for 34XX? */
 	if (cpu_is_omap34xx()) {
 
+		/* CAM */
+		if (prcm_mod == OMAP34XX_CM_REGADDR(OMAP3430_CAM_MOD, 0))
+			return;
+
 		/* SSI */
 		if (prcm_mod == OMAP34XX_CM_REGADDR(CORE_MOD, 0) &&
 		    (reg & 0x0f) == 0 &&

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAP3 clock: camera module has no target IDLEST bit
  2008-09-05 19:34 [PATCH] OMAP3 clock: camera module has no target IDLEST bit Paul Walmsley
@ 2008-09-05 22:37 ` Russell King - ARM Linux
  2008-09-10 17:25   ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux @ 2008-09-05 22:37 UTC (permalink / raw)
  To: Paul Walmsley; +Cc: linux-omap, saaguirre

On Fri, Sep 05, 2008 at 01:34:03PM -0600, Paul Walmsley wrote:
> We must not attempt to wait for the CAM module to become ready after
> clock enable, since it has no target IDLEST bit.

Grrr.  These things seem to be collecting here, and in need of a
more generic and elegant solution.  (Please always do that rather
than extending an already existing hack.)

In mainline, I see a bunch of exclusions in omap2_clk_wait_ready()
for OMAP24xx and OMAP34xx.

Your struct clk has a 'flags' field.  Currently, bits 13 to 20 are
free.  Enough room to fit into it two extra bits - a "don't wait for
OMAP24xx" and "don't wait for OMAP34xx" bits.

They can then be used thusly:

	if (cpu_is_omap24xx() && clk->flags & CLK_NOWAIT_24XX)
		return;
	if (cpu_is_omap34xx() && clk->flags & CLK_NOWAIT_34XX)
		return;

rather than throwing individual exceptions into clock.c.  Such a
solution is far more elegant, easier to review, and likely to be
far smaller in the long run - both in terms of lines of change and
code size.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] OMAP3 clock: camera module has no target IDLEST bit
  2008-09-05 22:37 ` Russell King - ARM Linux
@ 2008-09-10 17:25   ` Paul Walmsley
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Walmsley @ 2008-09-10 17:25 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-omap, saaguirre

Hello Russell,

On Fri, 5 Sep 2008, Russell King - ARM Linux wrote:

> On Fri, Sep 05, 2008 at 01:34:03PM -0600, Paul Walmsley wrote:
> > We must not attempt to wait for the CAM module to become ready after
> > clock enable, since it has no target IDLEST bit.
> 
> Grrr.  These things seem to be collecting here, and in need of a
> more generic and elegant solution.  (Please always do that rather
> than extending an already existing hack.)

OK, I will send some patches to clean up that function somewhat also.  

- Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-10 17:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-05 19:34 [PATCH] OMAP3 clock: camera module has no target IDLEST bit Paul Walmsley
2008-09-05 22:37 ` Russell King - ARM Linux
2008-09-10 17:25   ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox