Hi,
as you know I'm currently working on submitting mt9p031 driver to
mainline, testing it with my Beagleboard xM.
While I was trying to clean Guennadi's patches I ran into the attached
patch which changes a call to "omap3isp_get(isp);" into
"isp_enable_clocks(isp);".

I don't think this is clean since it would unbalance the number of
omap3isp_get() vs omap3isp_put() and we probably don't want that.
What seems clear is if we don't apply this patch the clock is not
actually enabled.

According to my debugging results "isp_disable_clocks()" is never
called, so, after the first call to "isp_enable_clocks()" there
shouldn't be any need to enable the clocks again.

Guennadi, do you know what is the cause of the problem?


-- 
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
diff --git a/drivers/media/video/omap3isp/isp.c b/drivers/media/video/omap3isp/isp.c
index 472a693..6a6ea86 100644
--- a/drivers/media/video/omap3isp/isp.c
+++ b/drivers/media/video/omap3isp/isp.c
@@ -177,6 +177,8 @@ static void isp_disable_interrupts(struct isp_device *isp)
        isp_reg_writel(isp, 0, OMAP3_ISP_IOMEM_MAIN, ISP_IRQ0ENABLE);
 }
 
+static int isp_enable_clocks(struct isp_device *isp);
+
 /**
  * isp_set_xclk - Configures the specified cam_xclk to the desired frequency.
  * @isp: OMAP3 ISP device
@@ -239,7 +241,7 @@ static u32 isp_set_xclk(struct isp_device *isp, u32 xclk, u8 xclksel)
 
        /* Do we go from stable whatever to clock? */
        if (divisor >= 2 && isp->xclk_divisor[xclksel - 1] < 2)
-               omap3isp_get(isp);
+               isp_enable_clocks(isp);
        /* Stopping the clock. */
        else if (divisor < 2 && isp->xclk_divisor[xclksel - 1] >= 2)
                omap3isp_put(isp);

Reply via email to