Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp554122imn; Thu, 28 Jul 2022 08:43:55 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uak+UHYD+i5enppDPS7v/hT6XSs7lpq3usEHlTWkmqOTUGr3+IGtBS0TGISfRZtX45C7Hj X-Received: by 2002:a05:6402:350a:b0:43c:4528:4eb5 with SMTP id b10-20020a056402350a00b0043c45284eb5mr14382169edd.372.1659023035009; Thu, 28 Jul 2022 08:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659023035; cv=none; d=google.com; s=arc-20160816; b=IY5DZ4rZC6SyOG2f0yC/ux3+GocmCSqv94eKBe4sw4plm55wpIiUbp7m4hhn7bXt97 pJLP87PpX7iecsTH3nk4psScku7fP+81XuCdQuKcWdomkk13ATi9CeRl+9VlC52mDLvG sVjwn6RcFHCehHf7IR/xbPCJ3L1G1xZJeSu+rU3DlGzMR8HbkJYaT9IPi+XjBd46+SEG AOF7cq50xMulyRS2NFrc7K8m/5A/skRBYRZn6kA1hhBnaIalwtQpNFBO58Q3dcboSpao wcSHes57RTfNNrZGml1FI4jnmcZIg0lH1Ufc5OI4wCFBLXxZuqtmeOlkyvc5X/sJObbh INSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id; bh=fAXcA2f964RNGxvTSzCHqUkcZBz+88sVvfVFFPJLkJ4=; b=OvRvxFQf8kHCQA1pHtEtxTtZ3MBhzm4umdRuGjaSQOWfBZvgwbDTULt4rbbVpnbHXF cY3fGxE4CF3xYMBz2YqDUILbRTsrettO5MKB557VvCMN1LdTGrTVP7Lo9cZ+Ul3prZVd CMsyhSGLBpe+YeV6ay/KEDY1szJrLkQdVgg5SyH6lJC0iEYD1Jdg+YhG792rN/LbnJ2X NRrRuaLapmMaUcvCOeJPq4YhYepuLiuBHfIBMVqiqXhO5f5MHWoB0LjrK6hGV/kLlsPF JPCzSY3rO5v9hKYBswL4oUAoJ1MVspa5Cs3I08x16FOqUuGfjlUA2SG2UOsv8VYFPk4M kKJA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id vf4-20020a170907238400b00726d03899basi727309ejb.344.2022.07.28.08.43.29; Thu, 28 Jul 2022 08:43:54 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229506AbiG1Pbo (ORCPT + 99 others); Thu, 28 Jul 2022 11:31:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbiG1Pbm (ORCPT ); Thu, 28 Jul 2022 11:31:42 -0400 Received: from imap4.hz.codethink.co.uk (imap4.hz.codethink.co.uk [188.40.203.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 892FD61DA9; Thu, 28 Jul 2022 08:31:41 -0700 (PDT) Received: from cpc152649-stkp13-2-0-cust121.10-2.cable.virginm.net ([86.15.83.122] helo=[192.168.0.17]) by imap4.hz.codethink.co.uk with esmtpsa (Exim 4.94.2 #2 (Debian)) id 1oH5Tr-006dKi-BO; Thu, 28 Jul 2022 16:31:19 +0100 Message-ID: <0d644682-094d-6151-aa2f-86552c8f9a87@codethink.co.uk> Date: Thu, 28 Jul 2022 16:31:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH RESEND v4 03/15] PCI: dwc: Convert to using native IP-core versions representation Content-Language: en-GB To: Bjorn Helgaas , Serge Semin Cc: Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Jingoo Han , Gustavo Pimentel , Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_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 References: <20220728152418.GA302516@bhelgaas> From: Ben Dooks Organization: Codethink Limited. In-Reply-To: <20220728152418.GA302516@bhelgaas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,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 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. -- Ben Dooks http://www.codethink.co.uk/ Senior Engineer Codethink - Providing Genius https://www.codethink.co.uk/privacy.html