From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CD0E4C54EBD for ; Fri, 13 Jan 2023 10:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AA1QYPDaeCrB3YC0BJe+BqAV103/DSamXv+4cLsokEE=; b=SKKjE2HvncbwJ6 x7zYDsgVvmV5qk1HA7N63YBYMnpCMiU0I/qr7qqpNbdzn5tXt3N4Lqga1q9clQUca9wGmxq//bst2 nH9c5b3PTDDo5ZUv+jGcflMQXUzvBdTPBsSDEO3hadSpgWdviweaLL1qzyRGo603uuh9xLeOIsWJA cFiLig8DrlqfdNDHUeRC6Igz7BdEOAe4v7Um897Da0M1A3pdVWL1LHtNKJhgjaqpDsIsN2KGJ1C/T VmSTIy/F/VjOYzuaKXX7+ILh6ST1GsA1MMWiMO/OYHN7pflq4QAocA/G7d6upv1jcfG3YnE1jgPqM hBmBWitGEospcbk8/P0w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGHY7-001qge-HI; Fri, 13 Jan 2023 10:44:39 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGHY2-001qeR-7y for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 10:44:35 +0000 Received: from pendragon.ideasonboard.com (85-131-99-81.bb.dnainternet.fi [85.131.99.81]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7505A4D4; Fri, 13 Jan 2023 11:44:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1673606672; bh=jQe8bELRpakqILNHk4rOJgvTETgI/bwME5HNZmZ2sRI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FQ0nH4d3KOV3Lf96/S86FUl+4Qt0lB2ZLE6+f/s+EnM4fRP065G/gLJlUtIdlsZqj BK0fWbWd2oXBloA2w0rObnhJ/ml7b/IpI6lIb7tOzbxsQymsAezw+OqQWOwlmYpZca MMtAs+vyr5jBYedcQPweKRiZ7xMNf25+NZJoO1qc= Date: Fri, 13 Jan 2023 12:44:31 +0200 From: Laurent Pinchart To: Michael Tretter Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, Philipp Zabel , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Fabio Estevam , Alexander Stein , kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 02/16] media: imx-pxp: detect PXP version Message-ID: References: <20230112-imx-pxp-v2-0-e2281da1db55@pengutronix.de> <20230112-imx-pxp-v2-2-e2281da1db55@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230112-imx-pxp-v2-2-e2281da1db55@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_024434_460677_5C69F95D X-CRM114-Status: GOOD ( 19.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Michael, Thank you for the patch. On Fri, Jan 13, 2023 at 10:54:08AM +0100, Michael Tretter wrote: > Different versions of the Pixel Pipeline have different blocks and their > routing may be different. Read the PXP_HW_VERSION register to determine > the version of the PXP and print it to the log for debugging purposes. > > Signed-off-by: Michael Tretter > --- > Changelog: > > v2: > > - reduce debug level for version to dev_dbg > - drop hw_version field from struct pxp_dev > --- > drivers/media/platform/nxp/imx-pxp.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/media/platform/nxp/imx-pxp.c b/drivers/media/platform/nxp/imx-pxp.c > index 689ae5e6ac62..5b671c6e5cae 100644 > --- a/drivers/media/platform/nxp/imx-pxp.c > +++ b/drivers/media/platform/nxp/imx-pxp.c > @@ -10,6 +10,7 @@ > * Pawel Osciak, > * Marek Szyprowski, > */ > +#include > #include > #include > #include > @@ -52,6 +53,11 @@ MODULE_PARM_DESC(debug, "activates debug info"); > #define MEM2MEM_HFLIP (1 << 0) > #define MEM2MEM_VFLIP (1 << 1) > > +#define PXP_VERSION_MAJOR(version) \ > + FIELD_GET(BM_PXP_VERSION_MAJOR, version) > +#define PXP_VERSION_MINOR(version) \ > + FIELD_GET(BM_PXP_VERSION_MINOR, version) > + > #define dprintk(dev, fmt, arg...) \ > v4l2_dbg(1, debug, &dev->v4l2_dev, "%s: " fmt, __func__, ## arg) > > @@ -1665,6 +1671,7 @@ static int pxp_probe(struct platform_device *pdev) > struct pxp_dev *dev; > struct video_device *vfd; > int irq; > + u32 hw_version; I'd move this one line up. Up to you, with or without that, Reviewed-by: Laurent Pinchart > int ret; > > dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); > @@ -1705,6 +1712,10 @@ static int pxp_probe(struct platform_device *pdev) > goto err_clk; > } > > + hw_version = readl(dev->mmio + HW_PXP_VERSION); > + dev_dbg(&pdev->dev, "PXP Version %u.%u\n", > + PXP_VERSION_MAJOR(hw_version), PXP_VERSION_MINOR(hw_version)); > + > ret = v4l2_device_register(&pdev->dev, &dev->v4l2_dev); > if (ret) > goto err_clk; > -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel