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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC7EAC433EF for ; Tue, 2 Nov 2021 10:50:47 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C63560E74 for ; Tue, 2 Nov 2021 10:50:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3C63560E74 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9405783602; Tue, 2 Nov 2021 11:50:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1635850245; bh=x7XSRZnNjdxBu6mrg//tjJenuRWGC91erCmOgOzAVAo=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ortmbizQfUlvalBZRDVzIElPGnW4ihpQKVvbsT3cunlHbkd1T/IYzUOjN36n7kB2y 66Q7OVRinvg5lRLY/D+R+kG/Yv1KE4sb28JL727Ca1feirxMgvxhkSC7JGYjEJKlvV sLpuSJ1MzecQUD2NW7/D+UObXIJK12IqxCwnpc7/978PnKuJbAdaypL1j38ToF/2v0 hcpWXNtQCwT+oFi54D6uqQjzN3WM2B3EZ4dfKeceSPPWlP8YmqhUkd/Jmvd3V3MoSl yZlpXWQ484QmRUunxZOzkQ0P9WFpHhewx39M99HAUG29LaS1UfRe01ScfDcGFtsJP9 PJFCcYcWQg2Og== Received: by phobos.denx.de (Postfix, from userid 109) id EA0CD83383; Tue, 2 Nov 2021 11:50:43 +0100 (CET) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0D7D483602 for ; Tue, 2 Nov 2021 11:50:41 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp102.mailbox.org (unknown [91.198.250.119]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4Hk6BT07s5zQjPn; Tue, 2 Nov 2021 11:50:41 +0100 (CET) Subject: Re: [PATCH 7/8] pci: pci_mvebu: Setup PCI controller to Root Complex mode To: =?UTF-8?Q?Pali_Roh=c3=a1r?= Cc: =?UTF-8?Q?Marek_Beh=c3=ban?= , u-boot@lists.denx.de References: <20211022142215.26484-1-pali@kernel.org> <20211022142215.26484-8-pali@kernel.org> From: Stefan Roese Message-ID: Date: Tue, 2 Nov 2021 11:50:36 +0100 MIME-Version: 1.0 In-Reply-To: <20211022142215.26484-8-pali@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 045F8131C X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 22.10.21 16:22, Pali Rohár wrote: > Root Complex should be the default mode, let's set it explicitly. > > Signed-off-by: Pali Rohár > Reviewed-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > drivers/pci/pci_mvebu.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c > index e43fa12d3819..b0c673d8c472 100644 > --- a/drivers/pci/pci_mvebu.c > +++ b/drivers/pci/pci_mvebu.c > @@ -62,6 +62,7 @@ DECLARE_GLOBAL_DATA_PTR; > #define PCIE_MASK_ENABLE_INTS (0xf << 24) > #define PCIE_CTRL_OFF 0x1a00 > #define PCIE_CTRL_X1_MODE BIT(0) > +#define PCIE_CTRL_RC_MODE BIT(1) > #define PCIE_STAT_OFF 0x1a04 > #define PCIE_STAT_BUS (0xff << 8) > #define PCIE_STAT_DEV (0x1f << 16) > @@ -373,6 +374,11 @@ static int mvebu_pcie_probe(struct udevice *dev) > struct pci_controller *hose = dev_get_uclass_priv(ctlr); > u32 reg; > > + /* Setup PCIe controller to Root Complex mode */ > + reg = readl(pcie->base + PCIE_CTRL_OFF); > + reg |= PCIE_CTRL_RC_MODE; > + writel(reg, pcie->base + PCIE_CTRL_OFF); > + > /* > * Change Class Code of PCI Bridge device to PCI Bridge (0x600400) > * because default value is Memory controller (0x508000) which > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de