From mboxrd@z Thu Jan 1 00:00:00 1970 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 79553C433FE for ; Wed, 2 Nov 2022 14:20:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C877B85072; Wed, 2 Nov 2022 15:20:46 +0100 (CET) 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=1667398847; bh=veaW6E2ZXOYb5GTC+RwspABohUJ4diVWuFuBjQILxYc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=wKybe9+xwldWWAuXTmc6kr2h4UubEGtK0qQg5TrpzWn9kNOaLUNHo4gphWJW/IFKT 9s8CFmBssHysWkbJUzpdn7kmKLnurD8Hcn9Q/VfXjIbuXZE186GTuofdKEQfmxXNkJ fdinHXXonbUjDv3L7tm25b1FKqO903/IkEcQtT+HwvHgEjUapYjLlpzLgcGhbyHZRG q6CkQUChLFshWqHfk0GFE+jklfQWKU/18MFlO8LTTipSK6ccP/seHE5NRs9T1eGHii O/5TXi/dqaNp2pSlMrQ3JctqkmcCKuV3vHCJCC5NGdgBWuHVXyWnqyLNXA6nhMaxJl YVVGl7mrOzIxw== Received: from mail.denx.de (unknown [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: festevam@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id EDCE385084; Wed, 2 Nov 2022 15:20:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1667398845; bh=veaW6E2ZXOYb5GTC+RwspABohUJ4diVWuFuBjQILxYc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PKLUJ4/we4QgLj3DRrsTKJtJAECafWFDxOUTLjPL/f0Nxht/IkeG697cMw2K/t2fN /ycrD/03+Xkk5krJ0y63iSRkGmO3cIyxnKhZpKSFR4KX67hQ6yNY6Sn8udqhuZfxaf 96rOsvLL7FsXQoI+WPWVPSDDARZ/z3WbIN03gPEdkJw3p9vxxQAOW+02sCiGL5DxUM o53SmWpEyk7/Aww7hj68FHjb/p5ymGwipjCYDKW2Tg88rx+hNDjUDL6iMavYzAejMY 06pry2GEJiHyNp32+XyYJqY7R2Q4MVe9DN6iz7MclhQ+MLDAwYSmR/iSk+93TZKCBa C9iCYnuDMlxVA== MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 02 Nov 2022 11:20:44 -0300 From: Fabio Estevam To: SCHNEIDER Johannes Cc: Fabio Estevam , =?UTF-8?Q?Pali_Roh=C3=A1r?= , Tim Harvey , u-boot@lists.denx.de, peng.fan@oss.nxp.com, sbabic@denx.de, trini , GEO-CHHER-bsp-development , Peng Fan Subject: Re: [PATCH v5 2/2] serial: mxc: have putc use the TXFIFO In-Reply-To: References: <20220906121504.2200171-1-johannes.schneider@leica-geosystems.com> <20220906121504.2200171-3-johannes.schneider@leica-geosystems.com> <20221025202335.k5isd54j6ubhdglu@pali> <4e715158a0c58e2ae42b7748676851ff@denx.de> <4d9e14631817a586e735e7c9f5a86596@denx.de> <20221026174520.2asymp5xdwg2yitw@pali> Message-ID: <399871b65393a70ab31bee97fb118475@denx.de> X-Sender: festevam@denx.de User-Agent: Roundcube Webmail/1.3.6 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.6 at phobos.denx.de X-Virus-Status: Clean Hi Johannes, On 02/11/2022 09:38, SCHNEIDER Johannes wrote: > sadly that does not reproduce on imx8mm ... a long print works fine > with or without the patch :-S Yes, it does happen on imx8mm. You need to add the print() inside board_init(). Here is a reproducer on imx8mm evk: diff --git a/board/freescale/imx8mm_evk/imx8mm_evk.c b/board/freescale/imx8mm_evk/imx8mm_evk.c index e0975fcda705..69ec723c616e 100644 --- a/board/freescale/imx8mm_evk/imx8mm_evk.c +++ b/board/freescale/imx8mm_evk/imx8mm_evk.c @@ -50,6 +50,7 @@ int board_init(void) if (IS_ENABLED(CONFIG_FEC_MXC)) setup_fec(); + printf("*******************0123456789012345678901234567890123456789\n"); return 0; } The result is: U-Boot SPL 2022.10-00991-gc8d9ff634fc4-dirty (Nov 02 2022 - 11:15:14 -0300) No pmic SEC0: RNG instantiated cyclic_register for watchdog@30280000 failed WDT: Failed to start watchdog@30280000 Trying to boot from MMC1 NOTICE: BL31: v2.6(release):lf-5.15.32-2.0.0-1-g044ea08c0109 NOTICE: BL31: Built : 11:15:02, Nov 2 2022 U-Boot 2022.10-00991-gc8d9ff634fc4-dirty (Nov 02 2022 - 11:15:14 -0300) CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz Reset cause: POR Model: FSL i.MX8MM EVK board DRAM: 2 GiB *******************0123456789012345678901234567890123n�KW�'$HL�� devices, 23 uclasses, devicetree: separate WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout) MMC: FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@30890000 Out: serial@30890000 Err: serial@30890000 SEC0: RNG instantiated Net: eth0: ethernet@30be0000 Hit any key to stop autoboot: 0 u-boot=> As you can see the corruption is clearly seen. >> The RTC line is displayed from drivers/misc/gsc.c and the Core: comes >> from dm_announce. Somehow in between the FIFO does not get drained >> before dm_announce gets called. > > "flushing" shouldn't be an issue, since everything goes through the > same set of registers which the imx queues into its fifo... > i suspect the rootcause lies someplace else? Reverting your change makes the issue disappear. Regards, Fabio Estevam -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: festevam@denx.de