From patchwork Wed Jul 10 22:16:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 13729768 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 BFD8FC3DA41 for ; Wed, 10 Jul 2024 22:17:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Message-Id:Date :Subject:Cc:To:From:Reply-To:MIME-Version:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=1uq7UI88LIBEvKi97Ch2Iy0y9mer6dMfbRNgp/mWIQ0=; b=q+gyiyPC2WYCpehXT6ebR73x0F c/sxj+npM4X31V1g+c0xMcSuShGMa8OV70PEqHhVv3vHP2shJnx/97HUI7cwygRjjKrEAaK6byvzs 9mgqZh1f142k/5iWwhv5WuwA9XgD3wm3M/ToHYkjYP/mPFxXv1QpuGBQ+oiBE3KqjuVcmKeCbL+oi PEPAMd04RRYtdUAHmcIa6wVu2pRdzo3Rk4SBS7At7hQaT50cnFFsrflVYZMT8mJbmvGkfEL7PXvci w6dJ6JfeHOLtPrIhP/sxB7B85WTKKYX1CdeT/2wmjziffLKcMy0RbpoeO9N6uost07jvDzDO62lXr KNbKDxFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRfcR-0000000Bu5q-2pAP; Wed, 10 Jul 2024 22:16:59 +0000 Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sRfc4-0000000Btp2-0kCn for linux-arm-kernel@lists.infradead.org; Wed, 10 Jul 2024 22:16:37 +0000 Received: by mail-yb1-xb2b.google.com with SMTP id 3f1490d57ef6-e03609bd52dso231155276.1 for ; Wed, 10 Jul 2024 15:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1720649794; x=1721254594; darn=lists.infradead.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1uq7UI88LIBEvKi97Ch2Iy0y9mer6dMfbRNgp/mWIQ0=; b=WhmqhH/zwshQgrXQuEem4WQ4hPxz56RpCKGZKD52xnHfufOwCo/TxhtD/qOq3mOBSY DuoCmbD6J1MUy8BSjS0fPnIGeT0+XH9uDThohhiUJuXX0scR6fUzui2CJxN9FjvQZXo/ O+zrJJl2KNk3xSVRuYkhFmWolyORMWcrO3mEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720649794; x=1721254594; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1uq7UI88LIBEvKi97Ch2Iy0y9mer6dMfbRNgp/mWIQ0=; b=cdJf0AIUDAlov0s6OZ2Ga5Cq+QgQ68R4bo7ME0hdEfp5/zdZN5kxyip/OfRep8CqGM AWDIxIG/i9NwFfRqTLSJfJsRhPwdeNgyq6o/U3qE+rWGXMmyfL4Slf1vyMgFydBriVWZ yY2PoUGvx5yLKeT2lqeCgv48rvmiqM95IykDeULlqwQsYxz3YsTIpSz6RURcT3ZQ+b2S fXoWaLfrM/qBaHrDyveTDqfGOoNDAJ5M6klUhbrvqwITMT5+KtY1pjoCT4VYviErrQw7 hhoQpDGGhL8JMEr1KHgMDlVsZm3aPlbjwwjPEYEjIx1rccuSWrNV8s59j89EK4Fmchna w7qA== X-Forwarded-Encrypted: i=1; AJvYcCV9iTw4XK/hyXBlDvWmwwkspqmjZR6cAq4utPgPT5ZzZGIeaq+u77Cfc4Ggw9vZV5RMX2NZS+FIyDptZD00qU87uGOWAH1GGjaLdx1BaL8Ytw2vu7Q= X-Gm-Message-State: AOJu0Yxt8g9FKg5Nw3WSQNfuRfxMFk+jSEeUdpI+FtUwOBnut1B3rC4v rbKC7FPOCeEpEAtOLL9P4fGlgACRBhtvFEELnzSODL5RPDdsc3oqg24AmtQlng== X-Google-Smtp-Source: AGHT+IEZ0Kw7OoDkj9qJz1eHra/w87iwb5T32TAAanEbJDbIi9axHZXM5XH0ux05OFlmC9C+nCkkiQ== X-Received: by 2002:a05:6902:1883:b0:e05:7a31:8c70 with SMTP id 3f1490d57ef6-e057a31911bmr798310276.20.1720649793735; Wed, 10 Jul 2024 15:16:33 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b61ba04c16sm20182326d6.60.2024.07.10.15.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 15:16:33 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , Cyril Brulebois , Stanimir Varbanov , Krzysztof Kozlowski , bcm-kernel-feedback-list@broadcom.com, jim2101024@gmail.com, james.quinlan@broadcom.com Cc: devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), Florian Fainelli , linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list), linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), Rob Herring Subject: [PATCH v3 00/12] PCI: brcnstb: Enable STB 7712 SOC Date: Wed, 10 Jul 2024 18:16:14 -0400 Message-Id: <20240710221630.29561-1-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240710_151636_356445_1AE99672 X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org V3 Changes: o Commit "Enable 7712 SOCs" -- Move "model" check from outside to inside func (Stan) o Commit "Check return value of all reset_control_xxx calls" -- Propagate errors up the chain instead of ignoring them (Stan) o Commit "Refactor for chips with many regular inbound BARs" -- Nine suggestions given, nine implemented (Stan) o Commit "Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific" -- Drop tab, add parens around macro params in expression (Stan) o Commit "Use swinit reset if available" -- Treat swinit the same as other reset controllers (Stan) Stan suggested to use dev_err_probe() for getting resources but I will defer that to future series (if that's okay). o Commit "Get resource before we start asserting resets" -- Squash this with previous commit (Stan) o Commit "Use "clk_out" error path label" -- Move clk_prepare_enable() after getting resouurces (Stan) -- Change subject to "Use more common error handling code in brcm_pcie_probe()" (Markus) -- Use imperative commit description (Markus) -- "Fixes:" tag added for missing error return. (Markus) o Commit "dt-bindings: PCI ..." -- Split off maintainer change in separate commit. -- Tried to accomodate Krzysztof's requests, I'm not sure I have succeeded. Krzysztof, please see [1] below. [1] Wrt the YAML of brcmstb PCIe resets, here is what I am trying to describe: CHIP NUM_RESETS NAMES ==== ========== ===== 4908 1 perst 7216 1 rescal 7712 3 rescal, bridge, swinit Others 0 - V2 Changes (note: four new commits): o Commit "dt-bindings: PCI ..." -- s/Adds/Add/, fix spelling error (Bjorn) -- Order compatible strings alphabetically (Krzysztof) -- Give definitions first then rules (Krzysztof) -- Add reason for change in maintainer (Krzysztof) o Commit "Use swinit reset if available" -- no need for "else" clause (Philipp) -- fix improper use of dev_err_probe() (Philipp) o Commit "Use "clk_out" error path label" -- Improve commit message (Bjorn) o Commit "PCI: brcmstb: Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific" -- Improve commit subject line (Bjorn) o Commit (NEW) -- Change field name from 'type' to 'model' -- Added as requested (Stanimir) o Commit (NEW) -- Check return value of all reset_control_xxx calls -- Added as requested (Stanimir) o Commit (NEW) "Get resource before we start asserting reset controllers" -- Added as requested (Stanimir) o Commit (NEW) -- "Remove two unused constants from driver" V1: This submission is for the Broadcom STB 7712, sibling SOC of the RPi5 chip. Stanimir has already submitted a patch "Add PCIe support for bcm2712" for the RPi version of the SOC. It is hoped that Stanimir will allow us to submit this series first and subsequently rebase his patch(es). The largest commit, "Refactor for chips with many regular inbound BARs" affects both the STB and RPi SOCs. It allows for multiple inbound ranges where previously only one was effectively used. This feature will also be present in future STB chips, as well as Broadcom's Cable Modem group. Jim Quinlan (12): dt-bindings: PCI: Change brcmstb YAML maintainer dt-bindings: PCI: Cleanup of brcmstb YAML and add 7712 SoC PCI: brcmstb: Use common error handling code in brcm_pcie_probe() PCI: brcmstb: Use bridge reset if available PCI: brcmstb: Use swinit reset if available PCI: brcmstb: PCI: brcmstb: Make HARD_DEBUG, INTR2_CPU_BASE offsets SoC-specific PCI: brcmstb: Remove two unused constants from driver PCI: brcmstb: Don't conflate the reset rescal with phy ctrl PCI: brcmstb: Refactor for chips with many regular inbound BARs PCI: brcmstb: Check return value of all reset_control_xxx calls PCI: brcmstb: Change field name from 'type' to 'model' PCI: brcmstb: Enable 7712 SOCs .../bindings/pci/brcm,stb-pcie.yaml | 48 +- drivers/pci/controller/pcie-brcmstb.c | 484 +++++++++++++----- 2 files changed, 397 insertions(+), 135 deletions(-) base-commit: 55027e689933ba2e64f3d245fb1ff185b3e7fc81 Tested-by: Florian Fainelli