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 344A1C77B6E for ; Fri, 14 Apr 2023 06:06:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1917885E3B; Fri, 14 Apr 2023 08:06:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1681452401; bh=BuFpFTLrPJtyQlKF+ZV5WYqLkQEqvmWfxmI7MsxOXlE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=xywtS2Q2xREVkTvbv0TTUL5LxgyWkNFvMseP4teaejDZu3RJ4Hg6ugY17YP3wnWaZ USjFm4qzA9xIUUcscBUCLNYfTgGF3u1T7HXx7S2LywaHdkA+bE5G225+l0yIJ8mrwe IFIC1qFhfYK2+UQS4E6LixmEkkKBQeqTh58sTRB9knF9rbzYgMKYqh5YW8PbROrGzu fKOrvNppMHuX/JaXqeUQEHJ9VXSoDsmnw9WO0SZoeQsnczreOs4DmRkzwE3JR74Bu+ 7mCQLFkZfE564WLLcPASiX7lB/BQo4IoEo8GICyzHOKSAnwSpzLII4YpJYj6qrXUDH ru0MOfs44KYaQ== Received: by phobos.denx.de (Postfix, from userid 109) id 69E0C85B6E; Fri, 14 Apr 2023 08:06:39 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [80.241.59.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BA05785E45 for ; Fri, 14 Apr 2023 08:06:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp1.mailbox.org (unknown [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4PyQtp1vvQz9sVL; Fri, 14 Apr 2023 08:06:26 +0200 (CEST) Message-ID: <7aa2630a-e862-32b3-25c7-e5090ac807a6@denx.de> Date: Fri, 14 Apr 2023 08:06:25 +0200 MIME-Version: 1.0 Subject: Re: [PATCH] ddr: marvell: a38x: Perform DDR training sequence again for 2nd boot Content-Language: en-US To: Tony Dinh , U-Boot Mailing List , =?UTF-8?B?UGFsaSBSb2jvv71y?= Cc: Jaehoon Chung , Tom Rini , =?UTF-8?Q?Marek_Beh=ef=bf=bdn?= , Michael Trimarchi , Chris Packham , Mark Kettenis , Martin Rowe , Simon Glass References: <20230403044233.25863-1-mibodhi@gmail.com> From: Stefan Roese In-Reply-To: <20230403044233.25863-1-mibodhi@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 4/3/23 06:42, Tony Dinh wrote: > - DDR Training sequence happens very fast. The speedup in boot time is > negligible by skipping the training sequence during 2nd boot or after. > So remove the check and skip. > - This change improves the robustness of DDR training. If u-boot crashed > during DDR training, the training could be left in a limbo state, where > the BootROM has recorded that it is already in a 2nd boot. The training > must be repeated in this scenario to get out of this limbo state, but due > to the check it cannot be performed. > > Signed-off-by: Tony Dinh Applied to u-boot-marvell/master Thanks, Stefan > --- > > drivers/ddr/marvell/a38x/mv_ddr_plat.c | 7 ------- > 1 file changed, 7 deletions(-) > > diff --git a/drivers/ddr/marvell/a38x/mv_ddr_plat.c b/drivers/ddr/marvell/a38x/mv_ddr_plat.c > index 6e7949ac72..8ec9fb0874 100644 > --- a/drivers/ddr/marvell/a38x/mv_ddr_plat.c > +++ b/drivers/ddr/marvell/a38x/mv_ddr_plat.c > @@ -1363,13 +1363,6 @@ int mv_ddr_pre_training_soc_config(const char *ddr_type) > DRAM_RESET_MASK_MASKED << DRAM_RESET_MASK_OFFS); > } > > - /* Check if DRAM is already initialized */ > - if (reg_read(REG_BOOTROM_ROUTINE_ADDR) & > - (1 << REG_BOOTROM_ROUTINE_DRAM_INIT_OFFS)) { > - printf("%s Training Sequence - 2nd boot - Skip\n", ddr_type); > - return MV_OK; > - } > - > /* Fix read ready phases for all SOC in reg 0x15c8 */ > reg_val = reg_read(TRAINING_DBG_3_REG); > Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de