From: Miquel Raynal via U-Boot <u-boot@lists.u-boot-project.org>
To: Johan Jonker <jbx6244@gmail.com>
Cc: u-boot@0leil.net, kever.yang@rock-chips.com, sjg@chromium.org,
dario.binacchi@amarulasolutions.com,
michael@amarulasolutions.com, trini@konsulko.com,
u-boot@lists.denx.de, quentin.schulz@cherry.de,
boogiepop@gmx.com, richard@nod.at
Subject: Re: [PATCH v2] mtd: nand: raw: rockchip_nfc: fix ecc setup
Date: Fri, 24 Jul 2026 11:26:40 +0200 [thread overview]
Message-ID: <87fr18sppr.fsf@bootlin.com> (raw)
In-Reply-To: <fdb929d4-19f9-4aad-ae2d-9d15e2552242@gmail.com> (Johan Jonker's message of "Wed, 22 Jul 2026 11:16:20 +0200")
On 22/07/2026 at 11:16:20 +02, Johan Jonker <jbx6244@gmail.com> wrote:
> Changed References:
> Added Linux MTD maintainers. Question below.
>
> Hi,
>
> On 7/22/26 00:56, Boogie wrote:
>> Hello Quentin
>>
>> I had reported this bug to Johan so i can give detailed explanation.
>>
>> The bug was really the lock of "&& nfc->selected_bank == 0" not existing for write_page_* variants.
>>
>> When rockchip nfc was reading, it required bootblks to be a part of
>> the first nand chip only with the condition "nfc->selected_bank ==
>> 0". But when writing it interpreted 'all' nand chips first boot_blks
>> as boot blocks.
>>
>> The practical problem. I had mentioned this in V1 and give more explicit details here.
>>
>> I have 2 nand chips, and a partition (linux below) starts in nand
>> chip 1 (CS=0 in below) and ends in chip2 (CS=2 below). And i am using
>> UBI on top of that mtd.
>> nand@0 {
>> reg = <0>, <2>;
>> label = "rk-nand-0";
>> nand-bus-width = <8>;
>> nand-ecc-mode = "hw";
>> nand-ecc-step-size = <1024>;
>> nand-ecc-strength = <40>;
>
>> nand-is-boot-medium;
What you may want is to declare the NAND using two different nodes, then
use mtd-virt-concat to generate one bigger MTD device spanning across
the two devices.
The driver should not blindly check the 'cs ==0' condition but instead
also take nand-is-boot-medium into account (which would then only be
required in the NAND chip with the said boot partition) to make sure the
special handling is only applied on the boot partition.
Hope that helps.
Thanks,
Miquèl
next prev parent reply other threads:[~2026-07-24 14:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 6:39 [PATCH v2] mtd: nand: raw: rockchip_nfc: fix ecc setup Johan Jonker
2026-07-20 18:25 ` Quentin Schulz via U-Boot
2026-07-22 9:16 ` Johan Jonker via U-Boot
2026-07-22 11:49 ` Boogie via U-Boot
2026-07-24 9:26 ` Miquel Raynal via U-Boot [this message]
2026-07-25 15:57 ` Boogie
[not found] <e108fe69-533a-4734-8728-b17b172c4be9 () cherry ! de>
2026-07-21 22:56 ` Boogie via U-Boot
2026-07-22 9:28 ` Quentin Schulz via U-Boot
2026-07-22 11:39 ` Boogie via U-Boot
2026-07-22 12:33 ` Quentin Schulz via U-Boot
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=87fr18sppr.fsf@bootlin.com \
--to=u-boot@lists.u-boot-project.org \
--cc=boogiepop@gmx.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=jbx6244@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=michael@amarulasolutions.com \
--cc=miquel.raynal@bootlin.com \
--cc=quentin.schulz@cherry.de \
--cc=richard@nod.at \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@0leil.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.