public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add support for more XMC series
@ 2023-08-17 12:46 SSunk
  2023-08-17 13:14 ` Michael Walle
  2023-08-17 13:20 ` Miquel Raynal
  0 siblings, 2 replies; 10+ messages in thread
From: SSunk @ 2023-08-17 12:46 UTC (permalink / raw)
  To: tudor.ambarus, pratyush, michael, miquel.raynal, richard,
	vigneshr
  Cc: linux-mtd, linux-kernel, SSunk

Add XMC XM25QH128C/XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
and set the parse_sfdp flag.

Signed-off-by: Kankan Sun <ssunkkan@gmail.com>
---
 drivers/mtd/spi-nor/xmc.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
index 051411e86339..b2374187ec4f 100644
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
@@ -16,6 +16,22 @@ static const struct flash_info xmc_nor_parts[] = {
 	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
 		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
 			      SPI_NOR_QUAD_READ) },
+	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ) },
+	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
+	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
+	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
+	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
+			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
+
 };
 
 const struct spi_nor_manufacturer spi_nor_xmc = {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-17 12:46 [PATCH] Add support for more XMC series SSunk
@ 2023-08-17 13:14 ` Michael Walle
  2023-08-17 13:20 ` Miquel Raynal
  1 sibling, 0 replies; 10+ messages in thread
From: Michael Walle @ 2023-08-17 13:14 UTC (permalink / raw)
  To: SSunk
  Cc: tudor.ambarus, pratyush, miquel.raynal, richard, vigneshr,
	linux-mtd, linux-kernel, SSunk

Hi,

> Add XMC XM25QH128C/XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
> and set the parse_sfdp flag.
> 
> Signed-off-by: Kankan Sun <ssunkkan@gmail.com>

NAK. You're just posting the same patch over and over again.

Please respond the the former questions and please read
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

-michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-17 12:46 [PATCH] Add support for more XMC series SSunk
  2023-08-17 13:14 ` Michael Walle
@ 2023-08-17 13:20 ` Miquel Raynal
  2023-08-17 17:03   ` SSunk
  1 sibling, 1 reply; 10+ messages in thread
From: Miquel Raynal @ 2023-08-17 13:20 UTC (permalink / raw)
  To: SSunk
  Cc: tudor.ambarus, pratyush, michael, richard, vigneshr, linux-mtd,
	linux-kernel

Hello,

ssunkkan@gmail.com wrote on Thu, 17 Aug 2023 20:46:55 +0800:

> Add XMC XM25QH128C/XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
> and set the parse_sfdp flag.

Please look at the git history and correct the title.

> Signed-off-by: Kankan Sun <ssunkkan@gmail.com>
> ---
>  drivers/mtd/spi-nor/xmc.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
> index 051411e86339..b2374187ec4f 100644
> --- a/drivers/mtd/spi-nor/xmc.c
> +++ b/drivers/mtd/spi-nor/xmc.c
> @@ -16,6 +16,22 @@ static const struct flash_info xmc_nor_parts[] = {
>  	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
>  		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>  			      SPI_NOR_QUAD_READ) },
> +	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> +			      SPI_NOR_QUAD_READ) },
> +	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> +			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> +	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> +			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> +	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> +			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },
> +	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
> +		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
> +			      SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) },

You say you enable SFDP in the commit log but the diff shows the
opposite?

> +
>  };
>  
>  const struct spi_nor_manufacturer spi_nor_xmc = {


Thanks,
Miquèl

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] Add support for more XMC series
  2023-08-17 13:20 ` Miquel Raynal
@ 2023-08-17 17:03   ` SSunk
  2023-08-17 17:10     ` Michael Walle
  0 siblings, 1 reply; 10+ messages in thread
From: SSunk @ 2023-08-17 17:03 UTC (permalink / raw)
  To: miquel.raynal
  Cc: linux-kernel, linux-mtd, michael, pratyush, richard, ssunkkan,
	tudor.ambarus, vigneshr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1777 bytes --]

