From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 47E61C433EF for ; Thu, 25 Nov 2021 10:34:59 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 07F438321B; Thu, 25 Nov 2021 11:34:57 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="sfpKQJok"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE0E083027; Thu, 25 Nov 2021 11:34:55 +0100 (CET) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A328383395 for ; Thu, 25 Nov 2021 11:34:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id 5354D61052; Thu, 25 Nov 2021 10:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637836487; bh=C0KlE1dh+rgdNrqFXXWP7HvpbTFx3/xxeZRSzze0T70=; h=From:To:Cc:Subject:Date:From; b=sfpKQJokrXIS9iypfi0Yh+CgW323S8N7roFkO0BTWvE/7eqIZsJbO3yVDAzNU8ici j9b+vH2LtFDTf4MT2UuXaBJwg55CjZoCI8Afid25xnLj67g+MG/7XOggwZpW2rHupW 40UB+tYD9aRejhSkDAVef4rArmSvuDjSbC4K0eFpycMdOeqmwUXbscljEniof8Aawk OtV1VrP4da4ITNWaJJqF3f6nqL0eld5e7DS+IPDV0s+FMn1RkkXzdlGwZv5iU8jjf3 /+ndsStKQsEOznIj1HW13i9YwSsnRoSdmbXF+2y+7rJ3v9mPIIBerwx1enw7+yjI7T +CSI11Nzm6Ysw== Received: by pali.im (Postfix) id 3CE0A67E; Thu, 25 Nov 2021 11:34:43 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Simon Glass , Bin Meng Cc: u-boot@lists.denx.de Subject: [PATCH] pci: When disabling pref MEM set all base bits Date: Thu, 25 Nov 2021 11:34:37 +0100 Message-Id: <20211125103437.23908-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.37 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 It is common to set all base address bits to one and all limit address bits to zero for disabling address forwarding. Forwarding is disabled when base address is higher than limit address, so this change should not have any effect. Signed-off-by: Pali Rohár --- drivers/pci/pci_auto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 6e5ed194f247..c0acf331398d 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -243,7 +243,7 @@ void dm_pciauto_prescan_setup_bridge(struct udevice *dev, int sub_bus) cmdstat |= PCI_COMMAND_MEMORY; } else { /* We don't support prefetchable memory for now, so disable */ - dm_pci_write_config16(dev, PCI_PREF_MEMORY_BASE, 0x1000 | + dm_pci_write_config16(dev, PCI_PREF_MEMORY_BASE, 0xfff0 | prefechable_64); dm_pci_write_config16(dev, PCI_PREF_MEMORY_LIMIT, 0x0 | prefechable_64); -- 2.20.1