From patchwork Wed Jul 29 18:41:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 1338475 X-Patchwork-Delegate: lokeshvutla@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=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; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=H5XyQdrE; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BH2Sd4B74z9sRN for ; Thu, 30 Jul 2020 04:41:35 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A394382216; Wed, 29 Jul 2020 20:41:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="H5XyQdrE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E723D82225; Wed, 29 Jul 2020 20:41:19 +0200 (CEST) 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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 9A28D8216F for ; Wed, 29 Jul 2020 20:41:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=s-anna@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06TIfDfd127008 for ; Wed, 29 Jul 2020 13:41:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1596048073; bh=qeYgKkNo3C6FgLvX+skP6/XahvWULZ1M0JAGNSOV/fM=; h=From:To:CC:Subject:Date; b=H5XyQdrE1xu8Nh9w0rWiKd9c5Rm4P1YQ0pWLT35qxGqFsFXXUfqmDOYSd5D77liK4 WIdMw3ulusKccC/mHhb97iPTTUm+ZLFcWosgzeCWfnKuyE4/d2oN2AKEgTBEJ7sPEY XHUCNaPgnSnsptkL5FFVOJbz4QXqxip9vYYf3Mps= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06TIfDGA038265 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 29 Jul 2020 13:41:13 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 29 Jul 2020 13:41:13 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Wed, 29 Jul 2020 13:41:13 -0500 Received: from lelv0597.itg.ti.com (lelv0597.itg.ti.com [10.181.64.32]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 06TIfDdf115458; Wed, 29 Jul 2020 13:41:13 -0500 Received: from localhost ([10.250.34.248]) by lelv0597.itg.ti.com (8.14.7/8.14.7) with ESMTP id 06TIfD8H077380; Wed, 29 Jul 2020 13:41:13 -0500 From: Suman Anna To: Lokesh Vutla CC: , Nishanth Menon , Tero Kristo , Keerthy , Grygorii Strashko , Suman Anna Subject: [PATCH v2] board: ti: am65x: Update fdt fixup logic for interconnect nodes Date: Wed, 29 Jul 2020 13:41:12 -0500 Message-ID: <20200729184112.27845-1-s-anna@ti.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 The DT nodes on AM65x SoCs currently use a node name "interconnect" for the various interconnects. This name is not following the DT schema, and should simply be "bus". Update the fdt fixup logic to use both the current and the expected corrected path names so that this logic won't be broken with newer kernels. The logic also corrects the crypto node name as the DT node unit-addresses are all expected to be lower case. Signed-off-by: Suman Anna --- v2: dropped the local variable due to its usage only in the conditional CONFIG_TI_SECURE_DEVICE compilation path v1: https://patchwork.ozlabs.org/project/uboot/patch/20200723225609.29404-1-s-anna@ti.com/ board/ti/am65x/evm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index 2eb8235c6988..36063b11383d 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -101,7 +101,10 @@ int ft_board_setup(void *blob, struct bd_info *bd) { int ret; - ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", "sram@70000000"); + ret = fdt_fixup_msmc_ram(blob, "/bus@100000", "sram@70000000"); + if (ret < 0) + ret = fdt_fixup_msmc_ram(blob, "/interconnect@100000", + "sram@70000000"); if (ret) { printf("%s: fixing up msmc ram failed %d\n", __func__, ret); return ret; @@ -109,7 +112,10 @@ int ft_board_setup(void *blob, struct bd_info *bd) #if defined(CONFIG_TI_SECURE_DEVICE) /* Make Crypto HW reserved for secure world use */ - ret = fdt_disable_node(blob, "/interconnect@100000/crypto@4E00000"); + ret = fdt_disable_node(blob, "/bus@100000/crypto@4e00000"); + if (ret < 0) + ret = fdt_disable_node(blob, + "/interconnect@100000/crypto@4E00000"); if (ret) printf("%s: disabling SA2UL failed %d\n", __func__, ret); #endif