All of lore.kernel.org
 help / color / mirror / Atom feed
From: SSunk <ssunkkan@gmail.com>
To: ssunkkan@gmail.com
Cc: chiawei_wang@aspeedtech.com, jagan@amarulasolutions.com,
	sjg@google.com, u-boot@lists.denx.de, vigneshr@ti.com
Subject: Re: [PATCH] Add support for more XMC series
Date: Thu, 31 Aug 2023 12:07:44 +0800	[thread overview]
Message-ID: <20230831040744.4520-1-ssunkkan@gmail.com> (raw)
In-Reply-To: <CABjXDjFvFp33phD2Kwog8oo8H1XsquU7UBGLVLKKaemeawrbrg@mail.gmail.com>

[-- 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

  reply	other threads:[~2023-08-31 12:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230812031846.3958-1-ssunkkan@gmail.com>
     [not found] ` <CAPnjgZ1Z6pKEif5HKFLcG0AQJL1qrqy9j78TjvuhpsOUzS7JGQ@mail.gmail.com>
     [not found]   ` <CABjXDjHOpcM=JtCe2SGzwQ+GbQT7cg8xQxFbthPqW3KXaJ1P3Q@mail.gmail.com>
2023-08-14 22:42     ` [PATCH] Add support for more XMC series Simon Glass
2023-08-15  2:46       ` Clus Tom
2023-08-31  4:07         ` SSunk [this message]
2023-08-31  5:48         ` SSunk
2023-08-17 12:46 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
     [not found] <20230812030731.3711-1-ssunkkan@gmail.com>
2023-12-06 12:33 ` Jagan Teki

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=20230831040744.4520-1-ssunkkan@gmail.com \
    --to=ssunkkan@gmail.com \
    --cc=chiawei_wang@aspeedtech.com \
    --cc=jagan@amarulasolutions.com \
    --cc=sjg@google.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.