From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masami Hiramatsu Date: Wed, 21 Apr 2021 11:39:31 +0900 Subject: [PATCH v2 05/13] mtd: spi-nor-ids: add support for Macronix mx25u51245g and mx66u1g45g flash In-Reply-To: <20210419084058.in5jh2jpwe5ronhm@ti.com> References: <161861622792.298230.15803163505976731363.stgit@localhost> <161861628460.298230.15310595411933381824.stgit@localhost> <20210419084058.in5jh2jpwe5ronhm@ti.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Pratyush, 2021?4?19?(?) 17:41 Pratyush Yadav : > > On 17/04/21 08:38AM, Masami Hiramatsu wrote: > > From: Jassi Brar > > > > Signed-off-by: Jassi Brar > > --- > > drivers/mtd/spi/spi-nor-ids.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c > > index 2b57797954..30a18b4140 100644 > > --- a/drivers/mtd/spi/spi-nor-ids.c > > +++ b/drivers/mtd/spi/spi-nor-ids.c > > @@ -160,9 +160,11 @@ const struct flash_info spi_nor_ids[] = { > > { INFO("mx25l12855e", 0xc22618, 0, 64 * 1024, 256, 0) }, > > { INFO("mx25l25635e", 0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, > > { INFO("mx25u25635f", 0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, > > + { INFO("mx25u51245g", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, > > The flash ID is the same as that of mx66u51235f. Because the ID matching > function searches through this array in linear fashion, mx66u51235f can > never be detected. This is a regression. OK > > I am seeing a lot of ID collisions on Macronix flashes recently [0]. Not > sure how to handle them though. At least in this case both flashes use > the same set of flags so it should just change the name of the flash > detected. Would you mean rename the entry as below? { INFO("mx66u51235f/mx25u51245g",... Thank you, > > [0] https://lore.kernel.org/linux-mtd/CAEyMn7ZEp9f1SuE6umRDWkr8bVT5hdRi-4F3+G-GP9anuGG1Bw at mail.gmail.com/T/#u > > > { INFO("mx25l25655e", 0xc22619, 0, 64 * 1024, 512, 0) }, > > { INFO("mx66l51235l", 0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, > > { INFO("mx66u51235f", 0xc2253a, 0, 64 * 1024, 1024, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, > > + { INFO("mx66u1g45g", 0xc2253b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, > > { INFO("mx66u2g45g", 0xc2253c, 0, 64 * 1024, 4096, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, > > { INFO("mx66l1g45g", 0xc2201b, 0, 64 * 1024, 2048, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, > > { INFO("mx25l1633e", 0xc22415, 0, 64 * 1024, 32, SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES | SECT_4K) }, > > > > -- > Regards, > Pratyush Yadav > Texas Instruments Inc. -- Masami Hiramatsu