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 B193AC7EE2E for ; Fri, 9 Jun 2023 11:53:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31A41861D9; Fri, 9 Jun 2023 13:52:19 +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="phoWOdNE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1047F8619C; Fri, 9 Jun 2023 13:51:58 +0200 (CEST) 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 95BC3861A4 for ; Fri, 9 Jun 2023 13:51:40 +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=n-jain1@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 359Bpcfl111183; Fri, 9 Jun 2023 06:51:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686311498; bh=a8pQZRabB//5lxyin2pM7sacfbMaBm9uhip+if6xQos=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=phoWOdNEPdK1qUjcW2YH0i+F08s0zVo+WIlI55GqEI6BPyp2se3BksfGu8O1bS95S RzF9KSWmIObUiUpNd+ISDJOLL+/Y2MPPJh2LLVCZqepz8Ps7im0njdD9VG4X7UddvU 2nP3klWwjEKD3u1wLAIjIlW09A/xjeW4ODY9vrfI= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 359BpcrU014001 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Jun 2023 06:51:38 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 9 Jun 2023 06:51:38 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE106.ent.ti.com (157.170.170.36) 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; Fri, 9 Jun 2023 06:51:38 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 359BpaR7018928; Fri, 9 Jun 2023 06:51:37 -0500 From: Nikhil M Jain To: CC: , , , , , Subject: [PATCH V2 3/8] board: ti: am62x: evm: Update function calls for splash screen Date: Fri, 9 Jun 2023 17:21:17 +0530 Message-ID: <20230609115122.14791-4-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609115122.14791-1-n-jain1@ti.com> References: <20230609115122.14791-1-n-jain1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 Use spl_dcache_enable, in place of setup_dram, arch_reserve_mmu to set up pagetable, initialise DRAM and enable Dcache. Signed-off-by: Nikhil M Jain --- V2: - Use CONFIG_SPL_VIDEO in place of CONFIG_SPL_VIDEO_TIDSS to reserve video and call splash at SPL. - Check SPL_SPLASH_SCREEN and SPL_BMP before calling splash display. arch/arm/mach-k3/am625_init.c | 1 + board/ti/am62x/evm.c | 41 +++++++++++++---------------------- 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c index 787fe92295..0e5d44269e 100644 --- a/arch/arm/mach-k3/am625_init.c +++ b/arch/arm/mach-k3/am625_init.c @@ -214,6 +214,7 @@ void board_init_f(ulong dummy) if (ret) panic("DRAM init failed: %d\n", ret); #endif + spl_enable_dcache(); } u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device) diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 34830f445f..d3c1786cd9 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -59,42 +59,31 @@ int dram_init_banksize(void) } #if defined(CONFIG_SPL_BUILD) -#ifdef CONFIG_SPL_VIDEO_TIDSS -static int setup_dram(void) -{ - dram_init(); - dram_init_banksize(); - gd->ram_base = CFG_SYS_SDRAM_BASE; - gd->ram_top = gd->ram_base + gd->ram_size; - gd->relocaddr = gd->ram_top; - return 0; -} - static int video_setup(void) { - ulong addr; - int ret; - addr = gd->relocaddr; + if (CONFIG_IS_ENABLED(VIDEO)) { + ulong addr; + int ret; + + addr = gd->relocaddr; + ret = video_reserve(&addr); + if (ret) + return ret; + debug("Reserving %luk for video at: %08lx\n", + ((unsigned long)gd->relocaddr - addr) >> 10, addr); + gd->relocaddr = addr; + } - ret = video_reserve(&addr); - if (ret) - return ret; - debug("Reserving %luk for video at: %08lx\n", - ((unsigned long)gd->relocaddr - addr) >> 10, addr); - gd->relocaddr = addr; return 0; } -#endif void spl_board_init(void) { -#if defined(CONFIG_SPL_VIDEO_TIDSS) - setup_dram(); - arch_reserve_mmu(); video_setup(); enable_caches(); - splash_display(); -#endif + if (IS_ENABLED(CONFIG_SPL_SPLASH_SCREEN) && IS_ENABLED(CONFIG_SPL_BMP)) + splash_display(); + } #if defined(CONFIG_K3_AM64_DDRSS) -- 2.34.1