Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp590864imn; Thu, 28 Jul 2022 09:47:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR4S/0S2fA+1qhfeJsxt/0XNxJqEtWtyakW4qzR4Zn8Titl5QWBWRRmgBBjS1+mfukCb2JWq X-Received: by 2002:a17:90b:4b0a:b0:1f0:5c2d:fe72 with SMTP id lx10-20020a17090b4b0a00b001f05c2dfe72mr298511pjb.150.1659026877886; Thu, 28 Jul 2022 09:47:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659026877; cv=none; d=google.com; s=arc-20160816; b=lcdUNZlTjGskPuqQ5i7lKkp23Awyu77gcYaeleWg1eDV8WkT6y0nJaT1VKC5tOsBxH lVEcrYbZ4+QQljv/V4CpDv/WpwpdybDqx5PApAoXRVapMPuTnX18tEorzHgyWBR42vk1 8bhvI1oOu1ygjNG1gHe0EQECAJ0sgyIhG4hgj5PrCWqUBghoAZYSWF1am2aRt4A2JiIh uG4w2knxGeS1Jx41zQWJtSIH2n6ZoSRv2XlNDAu7qPV+Ned0cIG4daKkASPeJJQGTT/n 1vyubYd01yRAy6EY1ze6jvPlFLXVG8oAevqd8kLOWpHCOpjQCaKqBRLBtcKQu8uwrgJ6 wU3Q== 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=WVeDPa+mdfvvsDzasYWEcz9oWw+Ke9C6RVj6iu1CLWw=; b=gBmNGicjUsv8Z00ff+khhizM1QyUWPa2FR/baXxf8DHOoZ/1PUbjI2GxCAKHka/Txp /sycvsPAwDmnEeuJkvYkQqhYYDUyh0os7EgEG2pp1QuOFXHz7yQQhL56n3wdClf+hoEw DFWSbyTF9rgpYoQ133l/PuF1HKRZXuA68O58HJdnoheIWYInqHnsqb3z2xh+3vqiV2eV MczWRIgXryYP6geilWUtyD45GV0R0m2c9yJ2MY1vcwl0i6XdlGXpBiFBsKZxUiLqcEbo Nta9M9AZTPBLXOxK6R2Sy+N+dG9bFMlWU5RMyFNpTDo+6MhJndj99e/Rs8T59pRzVt5b Gt0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cqYXCPuH; 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 cp19-20020a056a00349300b00528d3d86589si1098715pfb.176.2022.07.28.09.47.41; Thu, 28 Jul 2022 09:47:57 -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=cqYXCPuH; 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 S229806AbiG1Qef (ORCPT + 99 others); Thu, 28 Jul 2022 12:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbiG1Qed (ORCPT ); Thu, 28 Jul 2022 12:34:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD7F92A408; Thu, 28 Jul 2022 09:34:32 -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 60913B824A4; Thu, 28 Jul 2022 16:34:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDCECC433C1; Thu, 28 Jul 2022 16:34:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659026070; bh=nHxv6d85T9pP+ZMr9V+fyaj2Jn/Rv2IPUgxkxsht70U=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=cqYXCPuHS+WT6FGL4i5sVVQ3hh488bn5WY8VefisqFETD+o830r8o5DuzRgLVW53p lNZeGzhyQ8QOiB1mNtSQFEJJPpx11tMYKlvZ5TmINHyTmE1VrfDVQIeLcRL93LnTJu pRtByKNRTw4unO5i+yUbdipm3koH7i1SaIYGKGeHp8pZ3Q1LkTPvSJZl3i6qk1STPT IIkKTlokqLliUiO+4/zVGlgsVe9V8ANEMNh6aTwI7kaDEYRM8oKhpcGDv5ckqBHqRW cRpmTEGnjAaovH786jk/Zl02k6dDD4RObN6O4rYHoGdZ0dwmfiXGBMEpDWSsLNvACE nVo4A5EIx9yWQ== Date: Thu, 28 Jul 2022 11:34:28 -0500 From: Bjorn Helgaas To: Ben Dooks Cc: Serge Semin , 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: <20220728163428.GA309179@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0d644682-094d-6151-aa2f-86552c8f9a87@codethink.co.uk> 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 Thu, Jul 28, 2022 at 04:31:17PM +0100, Ben Dooks wrote: > On 28/07/2022 16:24, Bjorn Helgaas wrote: > > 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 > > I'm currently looking at a OF based dw-apb-timers-pwm driver, so also > would like to follow this. FWIW, the breadcrumbs I found are: dwc3_core_is_valid() stmmac_hwif_init() dw_spi_hw_init()