Message ID | 20230623144100.34196-5-james.quinlan@broadcom.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-pci-owner@vger.kernel.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-pci-owner@vger.kernel.org; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=broadcom.com header.i=@broadcom.com header.a=rsa-sha256 header.s=google header.b=KmXxf2GN; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by legolas.ozlabs.org (Postfix) with ESMTP id 4Qng0j5Wkrz20Xk for <incoming@patchwork.ozlabs.org>; Sat, 24 Jun 2023 00:41:25 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230350AbjFWOlX (ORCPT <rfc822;incoming@patchwork.ozlabs.org>); Fri, 23 Jun 2023 10:41:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbjFWOlW (ORCPT <rfc822;linux-pci@vger.kernel.org>); Fri, 23 Jun 2023 10:41:22 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBA4526AE for <linux-pci@vger.kernel.org>; Fri, 23 Jun 2023 07:41:13 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-7624012c0b4so60088185a.1 for <linux-pci@vger.kernel.org>; Fri, 23 Jun 2023 07:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1687531272; x=1690123272; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=NXsIMdLVeqRmJLvAoHxSsCTJKyoULvGWQBxYVILJlHw=; b=KmXxf2GN07ol57yvkZVILQdt7IMRHcOHQ4wgmO+Dm9xQlGfuS4payO/AMWy0bdIQEW f6YcNPzmMDoRfTT8cUY2WgJB2YxmWMDI41WN7mmMAwVYd6xTToF/VnYCiLgzheG+mpKt AiAk3++rxE7MPUm6hJ7GEfrQJMiT19IrvVBDA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687531272; x=1690123272; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NXsIMdLVeqRmJLvAoHxSsCTJKyoULvGWQBxYVILJlHw=; b=cSSkCSAGsmHw017yI//V0XI2Uk+lX2nUnyDExJHCWMt5+qQ3C0IbfIW6ZWC0EsWYpH eS0NdtdGtUCEZsQm4GjPhG1GgFM2RDpe10ad6xo+DYwyUEDLG3ZBlM9KuLwjAOHH1ETO noD1Y6FkMCviRQKCitNaVbUkhOVFihB2QCC4uOEg8eBKM7hZG1dxqeHfQEUxSIn5DGWY wpOvr3QhzIQlrITm/W2SGJ5fdZO6o5r2PqZ1X9EgaTy8fsBFJOzJTv7KMUHPZeYbIaKV tZlxG0RsUgYa1Yb7d4t+KWF8nYnkSFKx9DnExmUgLfL2jXbSJo7fDQwva4rlzGNL/d9M f5hg== X-Gm-Message-State: AC+VfDw8OXo9/WGhESfB1T5NXEMm90rRoNoDKh8dxOQWV9jdYqI7QFJ2 b1MecXCYBZDFdSQWb4KM3NEpdUFQqoQf5ZFd7aavs9KTqZwFxLVxMx5bweM59zvbPqtWaCAGoLR A67Qr1JvDcVEdslwrFN+H7VSsVf2/WER6hC1GsteJAauFlMEQ+14NuoS3nfq6cNOfyv71x79ulr EUOwYPuFg/VQ== X-Google-Smtp-Source: ACHHUZ7YaKrVqQ8QnvGuhcY3JvOvengIIXyMeQqiinLnw5eZIkQ6quN3qI+0+AoueIHKsYdVThZWIw== X-Received: by 2002:a05:620a:2955:b0:763:a83c:a9e4 with SMTP id n21-20020a05620a295500b00763a83ca9e4mr18146840qkp.31.1687531272243; Fri, 23 Jun 2023 07:41:12 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.144.250]) by smtp.gmail.com with ESMTPSA id i18-20020a05620a145200b007625382f4ccsm4564613qkl.69.2023.06.23.07.41.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 07:41:11 -0700 (PDT) From: Jim Quinlan <james.quinlan@broadcom.com> To: linux-pci@vger.kernel.org, Nicolas Saenz Julienne <nsaenz@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Cyril Brulebois <kibi@debian.org>, Phil Elwell <phil@raspberrypi.com>, bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com Cc: Florian Fainelli <f.fainelli@gmail.com>, Jim Quinlan <jim2101024@gmail.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= <kw@linux.com>, Rob Herring <robh@kernel.org>, linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v6 4/5] PCI: brcmstb: Assert PERST# on BCM2711 Date: Fri, 23 Jun 2023 10:40:57 -0400 Message-Id: <20230623144100.34196-5-james.quinlan@broadcom.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230623144100.34196-1-james.quinlan@broadcom.com> References: <20230623144100.34196-1-james.quinlan@broadcom.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000000e700005feccfe8d" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, MIME_HEADER_CTYPE_ONLY,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org |
Series |
PCI: brcmstb: Configure appropriate HW CLKREQ# mode
|
expand
|
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index fe0415a98c63..7b698a9a851e 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -884,6 +884,11 @@ static int brcm_pcie_setup(struct brcm_pcie *pcie) /* Reset the bridge */ pcie->bridge_sw_init_set(pcie, 1); + + /* Ensure that PERST# is asserted; some bootloaders may deassert it. */ + if (pcie->type == BCM2711) + pcie->perst_set(pcie, 1); + usleep_range(100, 200); /* Take the bridge out of reset */
The current PCIe driver assumes PERST# is asserted when probe() is invoked. Some older versions of the 2711/RPi bootloader left PERST# unasserted, as the Raspian OS does assert PERST# on probe(). For this reason, we assert PERST# for BCM2711 SOCs (i.e. RPi). Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com> --- drivers/pci/controller/pcie-brcmstb.c | 5 +++++ 1 file changed, 5 insertions(+)