diff mbox series

[v2,2/2] spi-nor: add support for is25wp256

Message ID 20180807194059.26348-3-palmer@sifive.com
State Changes Requested
Delegated to: Ambarus Tudor
Headers show
Series spi-nor: add support for is25wp256 | expand

Commit Message

Palmer Dabbelt Aug. 7, 2018, 7:40 p.m. UTC
From: "Wesley W. Terpstra" <wesley@sifive.com>

This is used of the HiFive Unleashed development board, and follows the
pattern of similar ISSI devices already listed.

Signed-off-by: Wesley W. Terpstra <wesley@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
---
 drivers/mtd/spi-nor/spi-nor.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tudor Ambarus Feb. 13, 2019, 5:27 p.m. UTC | #1
Hi,

This one looks pretty good. You'll have to start the patch's subject with "mtd:
spi-nor:" instead of just "spi-nor".

When in doubt, run git log --oneline on the file that you are modifying and see
how previous patches are prefixing the subject.

On 08/07/2018 10:40 PM, Palmer Dabbelt wrote:
> From: "Wesley W. Terpstra" <wesley@sifive.com>
> 
> This is used of the HiFive Unleashed development board, and follows the
> pattern of similar ISSI devices already listed.
>
Please add a comment and let us know how you tested the flash, it's always
comfortable to see that new support was actually tested.

> Signed-off-by: Wesley W. Terpstra <wesley@sifive.com>
> Signed-off-by: Palmer Dabbelt <palmer@sifive.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 aab93463a5e7..f10017b4543d 100644
> --- a/drivers/mtd/spi-nor/spi-nor.c
> +++ b/drivers/mtd/spi-nor/spi-nor.c
> @@ -1072,6 +1072,8 @@ static const struct flash_info spi_nor_ids[] = {
>  			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>  	{ "is25wp128",  INFO(0x9d7018, 0, 64 * 1024, 256,
>  			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> +	{ "is25wp256",  INFO(0x9d7019, 0, 64 * 1024, 512,
> +	                SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

You missed the SPI_NOR_4B_OPCODES flag. The flash has 4B opcodes, let's use them.

Cheers,
ta
Tudor Ambarus Feb. 13, 2019, 5:37 p.m. UTC | #2
On 02/13/2019 07:27 PM, Tudor.Ambarus@microchip.com wrote:
> Hi,
> 
> This one looks pretty good. You'll have to start the patch's subject with "mtd:
> spi-nor:" instead of just "spi-nor".
> 
> When in doubt, run git log --oneline on the file that you are modifying and see
> how previous patches are prefixing the subject.
> 
> On 08/07/2018 10:40 PM, Palmer Dabbelt wrote:
>> From: "Wesley W. Terpstra" <wesley@sifive.com>
>>
>> This is used of the HiFive Unleashed development board, and follows the
>> pattern of similar ISSI devices already listed.
>>
> Please add a comment and let us know how you tested the flash, it's always
> comfortable to see that new support was actually tested.
> 
>> Signed-off-by: Wesley W. Terpstra <wesley@sifive.com>
>> Signed-off-by: Palmer Dabbelt <palmer@sifive.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 aab93463a5e7..f10017b4543d 100644
>> --- a/drivers/mtd/spi-nor/spi-nor.c
>> +++ b/drivers/mtd/spi-nor/spi-nor.c
>> @@ -1072,6 +1072,8 @@ static const struct flash_info spi_nor_ids[] = {
>>  			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>>  	{ "is25wp128",  INFO(0x9d7018, 0, 64 * 1024, 256,
>>  			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>> +	{ "is25wp256",  INFO(0x9d7019, 0, 64 * 1024, 512,
>> +	                SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

don't forget to fix the checkpatch warning when resubmitting:
$ ./scripts/checkpatch.pl --strict v2-2-2-spi-nor-add-support-for-is25wp256.patch 
ERROR: code indent should use tabs where possible
#40: FILE: drivers/mtd/spi-nor/spi-nor.c:1076:
+^I                SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },$

total: 1 errors, 0 warnings, 0 checks, 8 lines checked
> 
> You missed the SPI_NOR_4B_OPCODES flag. The flash has 4B opcodes, let's use them.
> 
> Cheers,
> ta
>
diff mbox series

Patch

diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index aab93463a5e7..f10017b4543d 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -1072,6 +1072,8 @@  static const struct flash_info spi_nor_ids[] = {
 			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 	{ "is25wp128",  INFO(0x9d7018, 0, 64 * 1024, 256,
 			SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+	{ "is25wp256",  INFO(0x9d7019, 0, 64 * 1024, 512,
+	                SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 
 	/* Macronix */
 	{ "mx25l512e",   INFO(0xc22010, 0, 64 * 1024,   1, SECT_4K) },