From: Michael Walle <michael@walle.cc> To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Cc: Tudor Ambarus <tudor.ambarus@microchip.com>, Pratyush Yadav <p.yadav@ti.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mtd: spi-nor: micron-st: sync flags of mt25ql02g and mt25qu02g with other mt25q Date: Wed, 28 Jul 2021 12:00:07 +0200 [thread overview] Message-ID: <cebfb4138908d085791c5c2fddca939d@walle.cc> (raw) In-Reply-To: <42380415413178b18e940ae80298c22c51275b95.camel@ew.tq-group.com> Am 2021-07-27 12:45, schrieb Matthias Schiffer: > On Tue, 2021-07-27 at 09:09 +0200, Michael Walle wrote: [..] >> > --- a/drivers/mtd/spi-nor/micron-st.c >> > +++ b/drivers/mtd/spi-nor/micron-st.c >> > @@ -181,11 +181,11 @@ static const struct flash_info st_parts[] = { >> > SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | >> > NO_CHIP_ERASE) }, >> > { "mt25ql02g", INFO(0x20ba22, 0, 64 * 1024, 4096, >> > - SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | >> > - NO_CHIP_ERASE) }, >> >> This bothers me. I'm not sure how this will work. I see that >> chip erase is command 0xc7, but both the new and the old flash >> just supports 0xc3 (DIE ERASE). Did you test these changes? > > Thanks for catching this. I overlooked that the 1G and 2G variants > don't support the same erase commands as the smaller versions after > all... It is possible that I only tested this with partitioned MTD, so > I didn't hit the whole-chip erase case. > > Which command should I use to test the chip erase? Will a `flash_erase > /dev/mtdX 0 0` trigger the correct operation? I guess so. Looking at http://git.infradead.org/mtd-utils.git/blob/HEAD:/misc-utils/flash_erase.c#l226 It seems you should see a different output for either erasing individual sectors or the whole chip (as long as the kernel doesn't the invidual block erase itself). -michael
WARNING: multiple messages have this Message-ID (diff)
From: Michael Walle <michael@walle.cc> To: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Cc: Tudor Ambarus <tudor.ambarus@microchip.com>, Pratyush Yadav <p.yadav@ti.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] mtd: spi-nor: micron-st: sync flags of mt25ql02g and mt25qu02g with other mt25q Date: Wed, 28 Jul 2021 12:00:07 +0200 [thread overview] Message-ID: <cebfb4138908d085791c5c2fddca939d@walle.cc> (raw) In-Reply-To: <42380415413178b18e940ae80298c22c51275b95.camel@ew.tq-group.com> Am 2021-07-27 12:45, schrieb Matthias Schiffer: > On Tue, 2021-07-27 at 09:09 +0200, Michael Walle wrote: [..] >> > --- a/drivers/mtd/spi-nor/micron-st.c >> > +++ b/drivers/mtd/spi-nor/micron-st.c >> > @@ -181,11 +181,11 @@ static const struct flash_info st_parts[] = { >> > SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | >> > NO_CHIP_ERASE) }, >> > { "mt25ql02g", INFO(0x20ba22, 0, 64 * 1024, 4096, >> > - SECT_4K | USE_FSR | SPI_NOR_QUAD_READ | >> > - NO_CHIP_ERASE) }, >> >> This bothers me. I'm not sure how this will work. I see that >> chip erase is command 0xc7, but both the new and the old flash >> just supports 0xc3 (DIE ERASE). Did you test these changes? > > Thanks for catching this. I overlooked that the 1G and 2G variants > don't support the same erase commands as the smaller versions after > all... It is possible that I only tested this with partitioned MTD, so > I didn't hit the whole-chip erase case. > > Which command should I use to test the chip erase? Will a `flash_erase > /dev/mtdX 0 0` trigger the correct operation? I guess so. Looking at http://git.infradead.org/mtd-utils.git/blob/HEAD:/misc-utils/flash_erase.c#l226 It seems you should see a different output for either erasing individual sectors or the whole chip (as long as the kernel doesn't the invidual block erase itself). -michael ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-07-28 10:00 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-23 11:27 [PATCH 1/2] mtd: spi-nor: micron-st: sync flags of mt25ql02g and mt25qu02g with other mt25q Matthias Schiffer 2021-07-23 11:27 ` Matthias Schiffer 2021-07-23 11:27 ` [PATCH 2/2] mtd: spi-nor: micron-st: add support for mt25ql01g and mt25qu01g Matthias Schiffer 2021-07-23 11:27 ` Matthias Schiffer 2021-07-27 7:17 ` Michael Walle 2021-07-27 7:17 ` Michael Walle 2021-07-27 7:09 ` [PATCH 1/2] mtd: spi-nor: micron-st: sync flags of mt25ql02g and mt25qu02g with other mt25q Michael Walle 2021-07-27 7:09 ` Michael Walle 2021-07-27 10:45 ` Matthias Schiffer 2021-07-27 10:45 ` Matthias Schiffer 2021-07-28 10:00 ` Michael Walle [this message] 2021-07-28 10:00 ` Michael Walle 2021-10-06 12:32 ` (EXT) " Matthias Schiffer 2021-10-06 12:32 ` Matthias Schiffer 2021-10-07 7:08 ` Michael Walle 2021-10-07 7:08 ` Michael Walle 2021-10-07 7:18 ` (EXT) " Matthias Schiffer 2021-10-07 7:18 ` Matthias Schiffer 2021-10-07 7:37 ` Michael Walle 2021-10-07 7:37 ` Michael Walle
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=cebfb4138908d085791c5c2fddca939d@walle.cc \ --to=michael@walle.cc \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ --cc=matthias.schiffer@ew.tq-group.com \ --cc=miquel.raynal@bootlin.com \ --cc=p.yadav@ti.com \ --cc=richard@nod.at \ --cc=tudor.ambarus@microchip.com \ --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: linkBe 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.