From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Naga Sureshkumar Relli <nagasure@xilinx.com>
Cc: "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>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"mmayer@broadcom.com" <mmayer@broadcom.com>,
"rogerq@ti.com" <rogerq@ti.com>,
"ladis@linux-mips.org" <ladis@linux-mips.org>,
"ada@thorsis.com" <ada@thorsis.com>,
"honghui.zhang@mediatek.com" <honghui.zhang@mediatek.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"nagasureshkumarrelli@gmail.com" <nagasureshkumarrelli@gmail.com>,
Michal Simek <michals@xilinx.com>
Subject: Re: [[LINUX PATCH v10] 4/4] mtd: rawnand: pl353: Add basic driver for arm pl353 smc nand interface
Date: Sun, 8 Jul 2018 14:38:36 +0200 [thread overview]
Message-ID: <20180708143836.3eb4af31@xps13> (raw)
In-Reply-To: <MWHPR02MB262302F2D504A4783CF60832AF420@MWHPR02MB2623.namprd02.prod.outlook.com>
Hi Naga,
[...]
> > > > > +
> > > > > + if (csline == NAND_DATA_IFACE_CHECK_ONLY)
> > > > > + return -EINVAL;
> > > >
> > > > Why?
> > > It is similar to
> > > if (chipnr < 0)
> > > return 0;
> >
> > Mmmmmh, no?
> >
> > (return 0) != (return -EINVAL)
> >
> > The core is asking you to check if the controller driver support particular timings (usually
> > ONFI modes 1-5). Returning an error means "I only support the slowest timings" which, I
> > suppose, is wrong. Please fix this and compare the speeds.
> I tried updating the driver as per your comments.
> But I am facing an issue here.
> The part I am using is http://www.cypress.com/file/207521/download.
> This part doesn't support get/set features. But the controller supports it.
> In this case, the frame work is doing like this
> If chip supports set_features, then it issues the ONFI_FEATURE_ADDR_TIMING_MODE other wise not.
Yes because some NAND parts are broken and do not support set feature
while working naturally at an higher rate than the slowest default one.
> In our case it won't and then next it simply changes the controller mode. Hence both are in different timing mode and not
If you look at the table 3.4 of your NAND part specification, you can
see that it supports mode 0-4. Hence the core will suppose it can
switch the controller timings to mode 4. Now, is your controller able
to support these speeds? Maybe it only supports non-EDO modes (0-3)
and mode 4 cannot be achieved?
> Able to communicate with the nand flash device.
> https://elixir.bootlin.com/linux/v4.18-rc3/source/drivers/mtd/nand/raw/nand_base.c#L1285
> Am I missing something?
> Could you please help on this.
>
> The code snippet is like this
> tatic int pl353_setup_data_interface(struct mtd_info *mtd, int csline,
> const struct nand_data_interface *conf)
> {
> sdr = nand_get_sdr_timings(conf);
> if (IS_ERR(sdr)) {
>
> return PTR_ERR(sdr);
> }
> if (csline == NAND_DATA_IFACE_CHECK_ONLY) {
> return 0;
> }
> }
>
> Thanks,
> Naga Sureshkumar Relli.
Thanks,
Miquèl
next prev parent reply other threads:[~2018-07-08 12:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 6:42 [[LINUX PATCH v10] 0/4] Add arm pl353 smc memory and nand driver for xilinx zynq soc Naga Sureshkumar Relli
2018-06-21 6:42 ` [[LINUX PATCH v10] 1/4] Devicetree: Add pl353 smc controller devicetree binding information Naga Sureshkumar Relli
2018-06-24 20:40 ` Boris Brezillon
2018-06-25 8:59 ` Naga Sureshkumar Relli
2018-06-27 11:07 ` Naga Sureshkumar Relli
2018-06-28 6:54 ` Linus Walleij
2018-06-28 7:56 ` Naga Sureshkumar Relli
2018-06-21 6:42 ` [[LINUX PATCH v10] 2/4] memory: pl353: Add driver for arm pl353 static memory controller Naga Sureshkumar Relli
2018-06-28 6:49 ` Linus Walleij
2018-06-28 12:10 ` Naga Sureshkumar Relli
2018-06-28 12:11 ` Naga Sureshkumar Relli
2018-06-28 18:11 ` Linus Walleij
2018-06-21 6:42 ` [[LINUX PATCH v10] 3/4] Documentation: nand: pl353: Add documentation for controller and driver Naga Sureshkumar Relli
2018-06-24 20:54 ` Boris Brezillon
2018-06-25 8:56 ` Naga Sureshkumar Relli
2018-06-25 9:13 ` Boris Brezillon
2018-06-21 6:42 ` [[LINUX PATCH v10] 4/4] mtd: rawnand: pl353: Add basic driver for arm pl353 smc nand interface Naga Sureshkumar Relli
2018-06-27 15:22 ` Miquel Raynal
2018-06-28 5:01 ` Naga Sureshkumar Relli
2018-06-28 7:14 ` Miquel Raynal
2018-06-28 7:37 ` Naga Sureshkumar Relli
2018-07-03 13:00 ` Naga Sureshkumar Relli
2018-07-08 12:38 ` Miquel Raynal [this message]
2018-06-28 7:43 ` Linus Walleij
2018-06-28 12:13 ` Naga Sureshkumar Relli
2018-06-28 18:13 ` Linus Walleij
2018-06-29 4:15 ` Naga Sureshkumar Relli
2018-07-02 13:47 ` Linus Walleij
2018-07-03 4:19 ` 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=20180708143836.3eb4af31@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=ada@thorsis.com \
--cc=boris.brezillon@bootlin.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=f.fainelli@gmail.com \
--cc=honghui.zhang@mediatek.com \
--cc=ladis@linux-mips.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=michals@xilinx.com \
--cc=mmayer@broadcom.com \
--cc=nagasure@xilinx.com \
--cc=nagasureshkumarrelli@gmail.com \
--cc=richard@nod.at \
--cc=rogerq@ti.com \
/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;
as well as URLs for NNTP newsgroup(s).