mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: uol@pengutronix.de
Subject: Re: [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064
Date: Wed, 15 May 2019 12:33:30 +0200	[thread overview]
Message-ID: <578a54e7-a67e-094b-1712-3cfaea26222a@pengutronix.de> (raw)
In-Reply-To: <20190515101058.13106-2-a.fatoum@pengutronix.de>

On 15/5/19 12:10, Ahmad Fatoum wrote:
> From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> 
> The datasheet is publically available at
> http://www.issi.com/WW/pdf/IS25LP032-064-128.pdf. The parameters fit to
> what is already available for IS25LP128/256.

Unfortunately, this doesn't apply to barebox, where is25lp128 was first
added without the SECT_4K.

Adding it now after the fact, would break barebox state if it were located
on such a flash under the precondition that barebox is configured with
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS, but Linux isn't.

Having inconsistent values between kernel and barebox for
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is wrong anyway, but I am wary of making
it worse, so I refrained here from changing the flags parameter.

I intend to correct this when the barebox state binding is extended to support
a backend-erasesize property in the device tree.

Three more NOR flashes are affected[1] by the same problem of
lacking SECT_4K in barebox, but not in kernel:

en25s64, n25q128a11, n25q128a13

If no one beats me to it, I will see if I can find time to add
backend-erasesize next month.

[1]: wdiff $BAREBOXdrivers/mtd/spi-nor/spi-nor.c \
           $LINUX/drivers/mtd/spi-nor/spi-nor.c | grep '{+.*4K.*+}

Cheers
Ahmad

> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> Origin: Linux v5.0-rc1, commit:4cc106f8f245bae0c458224804733240cb22394d
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/mtd/spi-nor/spi-nor.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
> index b142197b65b6..d95c1b156c9f 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -671,6 +671,8 @@ static const struct spi_device_id spi_nor_ids[] = {
>  	{ "640s33b",  INFO(0x898913, 0, 64 * 1024, 128, 0) },
>  
>  	/* ISSI */
> +	{ "is25lp032", INFO(0x9d6016,  0,  64 * 1024,  64, SECT_4K | SPI_NOR_DUAL_READ) },
> +	{ "is25lp064", INFO(0x9d6017,  0,  64 * 1024, 128, SECT_4K | SPI_NOR_DUAL_READ) },
>  	{ "is25lp128", INFO(0x9d6018,  0,  64 * 1024, 256, 0) },
>  
>  	/* Macronix */
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2019-05-15 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 10:10 [PATCH 1/2] mtd: spi-nor: fix ISSI nor flash name Ahmad Fatoum
2019-05-15 10:10 ` [PATCH 2/2] mtd: spi-nor: Add support for IS25LP032/064 Ahmad Fatoum
2019-05-15 10:33   ` Ahmad Fatoum [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=578a54e7-a67e-094b-1712-3cfaea26222a@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=uol@pengutronix.de \
    /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