From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iF14h-0001rL-W6 for barebox@lists.infradead.org; Mon, 30 Sep 2019 19:11:13 +0000 Received: by mail-io1-xd41.google.com with SMTP id u8so41238613iom.5 for ; Mon, 30 Sep 2019 12:11:11 -0700 (PDT) MIME-Version: 1.0 References: <20190930080748.29977-1-andrew.smirnov@gmail.com> <20190930190842.zuxu6lt6tqnbe3pn@pengutronix.de> In-Reply-To: <20190930190842.zuxu6lt6tqnbe3pn@pengutronix.de> From: Andrey Smirnov Date: Mon, 30 Sep 2019 12:10:59 -0700 Message-ID: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] mci: imx-esdhc-pbl: Fix watermark level value for i.MX To: Sascha Hauer Cc: Barebox List , Chris Healy , Ruslan Sushko On Mon, Sep 30, 2019 at 12:08 PM Sascha Hauer wrote: > > On Mon, Sep 30, 2019 at 01:07:48AM -0700, Andrey Smirnov wrote: > > Layerscape and i.MX have different semantics of Watermark Level > > Register. Whereas the former uses "0" to signify maximum allowed > > value, the latter does not. > > > > According to the RM (i.MX8MQ, i.MX6): > > > > "...The read burst length must be less than or equal to the read > > watermark level.." > > > > Setting Watermark Level Register to zero violates that limitation. It > > appears that, on i.MX8MQ, not following that rule causes certain > > configs + toolchains to result in non-bootable image. Specifically, > > polling for CICHB, CIDHB and DLA to clear in esdhc_send_cmd() times > > out. There doesn't appear to be any clear relationship as to what kind > > of image will have the problem, but the following combinations failed > > to boot on ZII i.MX8MQ Zest board: > > > > - gcc version 9.2.1 20190827 (Red Hat Cross 9.2.1-1) (GCC) + > > imx_v8_defconfig + CONFIG_DEBUG_LL and CONFIG_PBL_CONSOLE > > > > - gcc version 5.5.0 (Timesys 20190405) (custom toolchain) + > > imx_v8_defconfig > > > > Setting WML's *_BRST_LE to 16 and *_WML to 128 on i.MX resolves the > > issue (same setting that's selected by writing 0 on Layerscape). > > > > Fixes: 48562aeaa8 ("esdhc-xload: check for PRSSTAT_BREN only after each block") > > Cc: Chris Healy > > Cc: Ruslan Sushko > > Signed-off-by: Andrey Smirnov > > --- > > > > Sascha: > > > > I don't have a very good explanation as to why those particuar > > toolchain + config settings cause problems and it's not clear how the > > IP block interprets those illegal values since RM is silent on that. I > > spent a solid chunk of time trying to figure that out without much > > luck, so I figured that maybe, given that mismatch is pretty clear > > from comparing two datasheets, this fix can go in without having one. > > > > If this patch is a acceptable, I think it should also go to master > > since it fixes boot break > > I checked both reference manuals and it's clear that we do the wrong > thing on i.MX currently, so I am fine with the patch. It seems that you > have forgotten to set wrap_wml to 1 for layerscape though. > Ugh! Will fix in v2. Thanks, Andrey Smirnov _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox