public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@denx.de>
To: SCHNEIDER Johannes <johannes.schneider@leica-geosystems.com>
Cc: "Fabio Estevam" <festevam@gmail.com>,
	"Pali Rohár" <pali@kernel.org>,
	"Tim Harvey" <tharvey@gateworks.com>,
	u-boot@lists.denx.de, peng.fan@oss.nxp.com, sbabic@denx.de,
	trini <trini@konsulko.com>,
	GEO-CHHER-bsp-development
	<bsp-development.geo@leica-geosystems.com>,
	"Peng Fan" <peng.fan@nxp.com>
Subject: Re: [PATCH v5 2/2] serial: mxc: have putc use the TXFIFO
Date: Wed, 02 Nov 2022 11:20:44 -0300	[thread overview]
Message-ID: <399871b65393a70ab31bee97fb118475@denx.de> (raw)
In-Reply-To: <DB6PR06MB40080BA5BC32CDD19980C4ECBC399@DB6PR06MB4008.eurprd06.prod.outlook.com>

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

  reply	other threads:[~2022-11-02 14:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 12:15 [PATCH v5 0/2] serial_mxc: fixing reception Johannes Schneider
2022-09-06 12:15 ` [PATCH v5 1/2] serial: mxc: enable the RX pipeline Johannes Schneider
2022-09-18 20:40   ` sbabic
2022-09-06 12:15 ` [PATCH v5 2/2] serial: mxc: have putc use the TXFIFO Johannes Schneider
2022-09-18 20:41   ` sbabic
2022-10-25 19:18   ` Tim Harvey
2022-10-25 20:23     ` Pali Rohár
2022-10-25 20:37       ` Fabio Estevam
2022-10-25 21:37         ` Tim Harvey
2022-10-25 21:48           ` Fabio Estevam
2022-10-25 22:19           ` Fabio Estevam
2022-10-26 10:10             ` Peng Fan
2022-10-26 10:15               ` Fabio Estevam
2022-10-26 17:45             ` Pali Rohár
2022-10-26 22:22               ` SCHNEIDER Johannes
2022-10-26 22:26                 ` Pali Rohár
2022-11-01 20:39                 ` Fabio Estevam
2022-11-02  5:16                   ` SCHNEIDER Johannes
2022-11-02 12:15                     ` Fabio Estevam
2022-11-02 12:38                       ` SCHNEIDER Johannes
2022-11-02 14:20                         ` Fabio Estevam [this message]
2022-11-02 17:24                           ` Pali Rohár
2022-11-02 18:37                             ` Fabio Estevam
2022-11-03  6:17                               ` SCHNEIDER Johannes
2022-11-03  8:35                                 ` TERTYCHNYI Grygorii
2022-11-03  8:47                                   ` Pali Rohár
2022-11-03 11:14                                 ` Fabio Estevam
2022-11-07 21:17                                   ` Fabio Estevam
2022-11-08  9:37                                     ` SCHNEIDER Johannes
2022-11-08 11:55                                       ` Fabio Estevam
2022-10-25 21:41         ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=399871b65393a70ab31bee97fb118475@denx.de \
    --to=festevam@denx.de \
    --cc=bsp-development.geo@leica-geosystems.com \
    --cc=festevam@gmail.com \
    --cc=johannes.schneider@leica-geosystems.com \
    --cc=pali@kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=sbabic@denx.de \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox