From patchwork Sat Jan 30 17:54:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1433729 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=85.214.62.61; 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=i1pXXG57; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DShft4p1Gz9sWc for ; Sun, 31 Jan 2021 04:54:30 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4D2EF825DC; Sat, 30 Jan 2021 18:54:26 +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="i1pXXG57"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B9D72825DC; Sat, 30 Jan 2021 18:54:25 +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-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 4EAD1824BB for ; Sat, 30 Jan 2021 18:54:23 +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-ej1-x635.google.com with SMTP id l9so17880788ejx.3 for ; Sat, 30 Jan 2021 09:54:23 -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:mime-version :content-transfer-encoding; bh=SgDznNotHICrruHv5ArSpUjtcGZMFTPqI1bms5wsfbU=; b=i1pXXG572sJzms5IlfKxxmW0LmDvqBY1QpH2pn+2LSwyhfc+9f2v5+mH3UCVB8V9cK CWKtfA3qvb8WUAm35AOMsjKHGKuRc+BDQ4oiaMZfDeUHWcqilFCIRiQaoXpftPfg1KjB McqZhBxgQ0qXajGf0SAyDtgLE79Jvya6yYEtYhwiEPbHHXlykJH628JGrovV6M31/xpZ Nb1d32VevRv6IJc2qrqX1JjahG0ONkolsEvC0Z6pmYNIEl/N97/tMltN8lby9rqarlTy by0zEBo0KhtBPZMnkrxmzFUt0NU5Z9uOH6J0sgq+aDk7ew2xykf+MN3kEG7aiBfDok9t Q9Rw== 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:mime-version :content-transfer-encoding; bh=SgDznNotHICrruHv5ArSpUjtcGZMFTPqI1bms5wsfbU=; b=fKP3STM/O2iT/FTEaM/5i/mHB1RTJYaKSzRLxDcSIaJiOU/JB9y3N6+lVfSUb6BJPf 4WCAvK1IVdi8RzVixap57sIzWTdXEqSZq0oOpwJMPXah1F8Ltv8/OsF3nznVyj3Fq91R cgqsOFHjKtChr0xAF41j8EsJobbaOkULESb+9CXEjKJHVG7EWl/2cejBlQ/Hja1y8+Xs qTLFt12BAsEmAyqqGOomVrqcIY3+QDqb7vi1yj6Og9etEp9XsREDtHLVsGxBZHdKNpr8 vrn+ejmZ3sALLsUrJnXjm1aaRc5RYSKud0T+ou1PykSzaloJjlbaOG8Ep2QJ4X63qFTr +jBQ== X-Gm-Message-State: AOAM532OXiVwD7obC6UBcwN7HO1ioZ3gCsguxrXi496K0coG8PLUKh+a lEnLHvkTIf/hXyXrUlIQuoHjt5lzaZs= X-Google-Smtp-Source: ABdhPJxCYOHxnrnyz497fkQk0f4uzztZ41No0b+JdjX5Gyv0+mgDJxhaNA6cVKm6kiYa4Cf2kWP40w== X-Received: by 2002:a17:906:c793:: with SMTP id cw19mr9773753ejb.246.1612029263025; Sat, 30 Jan 2021 09:54:23 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 09:54:22 -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 1/5] pci: renesas: Add root bus handling on Gen3 Date: Sat, 30 Jan 2021 18:54:12 +0100 Message-Id: <20210130175416.114269-1-marek.vasut+renesas@gmail.com> X-Mailer: git-send-email 2.29.2 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 Add code to access the PCIe root bus space and configure it. Signed-off-by: Marek Vasut Cc: Bin Meng Cc: Nobuhiro Iwamatsu --- drivers/pci/pci-rcar-gen3.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c index 0d5b01f9f8..cd116a536e 100644 --- a/drivers/pci/pci-rcar-gen3.c +++ b/drivers/pci/pci-rcar-gen3.c @@ -151,6 +151,16 @@ static int rcar_pcie_config_access(const struct udevice *udev, struct rcar_gen3_pcie_priv *priv = dev_get_plat(udev); u32 reg = where & ~3; + /* Root bus */ + if (PCI_DEV(bdf) == 0) { + if (access_type == RCAR_PCI_ACCESS_READ) + *data = readl(priv->regs + PCICONF(where / 4)); + else + writel(*data, priv->regs + PCICONF(where / 4)); + + return 0; + } + /* Clear errors */ clrbits_le32(priv->regs + PCIEERRFR, 0); @@ -187,11 +197,14 @@ static int rcar_gen3_pcie_addr_valid(pci_dev_t d, uint where) { u32 slot; + if (PCI_BUS(d)) + return -EINVAL; + if (PCI_FUNC(d)) return -EINVAL; slot = PCI_DEV(d); - if (slot != 1) + if (slot > 1) return -EINVAL; return 0; From patchwork Sat Jan 30 17:54:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1433730 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=85.214.62.61; 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=JEhRzYh5; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DShg16z5Wz9sWc for ; Sun, 31 Jan 2021 04:54:37 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F2F38262D; Sat, 30 Jan 2021 18:54:31 +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="JEhRzYh5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 343E382614; Sat, 30 Jan 2021 18:54:27 +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-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) (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 8A917825A6 for ; Sat, 30 Jan 2021 18:54:24 +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-x529.google.com with SMTP id s11so14276709edd.5 for ; Sat, 30 Jan 2021 09:54:24 -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=2GQx0SMt+CXNq+CplyXPM0XoirDxVyASCFY+zV6X6NE=; b=JEhRzYh5weSEBolbeJRSb0qRvIs+syldiZurl0Zc3mJTbGbzVAeJFIiedq/Otr23u/ WOBQabE3jaD0myxdKUA+/xTdcuopqpQCWUa9hWNQXQzxKkTCt0OApAgk3h/v8tsSta8X CFUTi75cnMXzcwLngRtBnD/JOk6lvGLvLOXrzT9w31MyPGujZ+2EkXgg8NC484zQA2kn JwkNgcF/UuwgHvD/LS2v39fceAUtHBWKdFKT+IJPDuBmiZgzLnQE1VbZCiKZDCcb7IbI zyfCAvPN5SrPULIgdH0NeZOWcL3p/AL7nMzzWb1b6zYH1+PttsfAZGNConP0OkYVLETn XWVA== 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=2GQx0SMt+CXNq+CplyXPM0XoirDxVyASCFY+zV6X6NE=; b=Phi+FirqQ9gJR8W3H5nwfMAPYnQIAkYGsS5X9mYN6XJ+DaqgoAYsKM2SWiMu8KZB8w fWyaNrKUNkLCOn31iLPCnCKNeRFMiwCg566AQMc27BK0QglGHQjU0bp245QsxxN1JywB //Hz0awiMhs0s8SmgCPu1/ny94EYXjTXcMIlAH7catP7eYuPaIbcbTdBaiqP9OjZPl74 pDE7ynBqTwoaCaaN8xranImOEMN0uXIDxJkBEyqQLNbg5xYqCW1xT9lP+ZyeHx/1hn8d vaJ2bnV7PS1lI4k414GQPvHRr0FQVcO5zvd+KXCLNfHJRr0lmC7sSyX4RJTWo9SSq9rB nOiQ== X-Gm-Message-State: AOAM530d0V1UM1W8FjlaRUyzbU/S8ai3qEpgxZcTccr6zp84+N37t04S Hf7DhWe2XSG9lJD4H3OFgsvbk1D/Ru4= X-Google-Smtp-Source: ABdhPJwW8iHy2yHdpBadAZQW/wVi0PHkigwpRgscICE34BEcgsSdAFDNTel8GFHDH7jZRlV73CJjUg== X-Received: by 2002:a50:b5c5:: with SMTP id a63mr10972017ede.227.1612029264262; Sat, 30 Jan 2021 09:54:24 -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.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 09:54:23 -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 2/5] pci: renesas: Make map address and mask power of two on Gen3 Date: Sat, 30 Jan 2021 18:54:13 +0100 Message-Id: <20210130175416.114269-2-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 Both the map address and mask must be power of two per documentation, adjust the code accordingly. Signed-off-by: Marek Vasut Cc: Bin Meng Cc: Nobuhiro Iwamatsu --- drivers/pci/pci-rcar-gen3.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c index cd116a536e..6b08409b85 100644 --- a/drivers/pci/pci-rcar-gen3.c +++ b/drivers/pci/pci-rcar-gen3.c @@ -23,6 +23,7 @@ #include #include #include +#include #define PCIECAR 0x000010 #define PCIECCTLR 0x000018 @@ -347,10 +348,12 @@ static int rcar_gen3_pcie_probe(struct udevice *dev) if (hose->regions[i].phys_start == 0) continue; - mask = (hose->regions[i].size - 1) & ~0xf; + mask = (roundup_pow_of_two(hose->regions[i].size) - 1) & ~0xf; mask |= LAR_ENABLE; - writel(hose->regions[i].phys_start, priv->regs + PCIEPRAR(0)); - writel(hose->regions[i].phys_start, priv->regs + PCIELAR(0)); + writel(rounddown_pow_of_two(hose->regions[i].phys_start), + priv->regs + PCIEPRAR(0)); + writel(rounddown_pow_of_two(hose->regions[i].phys_start), + priv->regs + PCIELAR(0)); writel(mask, priv->regs + PCIELAMR(0)); break; } 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) From patchwork Sat Jan 30 17:54:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1433732 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=85.214.62.61; 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=FeKnIzA7; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DShgQ4vXcz9sWc for ; Sun, 31 Jan 2021 04:54:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A094A8265E; Sat, 30 Jan 2021 18:54:34 +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="FeKnIzA7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C433082642; Sat, 30 Jan 2021 18:54:29 +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-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 D043E82603 for ; Sat, 30 Jan 2021 18:54:26 +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-ej1-x633.google.com with SMTP id w1so17802637ejf.11 for ; Sat, 30 Jan 2021 09:54:26 -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=tj6vd/RYHoFLoHExaiGr8l01Z1DCdoLZXzobDSF6jwI=; b=FeKnIzA761AbZa9u4IJ3hX8oj76UJ9ZZR2gV/DVdEfrJgcYlBGAFe6yyFwKTeOmmuL lfbfgE/0N5UK0LCD7aPrFw8h4VWWchuQmjkKZ+tt3bfEMayzVUOOyVIpt4JlHEfGhvGO 9eDLtDOdo2sAISnpRwd/QlaZdb9VWYo3nte1ZEDaeR4WAPu0trGoEKNz7tMrT9FRzZ2X ZtVev1b9ITuzpDhKEGKvIqwdbkhFPRoQ/raXneYEyxH7/FPdHCW/YpF3qFjieZ2XDWkv LeZMimG/N6rh5McT5vkIe7o0TucKMsCtCtAh6YU4dQ51xalwLUAqe7G3ySO06RQjPaBw X/KQ== 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=tj6vd/RYHoFLoHExaiGr8l01Z1DCdoLZXzobDSF6jwI=; b=jzPmZVR1g+b1JY75aMLw0sQmhLHDNnMZ4YlZEndoeJL6OsLSugtu5N2+NLimK2BUAV S1JCRSgEW1kDqx8k7JucrMl9tlk1G254wUjalLX5WZoKUNg6SRP6EBust+fL9QXrqZgd r37lW00YGC9TxDINmHRz2JRgEpMsEghZMX+1ijtb/pa/KIqYA9WN8DttvnFRQj04VwMR gMWJfWY0JtO6Sfcb7RFqrVD6SABAHrBnsJUwk0HpKFooa68oHwCdHNKIk5T/cVgkjXny 9yc8U//CPuNdJi8F+vWmpulEw3JDehlESQbO8afWZe3XZjFqWFR9Fi1Ys6OKSFp39LEG 0DEw== X-Gm-Message-State: AOAM533uXz9rfUGN4inuzhE8MFFvAwOPeAvTzcMLdGKfZsnc9Wsff3Eb AnqVtXqIOiMsQxTrCRcFpYITlgqNr5c= X-Google-Smtp-Source: ABdhPJyEQZ4CfaY0L/66s2zYnQjsGWesvA8Z+O39ahQSa/7qsbYl9UwxFcktCA70nfO6XARqlmEDGA== X-Received: by 2002:a17:906:c0d7:: with SMTP id bn23mr2649944ejb.94.1612029266618; Sat, 30 Jan 2021 09:54:26 -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.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 09:54:25 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut Subject: [PATCH 4/5] ARM: rmobile: Enable CONFIG_PCI_REGION_MULTI_ENTRY on RCar3 Date: Sat, 30 Jan 2021 18:54:15 +0100 Message-Id: <20210130175416.114269-4-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 R-Car3 can have multiple regions of type memory in DT, enable CONFIG_PCI_REGION_MULTI_ENTRY to handle those instead of using just one of the memory regions. Signed-off-by: Marek Vasut --- configs/rcar3_salvator-x_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index ff6e0e945e..6109a23a31 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -71,6 +71,7 @@ CONFIG_DM_ETH=y CONFIG_RENESAS_RAVB=y CONFIG_PCI=y CONFIG_DM_PCI=y +CONFIG_PCI_REGION_MULTI_ENTRY=y CONFIG_PCI_RCAR_GEN3=y CONFIG_DM_REGULATOR=y CONFIG_DM_REGULATOR_FIXED=y From patchwork Sat Jan 30 17:54:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 1433733 X-Patchwork-Delegate: trini@ti.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=85.214.62.61; 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=Ems1XWN8; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (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 4DShgd55RQz9sWc for ; Sun, 31 Jan 2021 04:55:09 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7573F82642; Sat, 30 Jan 2021 18:54:42 +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="Ems1XWN8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B54F482642; Sat, 30 Jan 2021 18:54:30 +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 0125B8262D for ; Sat, 30 Jan 2021 18:54:27 +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 j13so14296522edp.2 for ; Sat, 30 Jan 2021 09:54:27 -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=lLo+93SH5SqeiWoFUrh/3mkWvDwnsd6hW9pCguds1uU=; b=Ems1XWN8PiRkX2YMEV0XSpyNqxvV4rdx0XRs8DQgMsUCb/qVvVY5axUDCrD8qlQp9/ etZ3jiY/GHIJkYOS3k9JaQNHq+sGlKfQnf27M+h/snfFiI1l6kV7WSRBot2vesI9No7R PYKqAJOaEgX4JKmqfjeT5352lKCaxkrDYCUS3pqTGc+7yNL7U2L+2P1GYQlhhw2xwfNl zYiX+oq8ESsQfXBfUZ9bHmCUafcdVUpy9y223m5cDrBf59fWIgty6XpDuBpxvXXymCzd CP6i6Q2Q/w6L7/e8WV4WpZg8u9nHK+g+GR8Eu3oeNq3n4pvylHuFxiQ81skJ0WUZFYEA SJDg== 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=lLo+93SH5SqeiWoFUrh/3mkWvDwnsd6hW9pCguds1uU=; b=ZoSGI+GboXwygEcFZbl7nxyFFmEobchxYlTJ7NIbQ8axvLEkhGDJAme2W26D0YKpOF siSBoRuXzyxdPuab9ERxmuG+MsG0tc1yh0uvsiJrgRIFEnpg4gXUzWr3d6IOQfR/bQRm 4fMoGIUd00pxrQC8oRSILNMj8OFFo3iZGkviWxsUBBuq4QwbZNUeg6lTwQF8djBGJl5s x8gkmA3wlqhi9SarIZ7IQ+s79SW0OcpKvOBMaYgkYOZFb3Z91G5nNS6hg3DzJ69r89IE MFI5mCXRv4lE/iRdjT7NcQlMQ76Jep4gSGPuYsmIQewdP2SM2T1NgmgL+vqayq4JwTFl HkZg== X-Gm-Message-State: AOAM531kIFQdxCBEEwPvO6dq6uXULiL9HEaupTAtGTbcngz8HKyp5nKE x8cdIJFE9yNIxzK29zTN45/ApnPYtRw= X-Google-Smtp-Source: ABdhPJzpROJTTOvzM40pRRKU8UhhuiS0Sse6jQDfst943f/KdUIDBvRRsx/FAAPn6mxo5szRaANPxQ== X-Received: by 2002:a05:6402:2288:: with SMTP id cw8mr10947609edb.161.1612029267689; Sat, 30 Jan 2021 09:54:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jan 2021 09:54:26 -0800 (PST) From: Marek Vasut X-Google-Original-From: Marek Vasut To: u-boot@lists.denx.de Cc: Marek Vasut Subject: [PATCH 5/5] ARM: rmobile: Enable NVMe support on RCar3 Date: Sat, 30 Jan 2021 18:54:16 +0100 Message-Id: <20210130175416.114269-5-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 Enable support for PCIe NVMe devices. Signed-off-by: Marek Vasut --- configs/rcar3_salvator-x_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/rcar3_salvator-x_defconfig b/configs/rcar3_salvator-x_defconfig index 6109a23a31..f97276b98e 100644 --- a/configs/rcar3_salvator-x_defconfig +++ b/configs/rcar3_salvator-x_defconfig @@ -69,6 +69,7 @@ CONFIG_PHY_MICREL=y CONFIG_PHY_MICREL_KSZ90X1=y CONFIG_DM_ETH=y CONFIG_RENESAS_RAVB=y +CONFIG_NVME=y CONFIG_PCI=y CONFIG_DM_PCI=y CONFIG_PCI_REGION_MULTI_ENTRY=y