[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCB3yuyNJD=7UJ7jzf45Masms_PD4sm42YNjO8M4cr+4wg@mail.gmail.com>
Date: Wed, 22 Mar 2023 21:10:12 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Arseniy Krasnov <avkrasnov@...rdevices.ru>
Cc: Liang Yang <liang.yang@...ogic.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Jianxin Pan <jianxin.pan@...ogic.com>,
Yixun Lan <yixun.lan@...ogic.com>,
linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
kernel@...rdevices.ru, oxffffaa@...il.com
Subject: Re: [PATCH v1] mtd: rawnand: meson: fix bitmask for length in command word
Hello Arseniy,
thank you for submitting this fix!
On Wed, Mar 22, 2023 at 7:45 PM Arseniy Krasnov
<avkrasnov@...rdevices.ru> wrote:
>
> Valid mask is 0x3FFF, without this patch the following problems were
> found:
>
> 1) [ 0.938914] Could not find a valid ONFI parameter page, trying
> bit-wise majority to recover it
> [ 0.947384] ONFI parameter recovery failed, aborting
>
> 2) Read with disabled ECC mode was broken.
>
> Fixes: 8fae856c5350 ("mtd: rawnand: meson: add support for Amlogic NAND flash controller")
> Signed-off-by: Arseniy Krasnov <AVKrasnov@...rdevices.ru>
This matches what I can see in the old vendor driver, so:
Acked-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
[...]
> - cmd = (len & GENMASK(5, 0)) | scrambler | DMA_DIR(dir);
> + cmd = (len & GENMASK(13, 0)) | scrambler | DMA_DIR(dir);
My understanding of the vendor driver is that this "len" is only used
for "raw" access (my own words: any access that doesn't use the HW ECC
engine).
As a future improvement (no need to update re-send this patch) it
would be great to have a #define with a meaningful name for
"GENMASK(13, 0)" (maybe something like NFC_CMD_RAW_LENGTH) as it's
used in multiple places now
Best regards,
Martin
Powered by blists - more mailing lists