All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Naga Sureshkumar Relli <nagasure@xilinx.com>
Cc: "nagasureshkumarrelli@gmail.com" <nagasureshkumarrelli@gmail.com>,
	"boris.brezillon@bootlin.com" <boris.brezillon@bootlin.com>,
	"richard@nod.at" <richard@nod.at>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	Michal Simek <michals@xilinx.com>,
	"Punnaiah Choudary Kalluri" <punnaia@xilinx.com>
Subject: Re: [LINUX PATCH v8 1/2] Documentation: nand: pl353: Add documentation for controller and driver
Date: Thu, 22 Mar 2018 08:31:00 +0100	[thread overview]
Message-ID: <20180322083100.54c67c5f@xps13> (raw)
In-Reply-To: <BY2PR02MB1411BBD9FB5D17BB641D2B89AFA90@BY2PR02MB1411.namprd02.prod.outlook.com>

Hi Naga,

I removed linux-kernel from the cc: list (linux-mtd is enough).

> > > +Since the controller expects that the chipselect bit should be
> > > +cleared for the  
> > 
> >                                          ^chip select   ^ would? is?  
> Will correct in next patch.
> >   
> > > +last data transfer i.e last 4 data bytes, the existing nandbase page  
> > 
> > What is nandbase?  
> It is just nand page read/write, I will correct it,
> >   
> > > +read/write routines for soft ecc and ecc none modes will not work.
> > > +So, inorder  
> > 
> > s/ecc/ECC/                                                   in order^
> >   
> > > +to make this driver work, it always updates the ecc mode as HW ECC
> > > +and can  
> > 
> > s/ecc/ECC/  
> I will update.
> >   
> > > +implemented the page read/write functions for supporting the SW ECC.  
> > 
> > s/can implemented/implements/?  
> Will correct in next patch.
> 
> > 
> > I don't understand this paragraph, can you explain it please? I am not sure to
> > understand the limitation nor how you address it.  
> There is a limitation in SMC, that we must set ECC LAST on last data phase access, 
> to tell ECC block not to expect any data further.
> Ex:  When number of ECC STEP are 4, then till 3 we will write to flash using SMC with HW ECC enabled.
> And for the last ECC STEP, we will subtract 4bytes from page size, and will initiate a transfer.
> And the remaining 4 as one more transfer with ECC_LAST bit set in NAND Data phase register to notify
> ECC block not to expect any more data. The last block should be align with end of 512 byte block.
> Because of this limitation, we are not using core routines.

This is way more understandable, thanks. Can you adapt this
explanation into the documentation?

Otherwise I am still not convinced that you need special handlers for
SW ECC nor raw page accessors as they don't toggle the ECC/ECC_LAST bit
set, so please try to remove them from both the documentation and the
code.

> >   
> > > +
> > > +HW ECC mode:
> > > +	Upto 2K page size is supported and beyond that it retuns -ENOSUPPORT
> > > +error. If the flsh has ONDIE ecc controller then the  
> > 
> >     ^ -ENOTSUPP              ^flash   ^on-die ECC
> >   
> Will correct in next patch.
> > > +priority has given to the ONDIE ecc controller. Also the current  
> > 
> >             ^ is given?      ^on-die ECC
> >   
> Will correct in next patch.
> > > +implementation has support for upto 64 byte oob area  
> > 
> >                                   ^up to 64 bytes of OOB data.
> >   
> Will correct in next patch.
> > > +
> > > +SW ECC mode:
> > > +	It supports all the pgae sizes. But since, zynq soc bootrom uses  
> > 
> >                             ^ page                 ^Zync SOC
> >   
> Will correct in next patch.
> > > +HW ECC for the devices that have pgae size <=2K so, to avoid any ecc
> > > +related  
> > 
> >                                     ^ page <= 2K,               ECC^
> >   
> Will correct in next patch.
> > > +issues during boot, prefer HW ECC over SW ECC.  
> > 
> > I suppose this means that if no ECC mode is given ie. no nand-ecc-mode in the
> > DT, the driver will use HW ECC by default, right?  
> Yes.

Then can you reword to make it clearer? I think you can drop the
"issues during boot" argument and stick to something simple like "When
the kernel is not aware of the ECC mode, use HW ECC by default.

> >   
> > > +
> > > +For devicetree binding information please refer the below dt binding
> > > +file Documentation/devicetree/bindings/memory-controllers/pl353-smc.txt.  
> > 
> > This file does not exist in my tree.  
> Actually this driver has dependency with SMC driver.
> Recently I sent one more patch series, there we will find all these.
> This is for drivers/memory/
> Since SMC controller has two interfaces, Nand and Nor.
> So we have two drivers, one main driver is SMC and the second is NAND driver.
> https://www.spinics.net/lists/kernel/msg2748832.html
> https://www.spinics.net/lists/kernel/msg2748834.html
> https://www.spinics.net/lists/kernel/msg2748840.html

Ok, thanks for pointing the links.

> 
> > 
> > 
> > Thanks for contributing this driver,
> > Miquèl
> > 
> > --
> > Miquel Raynal, Bootlin (formerly Free Electrons) Embedded Linux and Kernel
> > engineering https://bootlin.com  
> 
> Thanks,
> Naga Sureshkumar Relli.



-- 
Miquel Raynal, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-03-22  7:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 10:48 [LINUX PATCH v8 1/2] Documentation: nand: pl353: Add documentation for controller and driver nagasureshkumarrelli
2018-03-14 23:57 ` Randy Dunlap
2018-03-22  4:27   ` Naga Sureshkumar Relli
2018-03-19 21:08 ` Miquel Raynal
2018-03-22  5:36   ` Naga Sureshkumar Relli
2018-03-22  7:31     ` Miquel Raynal [this message]
2018-03-23 13:43       ` Naga Sureshkumar Relli

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=20180322083100.54c67c5f@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=boris.brezillon@bootlin.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=michals@xilinx.com \
    --cc=nagasure@xilinx.com \
    --cc=nagasureshkumarrelli@gmail.com \
    --cc=punnaia@xilinx.com \
    --cc=richard@nod.at \
    /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.