From patchwork Wed Feb 15 10:23:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 9573763 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4ECC1601D8 for ; Wed, 15 Feb 2017 10:23:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3FCC827A98 for ; Wed, 15 Feb 2017 10:23:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 345242846B; Wed, 15 Feb 2017 10:23:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C520A27A98 for ; Wed, 15 Feb 2017 10:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbdBOKXF (ORCPT ); Wed, 15 Feb 2017 05:23:05 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:57328 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbdBOKXE (ORCPT ); Wed, 15 Feb 2017 05:23:04 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id B3BDE81922; Wed, 15 Feb 2017 11:23:01 +0100 (CET) Date: Wed, 15 Feb 2017 11:23:01 +0100 From: Pavel Machek To: Laurent Pinchart Cc: Sakari Ailus , mchehab@kernel.org, kernel list , ivo.g.dimitrov.75@gmail.com, sre@kernel.org, pali.rohar@gmail.com, linux-media@vger.kernel.org Subject: Re: [PATCH] omap3isp: add support for CSI1 bus Message-ID: <20170215102301.GA29330@amd> References: <20161228183036.GA13139@amd> <20170208083813.GG13854@valkosipuli.retiisi.org.uk> <20170208125738.GA23236@amd> <10545906.Gxg3yScdu4@avalon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <10545906.Gxg3yScdu4@avalon> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi! > > + if (enable) { > > + csirxfe = OMAP343X_CONTROL_CSIRXFE_PWRDNZ | > > + OMAP343X_CONTROL_CSIRXFE_RESET; > > + > > + if (buscfg->phy_layer) > > + csirxfe |= OMAP343X_CONTROL_CSIRXFE_SELFORM; > > + > > + if (buscfg->strobe_clk_pol) > > + csirxfe |= OMAP343X_CONTROL_CSIRXFE_CSIB_INV; > > + } else > > + csirxfe = 0; > > You need curly braces for the else statement too. > > > + > > + regmap_write(isp->syscon, isp->syscon_offset, csirxfe); > > Isn't this already configured by csiphy_routing_cfg_3430(), called through > omap3isp_csiphy_acquire() ? You'll need to add support for the strobe/clock > polarity there, but the rest should already be handled. It seems csiphy_routing_cfg_3430 is not called at all. I added printks, but they don't trigger. If you have an idea what is going on there, it would help... Pavel diff --git a/drivers/media/platform/omap3isp/ispcsiphy.c b/drivers/media/platform/omap3isp/ispcsiphy.c index 6b814e1..fe9303a 100644 --- a/drivers/media/platform/omap3isp/ispcsiphy.c +++ b/drivers/media/platform/omap3isp/ispcsiphy.c @@ -30,6 +30,8 @@ static void csiphy_routing_cfg_3630(struct isp_csiphy *phy, u32 reg; u32 shift, mode; + printk("routing cfg 3630: iface %d, %d\n", iface, ISP_INTERFACE_CCP2B_PHY1); + regmap_read(phy->isp->syscon, phy->isp->syscon_offset, ®); switch (iface) { @@ -74,6 +76,9 @@ static void csiphy_routing_cfg_3430(struct isp_csiphy *phy, u32 iface, bool on, u32 csirxfe = OMAP343X_CONTROL_CSIRXFE_PWRDNZ | OMAP343X_CONTROL_CSIRXFE_RESET; + /* FIXME: can this be used instead of if (isp->revision) in ispccp2.c? */ + + printk("routing cfg: iface %d, %d\n", iface, ISP_INTERFACE_CCP2B_PHY1); /* Only the CCP2B on PHY1 is configurable. */ if (iface != ISP_INTERFACE_CCP2B_PHY1) return; @@ -105,6 +110,7 @@ static void csiphy_routing_cfg(struct isp_csiphy *phy, enum isp_interface_type iface, bool on, bool ccp2_strobe) { + printk("csiphy_routing_cfg\n"); if (phy->isp->phy_type == ISP_PHY_TYPE_3630 && on) return csiphy_routing_cfg_3630(phy, iface, ccp2_strobe); if (phy->isp->phy_type == ISP_PHY_TYPE_3430)