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 83517C77B61 for ; Mon, 10 Apr 2023 08:21:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1CC92850CF; Mon, 10 Apr 2023 10:20:55 +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="YqM5tdHI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 73F13850CF; Mon, 10 Apr 2023 10:20:43 +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 E9E5D84D04 for ; Mon, 10 Apr 2023 10:20:36 +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 fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33A8KYtp105588; Mon, 10 Apr 2023 03:20:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681114834; bh=Cr7Gk2yiLUqb6dZHbHx34dd7MTsn3xr3HXaPF7Stf9g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=YqM5tdHIMK6VTcJelrYOKQxtoX/uoT0XU14dFmpIBg6/D7/Ys76mM0TMlusVEiH9S GX12VSIgcPrnnjX+ck/y/JNjB58EIZUjpNkcBPsXm4ULnDr3wahHqgYVwIOdTyKsew 1pD3icpimtSv63ucPB75WSa0ViW3XYTCRn+9Afu0= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33A8KYOT042330 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 03:20:34 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 10 Apr 2023 03:20:33 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE109.ent.ti.com (10.64.6.30) 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; Mon, 10 Apr 2023 03:20:33 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33A8KX7Y124948; Mon, 10 Apr 2023 03:20:33 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH 3/4] board: ti: am62x: evm: Add necessary functions to call splash screen Date: Mon, 10 Apr 2023 13:50:20 +0530 Message-ID: <20230410082021.25246-4-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410082021.25246-2-n-jain1@ti.com> References: <20230410082021.25246-2-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 To enable splash screen on AM62x at a53 SPL setup DRAM, set page table, enable cache to allow copying of bmp image to frame buffer and display it using splash_display. Signed-off-by: Nikhil M Jain --- board/ti/am62x/evm.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 20b2a70122..e3c80c5c67 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -53,6 +54,44 @@ 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; + + 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 defined(CONFIG_K3_AM64_DDRSS) static void fixup_ddr_driver_for_ecc(struct spl_image_info *spl_image) { -- 2.34.1