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 9FBE0C77B73 for ; Wed, 19 Apr 2023 07:15:09 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AA9E9861FD; Wed, 19 Apr 2023 09:14:29 +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="j9GCxbi4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 540C5861A1; Wed, 19 Apr 2023 08:14:04 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 8D57F85DC9 for ; Wed, 19 Apr 2023 08:14:00 +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-kumar1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33J6Dv0b021590; Wed, 19 Apr 2023 01:13:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681884837; bh=fOT0VlIxUPD5TRd5wdk86gn75Ca2uyXe7+1siT61Lfw=; h=From:To:CC:Subject:Date; b=j9GCxbi43SV44SRQZsh9shJGakXGtqJeN6yJxaJBeYeYwyX2aLojtg0UJxE3aVn75 Qdc8j0Y0U+6em+4mopPrKQe8bNsRhJDIL/swF6XHuzdi/MZYzWXrN+XFtQ2TRu0+cp I6uz7l24bvh7pJhdukLQ5dmV7yM8BR5AEWc9UTjU= Received: from DFLE107.ent.ti.com (dfle107.ent.ti.com [10.64.6.28]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33J6DvU6086210 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 19 Apr 2023 01:13:57 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 19 Apr 2023 01:13:57 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Wed, 19 Apr 2023 01:13:57 -0500 Received: from udit-HP-Z2-Tower-G9-Workstation-Desktop-PC.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33J6DslQ036917; Wed, 19 Apr 2023 01:13:55 -0500 From: Udit Kumar To: , , , , , , CC: Udit Kumar Subject: [PATCH] arch: arm: mach-k3: Delete tifs node in DT fixup Date: Wed, 19 Apr 2023 11:43:52 +0530 Message-ID: <20230419061352.3156023-1-u-kumar1@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Mailman-Approved-At: Wed, 19 Apr 2023 09:14:18 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean This patch deletes tifs DT node as part of fixup. TISCI API reported msmc_size, does not include 64KB reserved size for tifs aka MSMC comms memory. As part of fixup, original code uses TISCI API reported msmc_size as size for sram DT node. tifs node is similar to l3-cache, which should hold address above msms_size, and should be deleted before passing control to OS. Documentation https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html?highlight=msmc#tisci-msg-query-msmc Signed-off-by: Udit Kumar --- arch/arm/mach-k3/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index a2adb791f6..4651744821 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -349,9 +349,11 @@ int fdt_fixup_msmc_ram(void *blob, char *parent_path, char *node_name) size = fdt_read_number(sub_reg, 1); debug("%s: subnode = %d, addr = 0x%x. size = 0x%x\n", __func__, subnode, addr, size); + if (addr + size > msmc_size || !strncmp(fdt_get_name(blob, subnode, &len), "sysfw", 5) || - !strncmp(fdt_get_name(blob, subnode, &len), "l3cache", 7)) { + !strncmp(fdt_get_name(blob, subnode, &len), "l3cache", 7) || + !strncmp(fdt_get_name(blob, subnode, &len), "tifs", 4)) { fdt_del_node(blob, subnode); debug("%s: deleting subnode %d\n", __func__, subnode); if (!prev_node) -- 2.34.1