From patchwork Tue Jan 9 19:15:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 1884593 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=GH8+lCm/; dkim-atps=neutral Authentication-Results: legolas.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=patchwork.ozlabs.org) 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 ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4T8ggl2KvVz1yPh for ; Wed, 10 Jan 2024 06:18:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3765287A4B; Tue, 9 Jan 2024 20:18:09 +0100 (CET) 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="GH8+lCm/"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9362A87A99; Tue, 9 Jan 2024 20:18:07 +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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 3208287943 for ; Tue, 9 Jan 2024 20:18:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 409JHvvp066107; Tue, 9 Jan 2024 13:17:57 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1704827877; bh=hVv3tVBKwjv6nKq5vAeCX8nPFAU/qxcVWwiaoSGTfYg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GH8+lCm/MLKQDTol7DpqMAD5rMqlzAtnIr9cqx/NtZdqkzKYqddggF8a0cMJeIQgp uK8znYh6XH77cmIfbhcEGvvvaOQaUxDJSd00GIAN31oJWvUGYCwh+jHk6Xr3bOtRP7 EEhQaeNGc76FYPbGZV7kMBNVo4nfbxcwFyp34xNc= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 409JHvnt090791 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 Jan 2024 13:17:57 -0600 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 9 Jan 2024 13:17:56 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 9 Jan 2024 13:17:56 -0600 Received: from localhost (uda0133052.dhcp.ti.com [128.247.81.232]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 409JHuW2106642; Tue, 9 Jan 2024 13:17:56 -0600 From: Nishanth Menon To: Tom Rini CC: Kamlesh Gurudasani , Sinthu Raja , Neha Malcom Francis , Heinrich Schuchardt , Roger Quadros , Simon Glass , Andrew Davis , Mattijs Korpershoek , Nikhil M Jain , Manorit Chawdhry , Bryan Brattlof , Robert Nelson , , Jon Humphreys , Nishanth Menon Subject: [PATCH V2 05/10] board: ti: am65x: Set fdtfile from C code instead of findfdt script Date: Tue, 9 Jan 2024 13:15:00 -0600 Message-ID: <20240109191506.3820908-6-nm@ti.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240109191506.3820908-1-nm@ti.com> References: <20240109191506.3820908-1-nm@ti.com> 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.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 We now can provide a map and have the standard fdtfile variable set from code itself. This allows for bootstd to "just work". While at this, replace findfdt in environment with a warning as it is no longer needed. Signed-off-by: Nishanth Menon Reviewed-by: Jonathan Humphreys --- Changes from V1: None. I have retained the central call ti_set_fdt_env() to retain the population of fdtfile name using the CONFIG fall back logic and the population of (now deprecated) legacy variables for downstream script users. V1: https://lore.kernel.org/r/20240108173301.2692332-6-nm@ti.com board/ti/am65x/am65x.env | 3 --- board/ti/am65x/evm.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/board/ti/am65x/am65x.env b/board/ti/am65x/am65x.env index 286b9c300c05..814374d68cf0 100644 --- a/board/ti/am65x/am65x.env +++ b/board/ti/am65x/am65x.env @@ -5,9 +5,6 @@ #include #endif -findfdt= - setenv name_fdt ti/k3-am654-base-board.dtb; - setenv fdtfile ${name_fdt} name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x02800000 diff --git a/board/ti/am65x/evm.c b/board/ti/am65x/evm.c index df209021c1b7..3109c9a2acac 100644 --- a/board/ti/am65x/evm.c +++ b/board/ti/am65x/evm.c @@ -22,6 +22,7 @@ #include #include "../common/board_detect.h" +#include "../common/fdt_ops.h" #define board_is_am65x_base_board() board_ti_is("AM6-COMPROCEVM") @@ -141,6 +142,7 @@ static void setup_board_eeprom_env(void) invalid_eeprom: set_board_info_env_am6(name); + ti_set_fdt_env(NULL, NULL); } static int init_daughtercard_det_gpio(char *gpio_name, struct gpio_desc *desc)