From patchwork Wed Jun 12 10:57:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Conor Dooley X-Patchwork-Id: 13694816 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 ADA94C27C53 for ; Wed, 12 Jun 2024 10:58:25 +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=tX/ubNVIC8VC8l5NAtQBzFeaUMRMG8pkTL364JCEkU8=; b=3pYIYeu5pzFU9G zfIcOiTf411PCl79ryrOFKijBJn+l76rxTMkMge1HaPtRydxTr2EFgWzVs3waTjMGUpR2Y0YRCWp5 xvUkblxn+03xHMTkdWFN/ovrtNK6+XzlW8sSiXN74J3cmK8lGmPdBBy0w92xOzeiTj7lIEQbGGlZR UIx/EpKpt5OEcxZ7GSYoBaDvUzIHt5nWr90YGIIozx10jgE6or0a7psxuFtTKhiVqyIrLKrecmHU2 DcLe614fYt05PSWPKDDCGna99FXxeODiMdvBPwO3cZDFJZEJLAW56mxeCW4+3g13ITiZxrIHdGsMT 2xDfsFR0gU0OZt42s3iQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHLgK-0000000CMTF-2UuO; Wed, 12 Jun 2024 10:58:20 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sHLgH-0000000CMSc-1fF2 for linux-riscv@lists.infradead.org; Wed, 12 Jun 2024 10:58:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id A546BCE0CEF; Wed, 12 Jun 2024 10:58:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57448C3277B; Wed, 12 Jun 2024 10:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718189895; bh=47DU7S/KIbzHjqDBoxXBhMyQV6hLuFO+cJiT7+VrD4I=; h=From:To:Cc:Subject:Date:From; b=khTMS+5MJFTFb8yXw4fHZGUMGkTy8jxGN/TYfeg32VavACwiQNP9s2rXch8BHSweR WpHYVXLktmu7p0efcsOa4riHw1M+RVmhP3Me3ta8rbWC6AJU/lwiOM+hi0+4GiNUNZ P0K9IHurqQauRbCFrRwd9pV3E6ueaCUZtyLTMeuDYEGExD5miK96AbcZtdkr98VZ7P UvpL72If+ABOYLaHr68LHClktRQdPDvq3EJ9uN2da6OpFIL051Wh1YWu6VEdqITra7 3+x3xedBNEbIRhBfReG4/aw/lEGQu4x9K9hRmoqPtUeX3ht1rr0ilGgB94N8zDO47N djVEKrl4Kl75g== 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 v2 0/2] PCI: microchip: support using either instance 1 or 2 Date: Wed, 12 Jun 2024 11:57:54 +0100 Message-ID: <20240612-outfield-gummy-388a36d95100@spud> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1555; i=conor.dooley@microchip.com; h=from:subject:message-id; bh=zil4c1af9kgKB/4JC67HHkNcqLGWhATVWxa9QRrypgU=; b=owGbwMvMwCFWscWwfUFT0iXG02pJDGmZ9cY/Z7BPfVS3ag4/59Wal/d9DX7mfPdpzvrvbnDi4 qLiUyJKHaUsDGIcDLJiiiyJt/tapNb/cdnh3PMWZg4rE8gQBi5OAZjIKweG3+zbtq39aFjD7sk7 8V+ZYEja/xMFWuU1Ng8MPi9arCWxkY/hn07HFjfLrHKvyMMr/eSOWAeumNNT8eP6pzWpWxi/12x x4AUA 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-20240612_035817_646965_F9337F5F X-CRM114-Status: UNSURE ( 7.71 ) 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. v2: - try the new reg format before the old one to avoid warnings in the new 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(-) Acked-by: Daire McNamara