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 CC619C76196 for ; Mon, 10 Apr 2023 08:50:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1D816857D2; Mon, 10 Apr 2023 10:49:46 +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="GrY5vrUD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9AA3E854CF; Mon, 10 Apr 2023 10:49:30 +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 D1A7385627 for ; Mon, 10 Apr 2023 10:49:25 +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 lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nMPP040652; Mon, 10 Apr 2023 03:49:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681116562; bh=n4yLPy5r0fTgV7pxe6qDOOnZrQs/dtRY9pkny0TVbvg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GrY5vrUD2XYrTAI8RdfzrqHNKx6sVJqf3YEfGh1WvDQkEpnlUeGzN9BbWhNwLSoBg n5mWmmqWRbSbMOMZHMOTLO1OodKhrqxexseLXWQTkC2PU/RY8j8aj6TAfA51YWxVuY BA3XAutKklaxgpSiPtGs7RfOUDWFpLEXfwQEDIo0= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33A8nMaP015185 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Apr 2023 03:49:22 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE115.ent.ti.com (10.64.6.36) 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:49:22 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE112.ent.ti.com (10.64.6.33) 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:49:22 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33A8nLYJ036765; Mon, 10 Apr 2023 03:49:22 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH V2 3/4] board: ti: am62x: evm: Add necessary functions to call splash screen Date: Mon, 10 Apr 2023 14:19:12 +0530 Message-ID: <20230410084913.35116-4-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410084913.35116-1-n-jain1@ti.com> References: <20230410084913.35116-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 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 --- V2: - No change. 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