Message ID | 20200319075023.22151-14-tomi.valkeinen@ti.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Hans Verkuil |
Headers |
Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1jEpvC-002LX2-4T; Thu, 19 Mar 2020 07:48:54 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726934AbgCSHvC (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Thu, 19 Mar 2020 03:51:02 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:52682 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726905AbgCSHvC (ORCPT <rfc822;linux-media@vger.kernel.org>); Thu, 19 Mar 2020 03:51:02 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02J7owdK083733; Thu, 19 Mar 2020 02:50:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1584604258; bh=b6IefihV/5IIyU+kvdug75KLHe4nMyKkG+AmBLiRkQc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ThiNLjZ+KSRqibdBImbmNmW1Dzkp+M6XG2CmLsgrNCq2aKrZLf1Elqamtulv5Kxqr CJfm4knTiy48lHRmB/TOH3+YiWcvTx4Azo99rYNMe7/Wrdolnp0s06tQhDBtgB0do8 YyoDtK6Hxsd1T4BKQreBe8+uDuWCSOoOUoa1+yXg= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02J7owQ8035938 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Mar 2020 02:50:58 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 19 Mar 2020 02:50:58 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 19 Mar 2020 02:50:58 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02J7oXqq047151; Thu, 19 Mar 2020 02:50:56 -0500 From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: <linux-media@vger.kernel.org>, Benoit Parrot <bparrot@ti.com> CC: Mauro Carvalho Chehab <mchehab@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Hans Verkuil <hverkuil@xs4all.nl>, Tomi Valkeinen <tomi.valkeinen@ti.com> Subject: [PATCH v2 13/19] media: ti-vpe: cal: fix dummy read to phy Date: Thu, 19 Mar 2020 09:50:17 +0200 Message-ID: <20200319075023.22151-14-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200319075023.22151-1-tomi.valkeinen@ti.com> References: <20200319075023.22151-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Series |
CAL fixes and improvements
|
|
Commit Message
Tomi Valkeinen
March 19, 2020, 7:50 a.m. UTC
After ComplexIO reset, a dummy read to PHY is needed as per CAL spec to finish the reset. Currently the driver reads a ComplexIO register, not PHY register. Fix this. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- drivers/media/platform/ti-vpe/cal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Comments
Tomi, Thanks for the patch. On 3/19/20 2:50 AM, Tomi Valkeinen wrote: > After ComplexIO reset, a dummy read to PHY is needed as per CAL spec to > finish the reset. Currently the driver reads a ComplexIO register, not > PHY register. Fix this. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Tested-by: Tomi Valkeinen <tomi.valkeinen@ti.com> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Nice catch. Reviewed-by: Benoit Parrot <bparrot@ti.com> > --- > drivers/media/platform/ti-vpe/cal.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c > index ed32b199aabe..e6f766ba3079 100644 > --- a/drivers/media/platform/ti-vpe/cal.c > +++ b/drivers/media/platform/ti-vpe/cal.c > @@ -796,8 +796,8 @@ static void csi2_phy_init(struct cal_ctx *ctx) > ctx->csi2_port, > reg_read(ctx->dev, CAL_CSI2_COMPLEXIO_CFG(ctx->csi2_port))); > > - /* Dummy read to allow SCP to complete */ > - val = reg_read(ctx->dev, CAL_CSI2_COMPLEXIO_CFG(ctx->csi2_port)); > + /* Dummy read to allow SCP reset to complete */ > + reg_read(ctx->cc, CAL_CSI2_PHY_REG0); > > /* 3.A. Program Phy Timing Parameters */ > csi2_phy_config(ctx); >
diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index ed32b199aabe..e6f766ba3079 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -796,8 +796,8 @@ static void csi2_phy_init(struct cal_ctx *ctx) ctx->csi2_port, reg_read(ctx->dev, CAL_CSI2_COMPLEXIO_CFG(ctx->csi2_port))); - /* Dummy read to allow SCP to complete */ - val = reg_read(ctx->dev, CAL_CSI2_COMPLEXIO_CFG(ctx->csi2_port)); + /* Dummy read to allow SCP reset to complete */ + reg_read(ctx->cc, CAL_CSI2_PHY_REG0); /* 3.A. Program Phy Timing Parameters */ csi2_phy_config(ctx);