From patchwork Sat Jan 30 17:54:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1433731 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Sm0uSBkZ; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DShgF2PKRz9sWk for ; Sun, 31 Jan 2021 04:54:49 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 242B68263A; Sat, 30 Jan 2021 18:54:33 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="Sm0uSBkZ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E7C982614; Sat, 30 Jan 2021 18:54:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C2ADF824BB for ; Sat, 30 Jan 2021 18:54:25 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@gmail.com Received: by mail-ed1-x52f.google.com with SMTP id c2so14235285edr.11 for ; Sat, 30 Jan 2021 09:54:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HiNvOuUREAEwLXe+6nbR/xMkz29nwt5qiqLTfSFmikg=; b=Sm0uSBkZIM+//lMKU7JLmT6jDloEX1nDql1mQpF7raaFPTSPdE46+uDsTpt2nmNoQB 6oVeGXqPO3IQ4byQ7TkeI0jdZq+lNJYVNgW+vrSDDfq2e/+5ZjQVYMOp4zm7Rf59CKU1 5IWA9TK8Jw3js/YLltixcxH/H8AQMqVf9cttnVo92hcFkntu+vKcoBWPpUMK7nVqpWLw M80fZGC2TYB+hByIfbW24kzK1rLID9SMWHho5tqRaKZ3CxqhXvaggsVA3aCuM+BURjKD PaqOElZ8fUy3hfTqTCyrerkGDAt/E0T6EymXNhS+eVIlAKjSteYvTfl/PCVk6bhkSeoe PQPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HiNvOuUREAEwLXe+6nbR/xMkz29nwt5qiqLTfSFmikg=; b=LLNuD0B4tioqfv0Ubclji3sg3nIn2dMUOdffWs6bZCOApqxEk+xLnFe9AsQB6KeVC8 1VRP9UJUhXlwpJdiutD4J+tiNwcUxjuZuuCfMojzxcCE05LuFnnT1xkQX1QsWAad7zVl 2+Ea7NuwCiyFsnXl07gsVoE3Owuee/QrkaRGPHcPOrI3ETyGP51OD4JsCiTQ2fGTq0iX 4klJ9+H0HKd3VUcLiYhkZXv1C9RyPamOgnXYwEbzriB458N1xjA8mCI10WD7CObNGXoV MSnlwR3+I8ulqZ6friO/pFeNhes8tBNiS65PAesDqbMeHDm1MWvWDdWMNzEgjvvJv3gZ phjg== X-Gm-Message-State: AOAM533DAxat+3+veEOI9i2wa4+olE4cHdntAAPC+k3AGL8K6DiUHkad NMUMrlAWEX6YEtvL5eXmhBm25OLvU+U= X-Google-Smtp-Source: ABdhPJyWJuNl8+0Fgeb7pZSWVlhTLmRuTCepF5zSQBjCxV5aXI3V2b7p3RGa/F2h6+21eLik1fQGdg== X-Received: by 2002:a05:6402:11d3:: with SMTP id j19mr11034694edw.314.1612029265473; Sat, 30 Jan 2021 09:54:25 -0800 (PST) Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz. [89.176.112.137]) by smtp.gmail.com with ESMTPSA id hb19sm5233200ejc.16.2021.01.30.09.54.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 09:54:24 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut , Bin Meng , Nobuhiro Iwamatsu Subject: [PATCH 3/5] pci: renesas: Fix BAR mapping on Gen3 Date: Sat, 30 Jan 2021 18:54:14 +0100 Message-Id: <20210130175416.114269-3-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210130175416.114269-1-marek.vasut+renesas@gmail.com> References: <20210130175416.114269-1-marek.vasut+renesas@gmail.com> MIME-Version: 1.0 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.102.3 at phobos.denx.de X-Virus-Status: Clean Because the first PCIExAR(n) register is configured with the mapping, It is the second PCIExAR(n) register that must be written with 0, not the last one. Update the n from 4 to 1 to select the correct register. Signed-off-by: Marek Vasut Cc: Bin Meng Cc: Nobuhiro Iwamatsu --- drivers/pci/pci-rcar-gen3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c index 6b08409b85..34a561ef8b 100644 --- a/drivers/pci/pci-rcar-gen3.c +++ b/drivers/pci/pci-rcar-gen3.c @@ -358,9 +358,9 @@ static int rcar_gen3_pcie_probe(struct udevice *dev) break; } - writel(0, priv->regs + PCIEPRAR(4)); - writel(0, priv->regs + PCIELAR(4)); - writel(0, priv->regs + PCIELAMR(4)); + writel(0, priv->regs + PCIEPRAR(1)); + writel(0, priv->regs + PCIELAR(1)); + writel(0, priv->regs + PCIELAMR(1)); ret = rcar_gen3_pcie_hw_init(dev); if (ret)