[PATCH v2 3/3] mtd: spi-nor: s25fl512s: Set a page size of 512

Cyrille Pitchen cyrille.pitchen at wedev4u.fr
Tue Aug 1 09:49:08 PDT 2017


Hi Mark,

Le 14/02/2017 à 16:35, mark.marshall at omicronenergy.com a écrit :
> From: Mark Marshall <mark.marshall at omicronenergy.com>
> 
> This device has a write page size of 512.  Changing this from 256 to 512
> almost doubles the write performance of the flash.

This issue should be fixed now parsing the SFDP tables of the s25fl512s
memory part. Indeed bits[7:4] of DWORD11 in the Basic Flash Parameter
Table encode the actual page size for Page Program operations.

This value overrides the one read from info->page_size.

Best regards,

Cyrille

> 
> Signed-off-by: Mark Marshall <mark.marshall at omicronenergy.com>
> ---
>  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 467dc93..ba4d7b7 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -1056,6 +1056,8 @@ static const struct flash_info spi_nor_ids[] = {
>  	{ "s25fl256s0", INFO(JEDEC_ID(0x010219, 0x4d00, 2), 256 * 1024, 128, 0) },
>  	{ "s25fl256s1", INFO(JEDEC_ID(0x010219, 0x4d01, 2),  64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>  	{ "s25fl512s",  INFO(JEDEC_ID(0x010220, 0x4d00, 2), 256 * 1024, 256, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> +	{ "s25fl512s",  INFO_FULL(JEDEC_ID(0x010220, 0x4d00, 2),
> +				  256 * 1024, 256, 512, 0, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>  	{ "s70fl01gs",  INFO(JEDEC_ID(0x010221, 0x4d00, 2), 256 * 1024, 256, 0) },
>  	{ "s25sl12800", INFO(JEDEC_ID(0x012018, 0x0300, 2), 256 * 1024,  64, 0) },
>  	{ "s25sl12801", INFO(JEDEC_ID(0x012018, 0x0301, 2),  64 * 1024, 256, 0) },
> 




More information about the linux-mtd mailing list