From patchwork Wed Jul 3 20:08:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 13722746 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 0E583C30653 for ; Wed, 3 Jul 2024 20:09:13 +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=EhtjJsbyPUgm7+j/5mcUhFk0WRtQXWKTe8ZBfAettUU=; b=fzZjZpjuGMPdEg 1wMrTOruA9DwU5DzhJwr0wqpX0OF5o4nzL/CeEY/jOfBW3UxkXesMVysyqRRmIz39iXGEk5R0Jtnk 3zVKnM+5NKfmg/hs89NFkMBU8ZPwbDzAVjQldxwQu/YLT+4BA1tHCvxTSOrEJcajGNBKwXg8zZYhY Foicni4p3FU4R7V1lZztQ2dajsssm7T02Swn0QNB8AcNFuEH58CfgI52tZK5DNtvb3MWnS2r0rMDT Zzy12InNM+uZM4PL5tpSdPYY/YQBRgzz8X67jFx+nqAaVswOBA3F3lFBppRULc/Nt4AZTxAILor+3 bdGtBfMGz1HJLZQgDjCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sP6Hs-0000000BLVY-49JQ; Wed, 03 Jul 2024 20:09:08 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sP6Hp-0000000BLUT-4BoK for linux-riscv@lists.infradead.org; Wed, 03 Jul 2024 20:09:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 51EFACE2FCE; Wed, 3 Jul 2024 20:09:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 094EEC2BD10; Wed, 3 Jul 2024 20:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1720037342; bh=aYbHslMbo5658qwdT3gkCNxpaGZS1ogTj90k1s36n8M=; h=From:To:Cc:Subject:Date:From; b=uanslunZzMpUHeaPZtIAM39fLDSvTd1CwE9fVzu8B5nqpbjKgU/SQ6b4DISEy0yZb HVsZ6IZqzBzpihZE6wCzy66hurceQj89cdo2PwEnzzIi6e81l3wD3jBOTbTEWWbtFW x73RPVSKxoZAQ5zuJ/RYb2hXnPQ/Zawg73DdTJ/IGrkJKk6BfkCQ7ZtnhA2sDgWXHK b2uF/7ZT9VU1EjQBv6zVkvTjoHuHLkHO1fmjZMmEjgU3FeUokuJzkbhFc+o3W/Ma1M phQOwB5xuCdI8w1NdngTACZWbgrimvWNgToTe2IDDWybFRRGgDJnPPPGi59YvZD+wz MbJDpsWIJZ4HA== 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 v4 0/2] PCI: microchip: support using either instance 1 or 2 Date: Wed, 3 Jul 2024 21:08:44 +0100 Message-ID: <20240703-stand-ferocity-bac033ac70b1@spud> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1728; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=nUAy4lu9tNjB0mh9nOJJDmgdT1HtV+a+iNjY3WPTG04=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGmt66/+UGL/e0tL6N9S2cu/zXy/nQg/95Eh/U36NvX85 NjPT06zd5SyMIhxMMiKKbIk3u5rkVr/x2WHc89bmDmsTCBDGLg4BWAiMxcwMjxI2bTLN+DissjL GY3fwsR/2cj7hPZJz53Udn/2xj8v9aYzMjxtEBFIXfByd+4iR5XPHKxrrVOmLDO0yZq97CH3Aa+ HfzkB 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-20240703_130906_235846_B9C0CEA2 X-CRM114-Status: UNSURE ( 8.26 ) 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. 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 | 10 +- drivers/pci/controller/pcie-microchip-host.c | 155 +++++++++--------- 2 files changed, 79 insertions(+), 86 deletions(-)