mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>,
	"mark.rutland@arm.com" <mark.rutland@arm.com>,
	"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"michal.simek@xilinx.com" <michal.simek@xilinx.com>,
	"ezequiel.garcia@free-electrons.com" 
	<ezequiel.garcia@free-electrons.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"rob@landley.net" <rob@landley.net>,
	"galak@codeaurora.org" <galak@codeaurora.org>,
	"computersforpeace@gmail.com" <computersforpeace@gmail.com>,
	"dwmw2@infradead.org" <dwmw2@infradead.org>
Subject: Re: [v7, 1/3] nand: pl353: Add basic driver for arm pl353 smc nand interface
Date: Mon, 24 Oct 2016 22:46:08 -0600	[thread overview]
Message-ID: <20161025044608.GA4929@obsidianresearch.com> (raw)
In-Reply-To: <03CA77BA8AF6F1469AEDFBDA1322A7B764216D8A@XAP-PVEXMBX02.xlnx.xilinx.com>

On Tue, Oct 25, 2016 at 03:58:49AM +0000, Punnaiah Choudary Kalluri wrote:

> > I have hacked the v7 patchset enough to work on 4.8 and hacked it some
> > more to work on my hardware. The driver appears to be in no better
> > shape than the 3.12 out-of-tree Xilinx release I was using previously..
>
> The driver in Xilinx tree works with 4.6 kernel and adopted the
> required

I mean, the driver from the 3.12 Xilinx tree that I last looked
at years ago. This is at v7 now and is still needs lots of work, I did
some fixing, including making parts of it work on 4.8.
You can copy it out of the patch I sent you.

> Changes (may release in 1-2 weeks). Still it need some rework, now a days
> I am seeing many requests from different people for this driver and some of
> Them are using different version of IP as you know this IP has four variants and
> Xilinx is using the pl353 variant.

Well, I am using Xilinx Zynq hardware and care about making that
configuration actually work. This is the last driver I require to use
Zynq with mainline.

It clearly needs more work than just forward porting to 4.8, so please
let me know if you are able to tackle this.

> Let's wait for the next series of patches and Get the patches tested
> with others as well along with the review comments.

You now have 10 review comments from me, please respond to all of them in
your v8 patchset - no sense in continuing to drag this out.

Please cc me on future series.

Jason

> Regards,
> Punnaiah
> > I've attached the ugly, ugly patch I made, it may save you some time
> > when preparing v8.
> > 
> > Commentary:
> >  1) nand_chip already includes mtd_info, no reason for a second one in
> >     the pl353_nand_info struct. The standard accessors mtd_to_nand/etc
> >     should be used instead of priv
> >  2) I hacked out all the ECC stuff from the driver since I don't use
> >     it and it was broken.. Obviously some has to come back, but fixing
> >     other things on this list first will make that much easier and better..
> >  3) pl353_nand_write_page_swecc/pl353_nand_read_page_swecc are pure
> >     outdated copies of the core routines and should not exist in a
> >     driver. This needs to be fixed so nand_scan_tail sets them.
> >     This seems to be a side effect of #9 ?
> >  4) The hacky stuff to detect 2 vs 3 address cycle NAND doesn't work,
> >     and doesn't work without ONFI (see patch for possible fix). The
> >     driver should probably use the same scheme the core code uses..
> >     But this is all a problem because of #10
> >  5) The driver assumes alignment of the iomap, needs to use + not |
> >     when constructing the address. (yes, this blows up on my system)
> >  6) Driver unconditionally sets timing to ONFI mode 0 (slow!)
> >     Maybe timing should be common code driven by DT..
> >  7) Driver unconditionally selects a BBT format, and an ECC layout
> >     (neither match what my system uses, but I guess that is a core mtd
> >     issue these days :/)
> >  8) Driver unconditionally forces a chip-delay (wrong for my
> >     system) maybe this should be common code driven by DT..
> >  9) This buisness with pl353_nand_ecc_init and the
> >     special functions to do PL353_NAND_LAST_TRANSFER_LENGTH stuff
> >     is just horrid. I'd expect that is a big NAK.
> > 
> >     The driver needs to implement read_buf *properly* so the core
> >     routines can be used instead of trying to 'fix' the call sites
> >     to do the PL353_NAND_LAST_TRANSFER_LENGTH stuff.
> >  10) pl353_nand_cmd_function is a wonky copy of nand_command_lp,
> > maybe
> >      this driver should use cmd_ctrl, or the core code should be
> >      refactored some more..

  reply	other threads:[~2016-10-25  4:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 18:08 [PATCH v7 0/3] Add arm pl353 smc nand driver for xilinx zynq soc Punnaiah Choudary Kalluri
2015-06-08 18:08 ` [PATCH v7 1/3] nand: pl353: Add basic driver for arm pl353 smc nand interface Punnaiah Choudary Kalluri
2015-06-15  4:21   ` punnaiah choudary kalluri
2016-10-21 20:33   ` [v7, " Jason Gunthorpe
2016-10-21 21:46     ` Boris Brezillon
2016-10-23 12:07       ` punnaiah choudary kalluri
2016-10-24 12:27         ` Boris Brezillon
2016-10-24 22:59         ` Jason Gunthorpe
2016-10-25  3:58           ` Punnaiah Choudary Kalluri
2016-10-25  4:46             ` Jason Gunthorpe [this message]
2016-10-25  5:02               ` Punnaiah Choudary Kalluri
2015-06-08 18:08 ` [PATCH v7 2/3] nand: pl353: Add software ecc support Punnaiah Choudary Kalluri
2015-06-08 18:08 ` [PATCH v7 3/3] Documentation: nand: pl353: Add documentation for controller and driver Punnaiah Choudary Kalluri
2015-07-08 19:40 ` [PATCH v7 0/3] Add arm pl353 smc nand driver for xilinx zynq soc Josh Cartwright
2015-07-09  5:05   ` Michal Simek

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=20161025044608.GA4929@obsidianresearch.com \
    --to=jgunthorpe@obsidianresearch.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=galak@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=punnaiah.choudary.kalluri@xilinx.com \
    --cc=rob@landley.net \
    /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

Powered by JetHome