From patchwork Wed Aug 14 08:08:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 13763024 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 2FB7CC52D7F for ; Wed, 14 Aug 2024 08:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=0gMAYhxiaZninTloMPd6NkvRrni4A8u75AW0oiwdGx0=; b=Rsn0smHarMP3O1 gDxe4W+GEu8G3vY7OfDnKilaV+ZeWEP+Osm36Dv1gzsKHb8pvmebBZH9LvoiKkU51SGYJkEwvXrJG zBs2s8QxS7lOOKkJ1LtpIAi49ESnRqG6b1IT1gzc1jwl/8pN0KWyf4ORBk+OT1FTUoAS86YQMwQ25 XQMEDXZesCvVqwbRsdhpTzL2bA5V+Py/hPsTZra6R+fT1lHSwBDUb/H7aAVlo4nDr95SxVgcq0wzw KjvS6O0qnmw3d02SoOx7kXoia5MBdjEgv1koE3C6RyvCuV/s3LJXxT5Ew3aXlPYfgCxdhbzRf4UaW e6AEmCJZacRO77jZakJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1se94N-00000006B7i-0W8p; Wed, 14 Aug 2024 08:09:23 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1se94J-00000006B6q-3sAb for linux-riscv@lists.infradead.org; Wed, 14 Aug 2024 08:09:21 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6996461920; Wed, 14 Aug 2024 08:09:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8663EC32786; Wed, 14 Aug 2024 08:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1723622959; bh=+tqs6o2jIS/Xoflq9ps38miVMDp8z82qkSyMMzRu+wk=; h=From:To:Cc:Subject:Date:From; b=XL5FPnVS0XG3jZaQ2fxN9roq8cXM1UZgQsp4125Lpwj5Y5tDS5bEvyGFzF9HRtgAv 46UuzBbbcl6yWZnUtB5Bp5JOpnXtZ1bcXFVgulp6aLOc0+9grH0pJ/43jyGJgjqP7C RZohY78Pe3SaTukhlMn/ULK/71mWywZhFFQvR2Ot28qzxSSi3EOxyMxZ0IgANaIajF rtZu2myiysFS/Yn8qtrOCzVJHoyVdindo+OOwZ7YMsj55609AVXBMRKtFXl/vVnk9P w8oxVH1ZY4x12KiZkzkkneveTB4XO0iSVeE7qeWdGd9/up9lOwv0xAmfewwwffIFWm fkrPeqS2v+yyA== From: Conor Dooley To: linux-pci@vger.kernel.org Cc: conor@kernel.org, Conor Dooley , Daire McNamara , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v5 0/2] PCI: microchip: support using either instance 1 or 2 Date: Wed, 14 Aug 2024 09:08:40 +0100 Message-ID: <20240814-setback-rumbling-c6393c8f1a91@spud> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2047; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=oenr9RCh/D6LfU/4KK35V3BOr+N0Qxe0IOLLSKy4LD8=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGl70jg+RjA47pJwV3uk0HOPS0k6de0TVcO1UZ+0/O78q hfMu9rVUcrCIMbBICumyJJ4u69Fav0flx3OPW9h5rAygQxh4OIUgInU7Gf473jEo1uzcPbRvStF WDV9Cgyf2yXp67kq1MslvV3+1nX6YkaG/VrHH8iy/toZ+EleuublDx1WXkE9fW+Hojcav5c4yuz nAAA= X-Developer-Key: i=conor.dooley@microchip.com; a=openpgp; fpr=F9ECA03CF54F12CD01F1655722E2C55B37CF380C X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240814_010920_071820_84E4F130 X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Conor Dooley The current driver and binding for PolarFire SoC's PCI controller assume that the root port instance in use is instance 1. The second reg property constitutes the region encompassing both "control" and "bridge" registers for both instances. In the driver, a fixed offset is applied to find the base addresses for instance 1's "control" and "bridge" registers. The BeagleV Fire uses root port instance 2, so something must be done so that software can differentiate. This series splits the second reg property in two, with dedicated "control" and "bridge" entries so that either instance can be used. Cheers, Conor. v5: - rebase on top of 6.11-rc1, which brought about a lot of driver change due to the plda common driver creation - although little actually changed in terms of the lines edited in this patch. v4: - fix a cocci warning reported off list about an inconsistent variable used between IS_ERR() and PTR_ERR() calls. v3: - rename a variable in probe s/axi/apb/ v2: - try the new reg format before the old one to avoid warnings in the good case - reword $subject for 2/2 CC: Daire McNamara CC: Lorenzo Pieralisi CC: Krzysztof WilczyƄski CC: Rob Herring CC: Bjorn Helgaas CC: Krzysztof Kozlowski CC: Conor Dooley CC: linux-pci@vger.kernel.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: linux-riscv@lists.infradead.org Conor Dooley (2): dt-bindings: PCI: microchip,pcie-host: fix reg properties PCI: microchip: rework reg region handing to support using either instance 1 or 2 .../bindings/pci/microchip,pcie-host.yaml | 11 +- .../pci/plda,xpressrich3-axi-common.yaml | 14 ++- .../bindings/pci/starfive,jh7110-pcie.yaml | 7 ++ .../pci/controller/plda/pcie-microchip-host.c | 116 +++++++++--------- 4 files changed, 87 insertions(+), 61 deletions(-)