From patchwork Thu Aug 8 07:11:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 13757044 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 E671BC52D73 for ; Thu, 8 Aug 2024 07:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/IzmZXaq6Zk77+veQvHZ6jM6c509VDBLoarFwqEQ1ao=; b=G6Fl1w4K6Rhh2ScG/zl/YbK4ga urZO8D5Z8JYAaixLAy8YLxExcoz1bzRHrm0FuRH5TuPbYAyqSJH2JIJ0lkNBaq8Ya6m13yl1E1omm H0n3eJwhDEcpMb5NbTKFZS+tI/ZkV2BeSaHO/kvWACZDrVNhQPkX95fQ/wWR86Nk7HdFeF2fkVrOg nwkSmicTTbSLlaquKzw3vkoA5f86xgTB+Fojeu53ETNV4s1IpwiDpAr9XpgcMzzJkqzZDHYrWyQ3y 1Qx9/2nJUxyTJn1oAIsvIVOlb+UxMh8sfA0X3RAFelMlGUhZYkSDIcY7Jhxh+8/Jr1rsTvqXX6iAl oNmkhn7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbxZV-00000007PYE-1mXW; Thu, 08 Aug 2024 07:28:29 +0000 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbxJb-00000007KDt-3aS3 for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2024 07:12:05 +0000 Received: by mail.gandi.net (Postfix) with ESMTPA id C75C6C000A; Thu, 8 Aug 2024 07:12:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1723101122; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/IzmZXaq6Zk77+veQvHZ6jM6c509VDBLoarFwqEQ1ao=; b=hvepbCkQ7oSGTEO6ZfBdodE0nTf1EG9o6FhSpQ51QNEexBTTr8ecNc5g4LeZW7iAeJ4yWO qqkvmgYp/ZKhOM62AoFx206ThnIh4QGGJQv3tY4BPIVroO9jsD3mSSk2uVr4t83XNoYCtS muCHNFWKkDKfBsus/Yk/ZDvfSQM+jfcoK/mpcVFE5A2Y+TCklXdtepGsjFnkUaPDeDA8JX MTI+vM+GaYhOlhSzJqqtTV4/UkoTsaWLVj3Q2i2dUwXKi0rOJJZMiSy51IhtxULcKi3LQj DKmG9e/LwaAmqvrAbVTdIsltx48oGdeD+duhYMk4ca9HAxGfMwax72B2hVgaSQ== From: Herve Codina To: Herve Codina , Christophe Leroy , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Qiang Zhao , Li Yang , Mark Brown Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni Subject: [PATCH v2 31/36] soc: fsl: cpm1: qmc: Introduce qmc_version Date: Thu, 8 Aug 2024 09:11:24 +0200 Message-ID: <20240808071132.149251-32-herve.codina@bootlin.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240808071132.149251-1-herve.codina@bootlin.com> References: <20240808071132.149251-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: herve.codina@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240808_001204_051448_500A9C35 X-CRM114-Status: GOOD ( 10.67 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Current code handles the CPM1 version of QMC. In order to prepare the support for the QUICC Engine (QE) version of QMC, introduce qmc_version to identify versions. This will enable the code to make the distinction between several QMC implementations. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/soc/fsl/qe/qmc.c b/drivers/soc/fsl/qe/qmc.c index 062477b7426e..8ff7eaaa4c50 100644 --- a/drivers/soc/fsl/qe/qmc.c +++ b/drivers/soc/fsl/qe/qmc.c @@ -215,7 +215,12 @@ struct qmc_chan { bool is_rx_stopped; }; +enum qmc_version { + QMC_CPM1, +}; + struct qmc_data { + enum qmc_version version; u32 tstate; /* Initial TSTATE value */ u32 rstate; /* Initial RSTATE value */ u32 zistate; /* Initial ZISTATE value */ @@ -1811,6 +1816,7 @@ static void qmc_remove(struct platform_device *pdev) } static const struct qmc_data qmc_data_cpm1 = { + .version = QMC_CPM1, .tstate = 0x30000000, .rstate = 0x31000000, .zistate = 0x00000100,