[v4,1/3] mtd: spi-nor: Extend SFDP 4byte address instruction lookup table with new octal modes as per JEDEC JESD216F

Message ID 20221202135539.271936-2-nathan.morrison@timesys.com
State New
Headers
Series mtd: spi-nor: Extend SFDP to support additional octal modes as per latest JEDEC standard |

Commit Message

Nathan Barrett-Morrison Dec. 2, 2022, 1:55 p.m. UTC
  This adds the new bit fields for
reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D
programming: 1S-1S-8S, 1S-8S-8S

Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
---
 drivers/mtd/spi-nor/sfdp.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Michael Walle Dec. 2, 2022, 3:13 p.m. UTC | #1
Am 2022-12-02 14:55, schrieb Nathan Barrett-Morrison:
> This adds the new bit fields for
> reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D
> programming: 1S-1S-8S, 1S-8S-8S
> 
> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>

Reviewed-by: Michael Walle <michael@walle.cc>
  
Tudor Ambarus Dec. 26, 2022, 8:12 a.m. UTC | #2
Looks good.

On 02.12.2022 15:55, Nathan Barrett-Morrison wrote:
> This adds the new bit fields for
> reading: 1S-1S-8S, 1S-8S-8S, 1D-8D-8D
> programming: 1S-1S-8S, 1S-8S-8S
> 

We usually aim to have ~60 chars for the subject line and 75 chars per
line for the commit message. If you want to reword both, fine, otherwise
I'll do it when applying.

> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
> ---
>   drivers/mtd/spi-nor/sfdp.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c
> index 2257f1b4c2e2..e4e87815ba94 100644
> --- a/drivers/mtd/spi-nor/sfdp.c
> +++ b/drivers/mtd/spi-nor/sfdp.c
> @@ -953,11 +953,16 @@ static int spi_nor_parse_4bait(struct spi_nor *nor,
>   		{ SNOR_HWCAPS_READ_1_1_1_DTR,	BIT(13) },
>   		{ SNOR_HWCAPS_READ_1_2_2_DTR,	BIT(14) },
>   		{ SNOR_HWCAPS_READ_1_4_4_DTR,	BIT(15) },
> +		{ SNOR_HWCAPS_READ_1_1_8,       BIT(20) },
> +		{ SNOR_HWCAPS_READ_1_8_8,       BIT(21) },
> +		{ SNOR_HWCAPS_READ_1_8_8_DTR,   BIT(22) },
>   	};
>   	static const struct sfdp_4bait programs[] = {
>   		{ SNOR_HWCAPS_PP,		BIT(6) },
>   		{ SNOR_HWCAPS_PP_1_1_4,		BIT(7) },
>   		{ SNOR_HWCAPS_PP_1_4_4,		BIT(8) },
> +		{ SNOR_HWCAPS_PP_1_1_8,         BIT(23) },
> +		{ SNOR_HWCAPS_PP_1_8_8,         BIT(24) },
>   	};
>   	static const struct sfdp_4bait erases[SNOR_ERASE_TYPE_MAX] = {
>   		{ 0u /* not used */,		BIT(9) },
  

Patch

diff --git a/drivers/mtd/spi-nor/sfdp.c b/drivers/mtd/spi-nor/sfdp.c
index 2257f1b4c2e2..e4e87815ba94 100644
--- a/drivers/mtd/spi-nor/sfdp.c
+++ b/drivers/mtd/spi-nor/sfdp.c
@@ -953,11 +953,16 @@  static int spi_nor_parse_4bait(struct spi_nor *nor,
 		{ SNOR_HWCAPS_READ_1_1_1_DTR,	BIT(13) },
 		{ SNOR_HWCAPS_READ_1_2_2_DTR,	BIT(14) },
 		{ SNOR_HWCAPS_READ_1_4_4_DTR,	BIT(15) },
+		{ SNOR_HWCAPS_READ_1_1_8,       BIT(20) },
+		{ SNOR_HWCAPS_READ_1_8_8,       BIT(21) },
+		{ SNOR_HWCAPS_READ_1_8_8_DTR,   BIT(22) },
 	};
 	static const struct sfdp_4bait programs[] = {
 		{ SNOR_HWCAPS_PP,		BIT(6) },
 		{ SNOR_HWCAPS_PP_1_1_4,		BIT(7) },
 		{ SNOR_HWCAPS_PP_1_4_4,		BIT(8) },
+		{ SNOR_HWCAPS_PP_1_1_8,         BIT(23) },
+		{ SNOR_HWCAPS_PP_1_8_8,         BIT(24) },
 	};
 	static const struct sfdp_4bait erases[SNOR_ERASE_TYPE_MAX] = {
 		{ 0u /* not used */,		BIT(9) },