[PATCH v5 06/23] mtd: nand: denali: set NAND_ECC_CUSTOM_PAGE_ACCESS

Masahiro Yamada yamada.masahiro at socionext.com
Thu Jun 8 00:32:48 PDT 2017


Hi Boris

2017-06-07 22:26 GMT+09:00 Boris Brezillon <boris.brezillon at free-electrons.com>:
> On Wed,  7 Jun 2017 20:52:15 +0900
> Masahiro Yamada <yamada.masahiro at socionext.com> wrote:
>
>> The denali_cmdfunc() actually does nothing valuable for
>> NAND_CMD_{PAGEPROG,READ0,SEQIN}.
>>
>> For NAND_CMD_{READ0,SEQIN}, it copies "page" to "denali->page", then
>> denali_read_page() and denali_read_page_raw() compare them to check
>> if the NAND framework called the callbacks in correct order.
>> (Inconsistently, this check is missing from the denali_write_page()
>> and denali_write_page_raw().)
>>
>> The framework is widely tested by many drivers, so this kind of
>> sanity check is unneeded.  The Denali controller is equipped with
>> high level interface for read/write, so let's skip unneeded call
>> of cmdfunc().
>
> I recently changed the semantic of ecc->write_page[_raw]() when
> NAND_ECC_CUSTOM_PAGE_ACCESS is set [1]. I'm not sure your driver waits
> for the program command to finish.
> I think you should wait for INTR_STATUS__PROGRAM_COMP instead of
> INTR_STATUS__DMA_CMD_COMP in write_page() [2], as is done in
> write_oob_data().

Thanks for the pointer.

I missed your commit because I usually develop based on
Linus' tree instead of linux-next.

I will fix this commit.



-- 
Best Regards
Masahiro Yamada



More information about the linux-mtd mailing list