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 X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E3CEC47088 for ; Wed, 26 May 2021 16:01:31 +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 53212613AC for ; Wed, 26 May 2021 16:01:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53212613AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3352182EBA; Wed, 26 May 2021 18:01:11 +0200 (CEST) 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="e3Lndeiw"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D31C182EE0; Wed, 26 May 2021 18:00:54 +0200 (CEST) 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 EE14782E3F for ; Wed, 26 May 2021 18:00:45 +0200 (CEST) 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 7462D613D8; Wed, 26 May 2021 16:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622044844; bh=zxsjDJE8N9Go+/H8BwonKvpe8refVWStNEkTpwZw/7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e3LndeiwMDq0Hd6c9JW8v4JFbvxMayoF4ZhOoVUD680QAYfUhMLNuTlAh0NK/DfeK 9MAxK5E//oq7qI8lsKvY51Ymoi5KAPr2qf9sd8zPMizHjp6O8IwjHCK6BM2fkGLKzm IAUhuaxs5VDLwFum3w9ThQKPPFp5bK/ctZR09DZS/k2S0e8jrvUZvnQZrFyfe0msIC heERWWotZ4tSYuK3uOIDHHC5cEM18LNbfl/ieic2jB7Mc5vlbxOlRzW0e+hDG4anu3 Vkugt1n3reK4d0U55vKs5Ydx8U2scnbmE8nKfGDL5TlJ4heami30e/lpdb9oQBFgt3 dVR/ej7+K9Tsw== Received: by pali.im (Postfix) id 96844B01; Wed, 26 May 2021 18:00:42 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Stefan Roese , Konstantin Porotchkin Cc: =?UTF-8?q?Marek=20Beh=C3=BAn?= , u-boot@lists.denx.de Subject: [PATCH v2 4/7] arm: a37xx: pci: Find PCIe controller node by compatible instead of path Date: Wed, 26 May 2021 17:59:37 +0200 Message-Id: <20210526155940.26141-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210526155940.26141-1-pali@kernel.org> References: <20210517063956.30905-1-pali@kernel.org> <20210526155940.26141-1-pali@kernel.org> 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.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.4 at phobos.denx.de X-Virus-Status: Clean Find PCIe DT node by compatible string instead of retrieving it by using hardcoded DT path. Signed-off-by: Pali Rohár Reviewed-by: Marek Behún --- arch/arm/mach-mvebu/armada3700/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/arm/mach-mvebu/armada3700/cpu.c b/arch/arm/mach-mvebu/armada3700/cpu.c index 0cf60d7cdd7d..1abac7c9a47a 100644 --- a/arch/arm/mach-mvebu/armada3700/cpu.c +++ b/arch/arm/mach-mvebu/armada3700/cpu.c @@ -53,8 +53,6 @@ #define A3700_PTE_BLOCK_DEVICE \ (PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE) -#define PCIE_PATH "/soc/pcie@d0070000" - DECLARE_GLOBAL_DATA_PTR; static struct mm_region mvebu_mem_map[MAX_MEM_MAP_REGIONS] = { @@ -288,7 +286,7 @@ int a3700_fdt_fix_pcie_regions(void *blob) const u32 *ranges; int node, len; - node = fdt_path_offset(blob, PCIE_PATH); + node = fdt_node_offset_by_compatible(blob, -1, "marvell,armada-3700-pcie"); if (node < 0) return node; -- 2.20.1