Message ID | 1337987696-31728-6-git-send-email-festevam@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1SY3jO-0004VQ-4J for patchwork@linuxtv.org; Sat, 26 May 2012 01:15:38 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp for <patchwork@linuxtv.org> id 1SY3jN-00056U-BB; Sat, 26 May 2012 01:15:37 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759125Ab2EYXPZ (ORCPT <rfc822;patchwork@linuxtv.org>); Fri, 25 May 2012 19:15:25 -0400 Received: from mail-vc0-f174.google.com ([209.85.220.174]:47450 "EHLO mail-vc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759071Ab2EYXPW (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 25 May 2012 19:15:22 -0400 Received: by mail-vc0-f174.google.com with SMTP id f11so727674vcb.19 for <linux-media@vger.kernel.org>; Fri, 25 May 2012 16:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=A2LpnWQ9uHdDfAHn8OAg3dg51Kzw+Aj47ib6kM32N8k=; b=AoeUrjlCLXdjLQzMXREnqfglkEkEk9K1HA2Atp1sny5YwYjh5ROhXk51eBjTqEEsDG GOVx1wIeicIHAdOsmRuIDJUwGoLcEvt8jpkfoGVV5DdH5C4u30AX6uuGtF8k4FyBb6oX uyu+DMpNp6vqe2JCA2OCDZs0A+45Yr/QswH0KyNHlmWmOAZn1sA3vnXlD+tDeuMlH847 kt1NcicO7BOx4Ue6ZeTKLuoXO4NJfKhWLkFOsZwqi25NdcukleCb1ALK9sKfUZpo02cO MjQnLp1NN5igiJ7Cvabru3YgOuuO5CL+kxJDVOT4v2ySvrEb7CxPUct6RBwFlGKE+I7Y d4MA== Received: by 10.52.36.116 with SMTP id p20mr516445vdj.129.1337987721529; Fri, 25 May 2012 16:15:21 -0700 (PDT) Received: from localhost.localdomain ([201.82.161.72]) by mx.google.com with ESMTPS id s10sm2787583vdg.10.2012.05.25.16.15.19 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 May 2012 16:15:20 -0700 (PDT) From: Fabio Estevam <festevam@gmail.com> To: kernel@pengutronix.de Cc: shawn.guo@freescale.com, Fabio Estevam <fabio.estevam@freescale.com>, Guennadi Liakhovetski <g.liakhovetski@gmx.de>, <linux-media@vger.kernel.org> Subject: [PATCH 06/15] video: mx1_camera: Use clk_prepare_enable/clk_disable_unprepare Date: Fri, 25 May 2012 20:14:47 -0300 Message-Id: <1337987696-31728-6-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1337987696-31728-1-git-send-email-festevam@gmail.com> References: <1337987696-31728-1-git-send-email-festevam@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.5.25.230631 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1200_1299 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Fabio Estevam
May 25, 2012, 11:14 p.m. UTC
From: Fabio Estevam <fabio.estevam@freescale.com> Prepare the clock before enabling it. Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: <linux-media@vger.kernel.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> --- drivers/media/video/mx1_camera.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
Comments
On Fri, May 25, 2012 at 08:14:47PM -0300, Fabio Estevam wrote: > From: Fabio Estevam <fabio.estevam@freescale.com> > > Prepare the clock before enabling it. > > Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > Cc: <linux-media@vger.kernel.org> > Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> > --- > drivers/media/video/mx1_camera.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c > index 4296a83..dc58084 100644 > --- a/drivers/media/video/mx1_camera.c > +++ b/drivers/media/video/mx1_camera.c > @@ -402,7 +402,7 @@ static void mx1_camera_activate(struct mx1_camera_dev *pcdev) > > dev_dbg(pcdev->icd->parent, "Activate device\n"); > > - clk_enable(pcdev->clk); > + clk_prepare_enable(pcdev->clk); > > /* enable CSI before doing anything else */ > __raw_writel(csicr1, pcdev->base + CSICR1); > @@ -421,7 +421,7 @@ static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev) > /* Disable all CSI interface */ > __raw_writel(0x00, pcdev->base + CSICR1); > > - clk_disable(pcdev->clk); > + clk_disable_unprepare(pcdev->clk); > } > > /* > -- > 1.7.1 > >
Guennadi, On Tue, May 29, 2012 at 6:20 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > On Fri, May 25, 2012 at 08:14:47PM -0300, Fabio Estevam wrote: >> From: Fabio Estevam <fabio.estevam@freescale.com> >> >> Prepare the clock before enabling it. >> >> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> >> Cc: <linux-media@vger.kernel.org> >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> > > Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Can patches 6, 7 and 8 be applied? -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, 6 Jun 2012, Fabio Estevam wrote: > Guennadi, > > On Tue, May 29, 2012 at 6:20 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote: > > On Fri, May 25, 2012 at 08:14:47PM -0300, Fabio Estevam wrote: > >> From: Fabio Estevam <fabio.estevam@freescale.com> > >> > >> Prepare the clock before enabling it. > >> > >> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> > >> Cc: <linux-media@vger.kernel.org> > >> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> > > > > Acked-by: Sascha Hauer <s.hauer@pengutronix.de> > > Can patches 6, 7 and 8 be applied? Yes, I'll pick up #6 and 7. #8 is not for me - mx2_emmaprp is not an soc-camera driver, I'm not maintaining it. I understand, these patches are not really bug-fixes (is clk_prepare() a NOP on mx*?) and can wait until 3.6? Or should they be considered correctness fixes and go into 3.5? Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Guennadi, On Wed, Jun 6, 2012 at 1:04 PM, Guennadi Liakhovetski <g.liakhovetski@gmx.de> wrote: > Yes, I'll pick up #6 and 7. #8 is not for me - mx2_emmaprp is not an > soc-camera driver, I'm not maintaining it. I understand, these patches are > not really bug-fixes (is clk_prepare() a NOP on mx*?) and can wait until > 3.6? Or should they be considered correctness fixes and go into 3.5? On i.MX we have transitioned to the common clock framework and my understanding is that we need the clk_prepare_enable/clk_disable_unprepare changes now. I experienced some kernel oops in some drivers that were not converted, so this patch series aim to address the clock conversion for the remaining imx drivers. I think this is 3.5 material. Sascha, would you agree? Thanks, Fabio Estevam -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/video/mx1_camera.c b/drivers/media/video/mx1_camera.c index 4296a83..dc58084 100644 --- a/drivers/media/video/mx1_camera.c +++ b/drivers/media/video/mx1_camera.c @@ -402,7 +402,7 @@ static void mx1_camera_activate(struct mx1_camera_dev *pcdev) dev_dbg(pcdev->icd->parent, "Activate device\n"); - clk_enable(pcdev->clk); + clk_prepare_enable(pcdev->clk); /* enable CSI before doing anything else */ __raw_writel(csicr1, pcdev->base + CSICR1); @@ -421,7 +421,7 @@ static void mx1_camera_deactivate(struct mx1_camera_dev *pcdev) /* Disable all CSI interface */ __raw_writel(0x00, pcdev->base + CSICR1); - clk_disable(pcdev->clk); + clk_disable_unprepare(pcdev->clk); } /*