linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: shiva.linuxworks@gmail.com
Cc: vigneshr@ti.com, bbrezillon@kernel.org, richard@nod.at,
	linux-kernel@vger.kernel.org, frieder.schrempf@kontron.de,
	marek.vasut@gmail.com, linux-mtd@lists.infradead.org,
	computersforpeace@gmail.com, dwmw2@infradead.org,
	Shivamurthy Shastri <sshivamurthy@micron.com>
Subject: Re: [PATCH 1/1] mtd: spinand: Add support for new Micron SPI NAND devices
Date: Thu, 9 Jan 2020 16:48:21 +0100	[thread overview]
Message-ID: <20200109164821.0e5f0796@xps13> (raw)
In-Reply-To: <20191209064223.10003-2-sshivamurthy@micron.com>

Hi Shiva,

shiva.linuxworks@gmail.com wrote on Mon,  9 Dec 2019 07:42:23 +0100:

> From: Shivamurthy Shastri <sshivamurthy@micron.com>
> 
> Add device table for new Micron SPI NAND devices. While at it, add
> support to the multi-die selection. Also, generalize the OOB layout
> structure and function names.

Sorry for the delay. I am fine with this patch mostly, but could we
split it please?

O/ Disable continuous read feature (one typo, see below). I think this
might be considered as a fix.

1/ Generalize the OOB layout structure and function names.
2/ Add support for all the parts.
3/ Add multi-die support (one comment below about that).

As a general rule of thumb, small patches, doing one logic change are
much easier and quick to review and accept.


> +static int micron_select_target(struct spinand_device *spinand,
> +				unsigned int target)
> +{
> +	struct spi_mem_op op = SPINAND_SET_FEATURE_OP(0xd0,
> +						      spinand->scratchbuf);
> +
> +	if (target == 1)
> +		*spinand->scratchbuf = 0x40;

Please define 0x40 and explain clearly with a comment that this is
multi-die selection.

> +
> +	return spi_mem_exec_op(spinand->spimem, &op);
> +}
> +

[...]

> +static int micron_spinand_init(struct spinand_device *spinand)
> +{
> +	/*
> +	 * M70A series device enables Continuos Read feature on Power-up,
> +	 * which is not supported here. Making this BIT disable will avoid
> +	 * any possible failure.

What about:

           M70A device series enable Continuous Read feature at
           power-up, which is not supported. Disable this bit to
	   avoid any possible failure.

> +	 */
> +	return spinand_upd_cfg(spinand, CFG_QUAD_ENABLE, 0);
> +}
> +
>  static const struct spinand_manufacturer_ops micron_spinand_manuf_ops = {
>  	.detect = micron_spinand_detect,
> +	.init = micron_spinand_init,
>  };
>  
>  const struct spinand_manufacturer micron_spinand_manufacturer = {

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      reply	other threads:[~2020-01-09 15:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09  6:42 [PATCH 0/1] Add new series Micron SPI NAND devices shiva.linuxworks
2019-12-09  6:42 ` [PATCH 1/1] mtd: spinand: Add support for new " shiva.linuxworks
2020-01-09 15:48   ` Miquel Raynal [this message]

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=20200109164821.0e5f0796@xps13 \
    --to=miquel.raynal@bootlin.com \
    --cc=bbrezillon@kernel.org \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=frieder.schrempf@kontron.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marek.vasut@gmail.com \
    --cc=richard@nod.at \
    --cc=shiva.linuxworks@gmail.com \
    --cc=sshivamurthy@micron.com \
    --cc=vigneshr@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).