Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp509624pxb; Wed, 3 Nov 2021 07:51:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlBZH7966LghZqvBjVtEendRYYSbkyHFgQqkerYUmhcD7cG2CF8rI42ivojNYgoiqouzCW X-Received: by 2002:a5d:8884:: with SMTP id d4mr31497184ioo.137.1635951070413; Wed, 03 Nov 2021 07:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635951070; cv=none; d=google.com; s=arc-20160816; b=fPDGTthRieJQYH1zkhEh5TmfC0wQ4FhWcRz4nkHFc2ozkOK2drYWa4yeoEU7ZiUuC4 wIFLeYOViCI0jNkOniH1dDIrIJHuV8i0yU8Yr14VIsixH4qm58YWqapw2kv90+hS4vSf fJimWqDI1j/bHhIL9NhoZe8Tj+7NzUqh5bC4NSDqHL4SdZ/E1KKBYXvkpzDsNS63Gp6x zROnphfJhguy/1urYMZ3Zxb5IyP1s0FgPAfqYg/jziNoPTlVhcLPpbqBRRVhUf94IsmY uskUq5wJ/hT+2rmbbqkbW1EXSaurEIbpPkiNEVyubNxveu8hmqzF3aC0SlV7hB0OMt0j ayDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date; bh=6+p9nWnnnpwXFRY21bSChOjWXXyRBDdf7oM0LGYm/8k=; b=O7x8RgM3F75V/qL1G40W+6w4F78OoxJ5SJFyI/lpiCPxUIeiiMEyVYNy5Wydng5fII MGO6AjHeb8FYFsk1YYhD8gneyBAV52gq7/PHBtCiPlggc8qkIKC7/gbQdktAU5UlHofA ono0uuM9aGiABxzCcS911if1sE6hmAh8KOaB88SspdMMKTCrCkR7av4i5lQZL+Co85t1 M66dfF/Q/4sOhcUtSC6CbBsoiBfSdYjihD+sY7odEdEXvpRrlWjml5Nw1ZlNeknOoZkG Uib4qGiGvFYSeT4cD8bWdK6p7ALLnXjaW7ApfbfaUwUYSWpdzs+/N7AEEvtulWTC1ldb RXLg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z1si4693933ioq.24.2021.11.03.07.50.57; Wed, 03 Nov 2021 07:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231251AbhKCOvq (ORCPT + 99 others); Wed, 3 Nov 2021 10:51:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbhKCOvp (ORCPT ); Wed, 3 Nov 2021 10:51:45 -0400 Received: from angie.orcam.me.uk (angie.orcam.me.uk [IPv6:2001:4190:8020::34]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 309CAC061714; Wed, 3 Nov 2021 07:49:09 -0700 (PDT) Received: by angie.orcam.me.uk (Postfix, from userid 500) id 1824992009D; Wed, 3 Nov 2021 15:49:07 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 1526892009B; Wed, 3 Nov 2021 14:49:07 +0000 (GMT) Date: Wed, 3 Nov 2021 14:49:07 +0000 (GMT) From: "Maciej W. Rozycki" To: =?UTF-8?Q?Pali_Roh=C3=A1r?= cc: Thomas Bogendoerfer , Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Jason Gunthorpe , =?UTF-8?Q?Marek_Beh=C3=BAn?= , linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: Marvell: Update PCIe fixup In-Reply-To: <20211102144929.c5wt5pbl42ocrxly@pali> Message-ID: References: <20211101150405.14618-1-pali@kernel.org> <20211102084241.GA6134@alpha.franken.de> <20211102090246.unmbruykfdjabfga@pali> <20211102094700.GA7376@alpha.franken.de> <20211102100034.rhcb3k2jvr6alm6y@pali> <20211102125843.sqsusis4krnmhorq@pali> <20211102144929.c5wt5pbl42ocrxly@pali> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Nov 2021, Pali Rohár wrote: > Hello Maciej! Thank you very much for the explanation! You are welcome! > I'm surprised that Marvell copied this 20 years old MIPS Galileo PCI > logic into followup ARM SoC PCIe IPs (and later also into recent ARM64 > A3720 SoC PCIe IP), removed configuration of PCI class code via > strapping pins and let default PCI class code value to Memory device, > even also when PCIe controller is running in Root Complex mode. And so > correction can be done only from "CPU bus". Still the bootstrap firmware (say U-boot, as I can see it mentioned in your reference) can write the correct value to the class code register. Or can it? I guess you can try it and report your findings back. You can poke at PCI/e registers directly from U-boot (`pci write.w', etc.) as with any reasonable firmware monitor, no need to write code; I guess you probably know that already. I have no such hardware and I have no incentive to chase documentation for it even if public copies are available for the affected devices. Also you say it's IP rather than actual discrete chips as it used to be with the Galileo system controllers, so it could be up to the customer to get the IP wired/configured correctly. > Maciej, if I had known that you have this kind of information I would > have written you year ago :-) Well, I have all kinds of information. Maciej