From: Hui-Ping Chen <hpchen0nvt@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: richard@nod.at, vigneshr@ti.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
nikita.shubin@maquefel.me, arnd@arndb.de, vkoul@kernel.org,
esben@geanix.com, linux-arm-kernel@lists.infradead.org,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/2] mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC
Date: Tue, 22 Oct 2024 17:14:33 +0800 [thread overview]
Message-ID: <38aba46a-c5e5-4832-8a73-4260d5a94b68@gmail.com> (raw)
In-Reply-To: <20241022105109.1906f524@xps-13>
Dear Miquel,
Thank you for your reply.
On 2024/10/22 下午 04:51, Miquel Raynal wrote:
> Hi Hui-Ping,
>
>>>> +
>>>> +static int ma35_nand_write_page_hwecc(struct nand_chip *chip, const u8 *buf,
>>>> + int oob_required, int page)
>>>> +{
>>> The hardware ECC engine should always be disabled by default.
>>>
>>> Then, in these helpers you should:
>>> * enable the ECC engine
>>> * do your things
>>> * disable the ECC engine
>> The ECC engine of the MA35 NAND controller cannot be turned on or off separately.
>>
>> The ECC engine is activated with the DMA,
>>
>> and it calculates and writes to the OOB during the transfer.
> What about:
>
> ECC Algorithm Enable Bit [23] ECCEN
>
> This field is used to select the ECC algorithm for data
> protecting. The BCH algorithm can correct 8 or 12 or 24 bits.
> 0 = BCH code encode/decode Disabled.
> 1 = BCH code encode/decode Enabled.
>
> ?
That's right, this bit represents this meaning, but ECC operations will
only occur when DMA is activated.
I will add enable/disable ECC engine before and after reading/writing
the page.
> Thanks,
> Miquèl
Best regards,
Hui-Ping Chen
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2024-10-22 9:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-18 2:25 [PATCH v7 0/2] Add support for nuvoton ma35 nand controller Hui-Ping Chen
2024-10-18 2:25 ` [PATCH v7 1/2] dt-bindings: mtd: nuvoton,ma35d1-nand: add new bindings Hui-Ping Chen
2024-10-18 2:25 ` [PATCH v7 2/2] mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC Hui-Ping Chen
2024-10-18 9:40 ` Sascha Hauer
2024-10-21 2:09 ` Hui-Ping Chen
2024-10-21 8:44 ` Miquel Raynal
2024-10-22 2:12 ` Hui-Ping Chen
2024-10-22 8:51 ` Miquel Raynal
2024-10-22 9:14 ` Hui-Ping Chen [this message]
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=38aba46a-c5e5-4832-8a73-4260d5a94b68@gmail.com \
--to=hpchen0nvt@gmail.com \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=esben@geanix.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=nikita.shubin@maquefel.me \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=vigneshr@ti.com \
--cc=vkoul@kernel.org \
/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