From: Michael Walle <michael@walle.cc> To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tudor Ambarus <tudor.ambarus@microchip.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Michael Walle <michael@walle.cc> Subject: [PATCH v4 0/4] mtd: spi-nor: OTP support Date: Sat, 6 Mar 2021 01:05:31 +0100 [thread overview] Message-ID: <20210306000535.9890-1-michael@walle.cc> (raw) This patchset implements the MTD OTP functions to allow access to the SPI OTP data. Specific support is added for Winbond flash chips. In the past there was already an attempt by Rahul Bedarkar to add this, but there was no response. These patches are slightly based on his work. https://lore.kernel.org/linux-mtd/1489754636-21461-1-git-send-email-rahul.bedarkar@imgtec.com/ Changes since v3: - remapped the OTP regions to a contiguous area starting at 0. The chips/cfi_cmdset_000[12].c remap the regions, too. - with that in place, read/write/lock/erase spanning multiple OTP regions are possible - picked up Tudors review remarks - added new erase support as RFC because MTD API/ABI is still missing. Feel free to review, but don't apply it. Changes since v2: - improved commit messages - add buffer size check in spi_nor_mtd_otp_info(). just to be sure, the buffer is hardcoded to 4k by the mtd subsys - moved all code to otp.c - dropped the patches introduced in v2 Changes since v1: - added methods for Macronix and similar flashes - added patch to cleanup/consolidate code in core.c Michael Walle (4): mtd: spi-nor: add OTP support mtd: spi-nor: implement OTP support for Winbond and similar flashes mtd: spi-nor: winbond: add OTP support to w25q32fw/jw mtd: spi-nor: implement OTP erase for Winbond and similar flashes drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/core.c | 11 +- drivers/mtd/spi-nor/core.h | 64 +++++ drivers/mtd/spi-nor/otp.c | 453 ++++++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/winbond.c | 18 +- include/linux/mtd/spi-nor.h | 9 + 6 files changed, 551 insertions(+), 5 deletions(-) create mode 100644 drivers/mtd/spi-nor/otp.c -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Michael Walle <michael@walle.cc> To: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tudor Ambarus <tudor.ambarus@microchip.com>, Miquel Raynal <miquel.raynal@bootlin.com>, Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>, Michael Walle <michael@walle.cc> Subject: [PATCH v4 0/4] mtd: spi-nor: OTP support Date: Sat, 6 Mar 2021 01:05:31 +0100 [thread overview] Message-ID: <20210306000535.9890-1-michael@walle.cc> (raw) This patchset implements the MTD OTP functions to allow access to the SPI OTP data. Specific support is added for Winbond flash chips. In the past there was already an attempt by Rahul Bedarkar to add this, but there was no response. These patches are slightly based on his work. https://lore.kernel.org/linux-mtd/1489754636-21461-1-git-send-email-rahul.bedarkar@imgtec.com/ Changes since v3: - remapped the OTP regions to a contiguous area starting at 0. The chips/cfi_cmdset_000[12].c remap the regions, too. - with that in place, read/write/lock/erase spanning multiple OTP regions are possible - picked up Tudors review remarks - added new erase support as RFC because MTD API/ABI is still missing. Feel free to review, but don't apply it. Changes since v2: - improved commit messages - add buffer size check in spi_nor_mtd_otp_info(). just to be sure, the buffer is hardcoded to 4k by the mtd subsys - moved all code to otp.c - dropped the patches introduced in v2 Changes since v1: - added methods for Macronix and similar flashes - added patch to cleanup/consolidate code in core.c Michael Walle (4): mtd: spi-nor: add OTP support mtd: spi-nor: implement OTP support for Winbond and similar flashes mtd: spi-nor: winbond: add OTP support to w25q32fw/jw mtd: spi-nor: implement OTP erase for Winbond and similar flashes drivers/mtd/spi-nor/Makefile | 1 + drivers/mtd/spi-nor/core.c | 11 +- drivers/mtd/spi-nor/core.h | 64 +++++ drivers/mtd/spi-nor/otp.c | 453 ++++++++++++++++++++++++++++++++++ drivers/mtd/spi-nor/winbond.c | 18 +- include/linux/mtd/spi-nor.h | 9 + 6 files changed, 551 insertions(+), 5 deletions(-) create mode 100644 drivers/mtd/spi-nor/otp.c -- 2.20.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2021-03-06 0:06 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-06 0:05 Michael Walle [this message] 2021-03-06 0:05 ` [PATCH v4 0/4] mtd: spi-nor: OTP support Michael Walle 2021-03-06 0:05 ` [PATCH v4 1/4] mtd: spi-nor: add " Michael Walle 2021-03-06 0:05 ` Michael Walle 2021-03-15 7:28 ` Tudor.Ambarus 2021-03-15 7:28 ` Tudor.Ambarus 2021-03-15 9:23 ` Michael Walle 2021-03-15 9:23 ` Michael Walle 2021-03-15 9:39 ` Tudor.Ambarus 2021-03-15 9:39 ` Tudor.Ambarus 2021-03-15 9:44 ` Tudor.Ambarus 2021-03-15 9:44 ` Tudor.Ambarus 2021-03-15 10:01 ` Michael Walle 2021-03-15 10:01 ` Michael Walle 2021-03-06 0:05 ` [PATCH v4 2/4] mtd: spi-nor: implement OTP support for Winbond and similar flashes Michael Walle 2021-03-06 0:05 ` Michael Walle 2021-03-15 8:20 ` Tudor.Ambarus 2021-03-15 8:20 ` Tudor.Ambarus 2021-03-15 10:29 ` Michael Walle 2021-03-15 10:29 ` Michael Walle 2021-03-15 8:31 ` Tudor.Ambarus 2021-03-15 8:31 ` Tudor.Ambarus 2021-03-15 10:43 ` Michael Walle 2021-03-15 10:43 ` Michael Walle 2021-03-06 0:05 ` [PATCH v4 3/4] mtd: spi-nor: winbond: add OTP support to w25q32fw/jw Michael Walle 2021-03-06 0:05 ` Michael Walle 2021-03-15 8:26 ` Tudor.Ambarus 2021-03-15 8:26 ` Tudor.Ambarus 2021-03-15 9:26 ` Michael Walle 2021-03-15 9:26 ` Michael Walle 2021-03-15 9:34 ` Tudor.Ambarus 2021-03-15 9:34 ` Tudor.Ambarus 2021-03-06 0:05 ` [PATCH v4 4/4] mtd: spi-nor: implement OTP erase for Winbond and similar flashes Michael Walle 2021-03-06 0:05 ` Michael Walle 2021-03-06 0:20 ` Michael Walle 2021-03-06 0:20 ` Michael Walle 2021-03-07 8:48 ` kernel test robot 2021-03-07 8:48 ` kernel test robot 2021-03-07 8:48 ` kernel test robot 2021-03-15 8:42 ` Tudor.Ambarus 2021-03-15 8:42 ` Tudor.Ambarus
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=20210306000535.9890-1-michael@walle.cc \ --to=michael@walle.cc \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mtd@lists.infradead.org \ --cc=miquel.raynal@bootlin.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.