Add XMC XM25QH128C/XM25QH256C/XM25QU256C/XM25QH512C/XM25QU512C
and set the parse_sfdp flag.

Signed-off-by: Kankan Sun <ssunkkan@gmail.com>
---
Hi Michael,
Since this is the first time I've submitted code to the Linux community, please forgive me for some of the missteps that I've made.
I uploaded the incorrect patch file.
In a previous e-mail you said:
XMC parts seem to have SFDP tables and they should work out of the box
without any patches with the generic spi nor driver [1]. Therefore,
you don't need any entry at all.

I think it is related to the PARSE_SFDP flag.
The XMC flash part supports SFDP, so i don’t need to add NO_SFDP_FLAGS() macro.
 drivers/mtd/spi-nor/xmc.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
index 051411e86339..e78bf11792d9 100644
--- a/drivers/mtd/spi-nor/xmc.c
+++ b/drivers/mtd/spi-nor/xmc.c
@@ -11,11 +11,20 @@
 static const struct flash_info xmc_nor_parts[] = {
 	/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
 	{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
-		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-			      SPI_NOR_QUAD_READ) },
+		PARSE_SFDP },
 	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
-		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
-			      SPI_NOR_QUAD_READ) },
+		PARSE_SFDP },
+	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
+		PARSE_SFDP },
+	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
+		PARSE_SFDP },
+	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
+		PARSE_SFDP },
+	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
+		PARSE_SFDP },
+	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
+		PARSE_SFDP },
+
 };
 
 const struct spi_nor_manufacturer spi_nor_xmc = {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-17 17:03   ` SSunk
@ 2023-08-17 17:10     ` Michael Walle
  2023-08-17 17:17       ` Clus Tom
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Walle @ 2023-08-17 17:10 UTC (permalink / raw)
  To: SSunk
  Cc: miquel.raynal, linux-kernel, linux-mtd, pratyush, richard,
	ssunkkan, tudor.ambarus, vigneshr

Hi,

>> XMC parts seem to have SFDP tables and they should work out of the box
>> without any patches with the generic spi nor driver [1]. Therefore,
>> you don't need any entry at all.
> 
> I think it is related to the PARSE_SFDP flag.
> The XMC flash part supports SFDP, so i don’t needto add
> NO_SFDP_FLAGS() macro.

Correct. If the flash is working with PARSE_SFDP, it has SFDP and
all the information of the flash_info table is pulled from the SFDP
tables, except for the part name. Therefore, you don't need any entry
at all. The flash should just work out of the box. Are you using the
latest kernel?

-michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-17 17:10     ` Michael Walle
@ 2023-08-17 17:17       ` Clus Tom
  2023-08-29  4:56         ` SSunk
  0 siblings, 1 reply; 10+ messages in thread
From: Clus Tom @ 2023-08-17 17:17 UTC (permalink / raw)
  To: Michael Walle
  Cc: miquel.raynal, linux-kernel, linux-mtd, pratyush, richard,
	tudor.ambarus, vigneshr


Yes, I'm using the latest kernel.


> 在 2023年8月18日,01:10,Michael Walle <michael@walle.cc> 写道:
> 
> Hi,
> 
>>> XMC parts seem to have SFDP tables and they should work out of the box
>>> without any patches with the generic spi nor driver [1]. Therefore,
>>> you don't need any entry at all.
>> I think it is related to the PARSE_SFDP flag.
>> The XMC flash part supports SFDP, so i don’t needto add
>> NO_SFDP_FLAGS() macro.
> 
> Correct. If the flash is working with PARSE_SFDP, it has SFDP and
> all the information of the flash_info table is pulled from the SFDP
> tables, except for the part name. Therefore, you don't need any entry
> at all. The flash should just work out of the box. Are you using the
> latest kernel?
> 
> -michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-17 17:17       ` Clus Tom
@ 2023-08-29  4:56         ` SSunk
  2023-08-29  6:48           ` Michael Walle
  0 siblings, 1 reply; 10+ messages in thread
From: SSunk @ 2023-08-29  4:56 UTC (permalink / raw)
  To: ssunkkan
  Cc: linux-kernel, linux-mtd, michael, miquel.raynal, pratyush,
	richard, tudor.ambarus, vigneshr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2085 bytes --]

>Hi Michael,
>Since this is the first time I've submitted code to the Linux community, please forgive me for some of the missteps that I've made.
>I uploaded the incorrect patch file.
>In a previous e-mail you said:
>XMC parts seem to have SFDP tables and they should work out of the box
>without any patches with the generic spi nor driver [1]. Therefore,
>you don't need any entry at all.
>
>I think it is related to the PARSE_SFDP flag.
>The XMC flash part supports SFDP, so i don’t need to add NO_SFDP_FLAGS() macro.
> drivers/mtd/spi-nor/xmc.c | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
>index 051411e86339..e78bf11792d9 100644
>--- a/drivers/mtd/spi-nor/xmc.c
>+++ b/drivers/mtd/spi-nor/xmc.c
>@@ -11,11 +11,20 @@
> static const struct flash_info xmc_nor_parts[] = {
> 	/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
> 	{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
>-		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>-			      SPI_NOR_QUAD_READ) },
>+		PARSE_SFDP },
> 	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
>-		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>-			      SPI_NOR_QUAD_READ) },
>+		PARSE_SFDP },
>+	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
>+		PARSE_SFDP },
>+	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
>+		PARSE_SFDP },
>+	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
>+		PARSE_SFDP },
>+	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
>+		PARSE_SFDP },
>+	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
>+		PARSE_SFDP },
>+
> };
> 
> const struct spi_nor_manufacturer spi_nor_xmc = {
>> Correct. If the flash is working with PARSE_SFDP, it has SFDP and
>> all the information of the flash_info table is pulled from the SFDP
>> tables, except for the part name. Therefore, you don't need any entry
>> at all. The flash should just work out of the box. Are you using the
>> latest kernel?
>> 
>> -michael
--
Hi Michael,

According to you, does this piece of my code still need to be modified?

Thanks,
Ssunk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-29  4:56         ` SSunk
@ 2023-08-29  6:48           ` Michael Walle
  2023-08-31  4:13             ` SSunk
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Walle @ 2023-08-29  6:48 UTC (permalink / raw)
  To: SSunk
  Cc: ssunkkan, linux-kernel, linux-mtd, miquel.raynal, pratyush,
	richard, tudor.ambarus, vigneshr

Am 2023-08-29 06:56, schrieb SSunk:
>> Hi Michael,
>> Since this is the first time I've submitted code to the Linux 
>> community, please forgive me for some of the missteps that I've made.
>> I uploaded the incorrect patch file.
>> In a previous e-mail you said:
>> XMC parts seem to have SFDP tables and they should work out of the box
>> without any patches with the generic spi nor driver [1]. Therefore,
>> you don't need any entry at all.
>> 
>> I think it is related to the PARSE_SFDP flag.
>> The XMC flash part supports SFDP, so i don’t need to add 
>> NO_SFDP_FLAGS() macro.
>> drivers/mtd/spi-nor/xmc.c | 17 +++++++++++++----
>> 1 file changed, 13 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
>> index 051411e86339..e78bf11792d9 100644
>> --- a/drivers/mtd/spi-nor/xmc.c
>> +++ b/drivers/mtd/spi-nor/xmc.c
>> @@ -11,11 +11,20 @@
>> static const struct flash_info xmc_nor_parts[] = {
>> 	/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
>> 	{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
>> -		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>> -			      SPI_NOR_QUAD_READ) },
>> +		PARSE_SFDP },
>> 	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
>> -		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>> -			      SPI_NOR_QUAD_READ) },
>> +		PARSE_SFDP },
>> +	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
>> +		PARSE_SFDP },
>> +	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
>> +		PARSE_SFDP },
>> +	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
>> +		PARSE_SFDP },
>> +	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
>> +		PARSE_SFDP },
>> +	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
>> +		PARSE_SFDP },
>> +
>> };
>> 
>> const struct spi_nor_manufacturer spi_nor_xmc = {
>>> Correct. If the flash is working with PARSE_SFDP, it has SFDP and
>>> all the information of the flash_info table is pulled from the SFDP
>>> tables, except for the part name. Therefore, you don't need any entry
>>> at all. The flash should just work out of the box. Are you using the
>>> latest kernel?
>>> 
>>> -michael
> --
> Hi Michael,
> 
> According to you, does this piece of my code still need to be modified?

You don't need it at all. The flash will work as is - that is without 
that
piece of code.

-michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-29  6:48           ` Michael Walle
@ 2023-08-31  4:13             ` SSunk
  2023-08-31  6:41               ` Michael Walle
  0 siblings, 1 reply; 10+ messages in thread
From: SSunk @ 2023-08-31  4:13 UTC (permalink / raw)
  To: michael
  Cc: linux-kernel, linux-mtd, miquel.raynal, pratyush, richard,
	ssunkkan, tudor.ambarus, vigneshr

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2534 bytes --]

>>> Hi Michael,
>>> Since this is the first time I've submitted code to the Linux 
>>> community, please forgive me for some of the missteps that I've made.
>>> I uploaded the incorrect patch file.
>>> In a previous e-mail you said:
>>> XMC parts seem to have SFDP tables and they should work out of the box
>>> without any patches with the generic spi nor driver [1]. Therefore,
>>> you don't need any entry at all.
>>> 
>>> I think it is related to the PARSE_SFDP flag.
>>> The XMC flash part supports SFDP, so i don’t need to add 
>>> NO_SFDP_FLAGS() macro.
>>> drivers/mtd/spi-nor/xmc.c | 17 +++++++++++++----
>>> 1 file changed, 13 insertions(+), 4 deletions(-)
>>> 
>>> diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
>>> index 051411e86339..e78bf11792d9 100644
>>> --- a/drivers/mtd/spi-nor/xmc.c
>>> +++ b/drivers/mtd/spi-nor/xmc.c
>>> @@ -11,11 +11,20 @@
>>> static const struct flash_info xmc_nor_parts[] = {
>>> 	/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
>>> 	{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
>>> -		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>>> -			      SPI_NOR_QUAD_READ) },
>>> +		PARSE_SFDP },
>>> 	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
>>> -		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>>> -			      SPI_NOR_QUAD_READ) },
>>> +		PARSE_SFDP },
>>> +	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
>>> +		PARSE_SFDP },
>>> +	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
>>> +		PARSE_SFDP },
>>> +	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
>>> +		PARSE_SFDP },
>>> +	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
>>> +		PARSE_SFDP },
>>> +	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
>>> +		PARSE_SFDP },
>>> +
>>> };
>>> 
>>> const struct spi_nor_manufacturer spi_nor_xmc = {
>>>> Correct. If the flash is working with PARSE_SFDP, it has SFDP and
>>>> all the information of the flash_info table is pulled from the SFDP
>>>> tables, except for the part name. Therefore, you don't need any entry
>>>> at all. The flash should just work out of the box. Are you using the
>>>> latest kernel?
>>>> 
>>>> -michael
>> --
>> Hi Michael,
>> 
>> According to you, does this piece of my code still need to be modified?
>
>You don't need it at all. The flash will work as is - that is without 
>that
>piece of code.
>
>-michael
--
Hi michael,

If these entries are not added, the flash part name is unknown and our customers cannot see our flash part name on the kernel log.
So,I think it's necessary to add these entries.

Thanks

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] Add support for more XMC series
  2023-08-31  4:13             ` SSunk
@ 2023-08-31  6:41               ` Michael Walle
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Walle @ 2023-08-31  6:41 UTC (permalink / raw)
  To: SSunk
  Cc: linux-kernel, linux-mtd, miquel.raynal, pratyush, richard,
	ssunkkan, tudor.ambarus, vigneshr

Hi,

>>>> Since this is the first time I've submitted code to the Linux
>>>> community, please forgive me for some of the missteps that I've 
>>>> made.
>>>> I uploaded the incorrect patch file.
>>>> In a previous e-mail you said:
>>>> XMC parts seem to have SFDP tables and they should work out of the 
>>>> box
>>>> without any patches with the generic spi nor driver [1]. Therefore,
>>>> you don't need any entry at all.
>>>> 
>>>> I think it is related to the PARSE_SFDP flag.
>>>> The XMC flash part supports SFDP, so i don’t need to add
>>>> NO_SFDP_FLAGS() macro.
>>>> drivers/mtd/spi-nor/xmc.c | 17 +++++++++++++----
>>>> 1 file changed, 13 insertions(+), 4 deletions(-)
>>>> 
>>>> diff --git a/drivers/mtd/spi-nor/xmc.c b/drivers/mtd/spi-nor/xmc.c
>>>> index 051411e86339..e78bf11792d9 100644
>>>> --- a/drivers/mtd/spi-nor/xmc.c
>>>> +++ b/drivers/mtd/spi-nor/xmc.c
>>>> @@ -11,11 +11,20 @@
>>>> static const struct flash_info xmc_nor_parts[] = {
>>>> 	/* XMC (Wuhan Xinxin Semiconductor Manufacturing Corp.) */
>>>> 	{ "XM25QH64A", INFO(0x207017, 0, 64 * 1024, 128)
>>>> -		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>>>> -			      SPI_NOR_QUAD_READ) },
>>>> +		PARSE_SFDP },
>>>> 	{ "XM25QH128A", INFO(0x207018, 0, 64 * 1024, 256)
>>>> -		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ |
>>>> -			      SPI_NOR_QUAD_READ) },
>>>> +		PARSE_SFDP },
>>>> +	{ "XM25QH128C", INFO(0x204018, 0, 64 * 1024, 256)
>>>> +		PARSE_SFDP },
>>>> +	{ "XM25QH256C", INFO(0x204019, 0, 64 * 1024, 512)
>>>> +		PARSE_SFDP },
>>>> +	{ "XM25QU256C", INFO(0x204119, 0, 64 * 1024, 512)
>>>> +		PARSE_SFDP },
>>>> +	{ "XM25QH512C", INFO(0x204020, 0, 64 * 1024, 1024)
>>>> +		PARSE_SFDP },
>>>> +	{ "XM25QU512C", INFO(0x204120, 0, 64 * 1024, 1024)
>>>> +		PARSE_SFDP },
>>>> +
>>>> };
>>>> 
>>>> const struct spi_nor_manufacturer spi_nor_xmc = {
>>>>> Correct. If the flash is working with PARSE_SFDP, it has SFDP and
>>>>> all the information of the flash_info table is pulled from the SFDP
>>>>> tables, except for the part name. Therefore, you don't need any 
>>>>> entry
>>>>> at all. The flash should just work out of the box. Are you using 
>>>>> the
>>>>> latest kernel?
>>>>> 
>>>>> -michael
>>> --
>>> Hi Michael,
>>> 
>>> According to you, does this piece of my code still need to be 
>>> modified?
>> 
>> You don't need it at all. The flash will work as is - that is without
>> that
>> piece of code.
>> 
>> -michael
> --
> Hi michael,
> 
> If these entries are not added, the flash part name is unknown and our 
> customers
> cannot see our flash part name on the kernel log.
> So,I think it's necessary to add these entries.

They can still see the jedec id in the sysfs. We don't add entries just 
for the
names. Sorry.

-michael

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-31  6:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 12:46 [PATCH] Add support for more XMC series SSunk
2023-08-17 13:14 ` Michael Walle
2023-08-17 13:20 ` Miquel Raynal
2023-08-17 17:03   ` SSunk
2023-08-17 17:10     ` Michael Walle
2023-08-17 17:17       ` Clus Tom
2023-08-29  4:56         ` SSunk
2023-08-29  6:48           ` Michael Walle
2023-08-31  4:13             ` SSunk
2023-08-31  6:41               ` Michael Walle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox