[PATCH v10 04/10] mtd: nand: omap: fix device scan: NAND_CMD_READID, NAND_CMD_RESET, CMD_CMD_PARAM use only x8 bus
Ezequiel Garcia
ezequiel.garcia at free-electrons.com
Wed Oct 23 06:24:58 PDT 2013
Hi Gupta,
On Wed, Oct 23, 2013 at 01:15:20PM +0000, Gupta, Pekon wrote:
> Hi,
>
> > From: Ezequiel Garcia [mailto:ezequiel.garcia at free-electrons.com]
> [...]
> > FWIW, I have a Beaglebone with a 16-bit bus NAND attached to it.
> >
> > Coincidentally, yesterday I was doing some tests as I'm ramping up the
> > NAND and I found that weird double nand_scan_ident() call.
> > The whole thing looks buggy to me, so I'm happy to help, review, test
> > and patches to take care of this.
> >
> Yes, thanks .. that would be of great help..
> And may be your experience of Atmel drivers would help me here..
>
It's not Atmel, but Marvell :-)
> *Correct, should not be double calls to nand_scan_ident()..*
> But there is a constrain in nand_base.c, that it does not allow ONFI
> page reading in x16 mode.. So how to overcome that..
>
> I see the similar implementation in your ATMEL driver, it does not use
> NAND_BUSWIDTH_AUTO so how do you perform ONFI read
> for x16 devices ?
> drivers/mtd/nand/atmel_nand.c @@atmel_nand_probe()
> /* here you move to x16 mode based on your DT or platform data */
> if (host->board.bus_width_16) /* 16-bit bus width */
> nand_chip->options |= NAND_BUSWIDTH_16;
> /* And then you call nand_scan_ident */
> /* first scan to find the device and get the page size */
> if (nand_scan_ident(mtd, 1, NULL)) {
> res = -ENXIO;
> goto err_scan_ident;
> }
>
> Wouldn't this fail, _unless_ your device is listed in nand_flash_id[] ?
> because it would not be able to read ONFI params..
> Refer below commit..
> commit 0ce82b7f7b7373b16ecf7b5725e21e2975204500
> Author: Matthieu CASTET <matthieu.castet at parrot.com>
> AuthorDate: 2013-01-16
>
>
Not my driver, but I'm taking a look at it now. Not sure if I'll get
into something here.
>
>
> > I'm using some TI SDK with some ancient v3.2.x (with no git history!),
> > but from this discussion it seems the issue is still present in
> > mainline.
> >
> Aah sorry, then you might have some problem here in rebasing the
> patches. But still if you can, thanks much ..
>
I'm currently trying mainline (just for this issue not for my product).
I just need some time to prepare the bootargs and write a DT node for
the NAND cape.
Again, not sure if I'll make some progress, but I'll give it a shot :-)
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
More information about the linux-mtd
mailing list