[PATCH] mtd: denali: fix write_oob_data() function

Masahiro Yamada yamada.m at jp.panasonic.com
Thu May 15 23:36:54 PDT 2014

Hi Brian,

On Fri, 9 May 2014 19:12:26 -0700
Brian Norris <computersforpeace at gmail.com> wrote:

> On Thu, Apr 17, 2014 at 07:22:54PM +0900, Masahiro Yamada wrote:
> > Since write_oob_data is calling denali_send_pipeline_cmd()
> > with access_type=SPARE_ACCESS, this might has no impact.
> "Might"? Are you sure? Do you have any test results? I don't want to
> change this code based on a whim...

Sorry, I could not make myself understood because of my bad English..

What I wanted to say:
I know this patch has no impact,
but calling denali_send_pipeline_cmd() with transfer_spare=false looks weird.
So I want to fix it just in case.

I referred Denali(Cadence) NAND Flash Memory Controller User's Guide
and actually I am sure this patch has no impact.

The 3rd argument (transfer_spare) of denali_send_pipeline_cmd()
is don't care  if  its 4th argument to  is access_type=SPARE_ACCESS.

read_oob_data() function calls 
  denali_send_pipeline_cmd(denali, false, true, SPARE_ACCESS, DENALI_READ)

So, write_oob_data() function should call
  denali_send_pipeline_cmd(denali, false, true, SPARE_ACCESS, DENALI_WRITE)
for consistency.

Best Regards
Masahiro Yamada

More information about the linux-mtd mailing list