Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp553208imn; Thu, 28 Jul 2022 08:42:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsrL2HwMAGosiaqi1hJD1cuWPBaBtf8aUEDt88P5AbrEMAvnStikdTy78sL7LKxa4MzSzl X-Received: by 2002:a05:6402:3685:b0:43b:dfd3:9487 with SMTP id ej5-20020a056402368500b0043bdfd39487mr26607437edb.32.1659022955229; Thu, 28 Jul 2022 08:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659022955; cv=none; d=google.com; s=arc-20160816; b=qDeI9E40uTEUhxbvyYK7YKyy8tUcURykY2t/4CydGWqOlh68obdUB5HOMzJmThFrLP aiWd3Sqvjz4sYqNkxXRX93EbEWbOjcJX85FsayMCWbTFtMAbyyyxKywZk/7e27hbTtCL ip8jnhX9EhdiKtSdxLcNesDLrQxlDu58fL808bUQpuiU4FnTLkC6jGJNEXu6kV/a+cbl W5J6EtG5fhuizDcu9P6ZRDwTKlzbZgzvF+ZTW8uIlusGeSbNlt7KoyKkIInyJe7ryPOw XkabRcTyCsJkuFAYl2zs+MrkeF/thGnLYMDTHuLoRdHRAa/RXSn/9DQM7LP3NRvEumb1 quPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=KlcvlY/vj+HLglEukDhRz4+fN6a3Zo6lveesKTuOVfA=; b=o8fg7D2fvqezpvTjwOIHX9NQ44fllTjI6OUu0gzmAkagmeLR4BHbQKtYsYRhgmavfb Cw8vNoirP3RBuk19uHJ81Rt86JV5aA/iDpwSufohWYXmpiGE7VsY/lgoRn/X2yO1zwYG WV0imoD7QbbTi1/xCie5gIy4Dm28sMXoLKoxUmKHV7uw6XlE7EjIndCFwJQicuJ6NDuK 6m4ath6bnfZ5u87JkNSw/iBk/P9519QGraiu0OkyVjYTfJXjP8wfiq4RwZmUtYzZdBNu DL+qOTBqILFW/+BHjPit+RFhOXJf3EOZMUttiH/8J+oYQ3tRfgzBTNovreG5cL3mmbrr drxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h+8lY04M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a170906840c00b0072ab9f5ae72si805237ejx.553.2022.07.28.08.42.10; Thu, 28 Jul 2022 08:42:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h+8lY04M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbiG1PYZ (ORCPT + 99 others); Thu, 28 Jul 2022 11:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229693AbiG1PYX (ORCPT ); Thu, 28 Jul 2022 11:24:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA2F061B0C; Thu, 28 Jul 2022 08:24:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7E700B82491; Thu, 28 Jul 2022 15:24:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03A88C433D7; Thu, 28 Jul 2022 15:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659021860; bh=EsA74sOB2n98wUsKoE7FhRXKRQmfuntkL/X594nUluc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=h+8lY04M+5g4HrnAtPnqR0ikmpbndvTE452QXSiiAODQQkQi+BucTIoVF+8tUYqFu vcuetjjmfSYXsc0QyGESgRqvpakmEYuWJ2kJN5KrZAQ4cywkMZzkim6DBEpkwUN0Se nNQWJAmssAKtjVPTdfTJ4NzLhKR8W0Eqa+jYLp9Z2kRkR3iCK1sT3E6XP2/+HAehHG xjRre/UwlV66FlM0bQhWN1ZkVlExpOKVrtcmUfN3G4o7n4L3yCthIo77DFX4Age58t RcBYJio2Mx3aM/Eno0tw7czz/ATWeFF/sS/cvLGjvg3OhpX/IgfkDduOf1PCOVy7xM cNOl+yvmFukJQ== Date: Thu, 28 Jul 2022 10:24:18 -0500 From: Bjorn Helgaas To: Serge Semin Cc: Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rahul Tanwar , Thierry Reding , Jonathan Hunter , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Frank Li , Manivannan Sadhasivam , Rob Herring , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH RESEND v4 03/15] PCI: dwc: Convert to using native IP-core versions representation Message-ID: <20220728152418.GA302516@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220624143947.8991-4-Sergey.Semin@baikalelectronics.ru> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 24, 2022 at 05:39:35PM +0300, Serge Semin wrote: > Since DWC PCIe v4.70a the controller version can be read from the > PORT_LOGIC.PCIE_VERSION_OFF register. Version is represented in the FourCC > format [1]. It's standard versioning approach for the Synopsys DWC > IP-cores. Moreover some of the DWC kernel drivers already make use of it > to fixup version-dependent functionality (See DWC USB3, Stmicro STMMAC or > recent DW SPI driver). These references to other drivers might be useful, but without a function name or file name, I can't easily find them. > In order to preserve the standard version > representation and prevent the data conversion back and forth, we suggest > to preserve the native version representation in the DWC PCIe driver too > in the same way as it has already been done in the rest of the DWC > drivers. IP-core version reading from the CSR will be introduced in the > next commit together with a simple macro-based API to use it. > > [1] https://en.wikipedia.org/wiki/FourCC