<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/include/linux/mtd, branch v6.15</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>mtd: spinand: Fix build with gcc &lt; 7.5</title>
<updated>2025-04-07T07:05:31+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2025-04-01T13:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1c1fd374a2fe72b8a6dde62d3c3a9fd153e7581c'/>
<id>1c1fd374a2fe72b8a6dde62d3c3a9fd153e7581c</id>
<content type='text'>
__VA_OPT__ is a macro that is useful when some arguments can be present
or not to entirely skip some part of a definition. Unfortunately, it
is a too recent addition that some of the still supported old GCC
versions do not know about, and is anyway not part of C11 that is the
version used in the kernel.

Find a trick to remove this macro, typically '__VA_ARGS__ + 0' is a
workaround used in netlink.h which works very well here, as we either
expect:
- 0
- A positive value
- No value, which means the field should be 0.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202503181330.YcDXGy7F-lkp@intel.com/
Fixes: 7ce0d16d5802 ("mtd: spinand: Add an optional frequency to read from cache macros")
Cc: stable@vger.kernel.org
Tested-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__VA_OPT__ is a macro that is useful when some arguments can be present
or not to entirely skip some part of a definition. Unfortunately, it
is a too recent addition that some of the still supported old GCC
versions do not know about, and is anyway not part of C11 that is the
version used in the kernel.

Find a trick to remove this macro, typically '__VA_ARGS__ + 0' is a
workaround used in netlink.h which works very well here, as we either
expect:
- 0
- A positive value
- No value, which means the field should be 0.

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202503181330.YcDXGy7F-lkp@intel.com/
Fixes: 7ce0d16d5802 ("mtd: spinand: Add an optional frequency to read from cache macros")
Cc: stable@vger.kernel.org
Tested-by: Jean Delvare &lt;jdelvare@suse.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'mtd/for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux</title>
<updated>2025-03-26T17:28:36+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-03-26T17:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f6e0150b2003fb2b9265028a618aa1732b3edc8f'/>
<id>f6e0150b2003fb2b9265028a618aa1732b3edc8f</id>
<content type='text'>
Pull mtd updates from Miquel Raynal:
 "MTD changes:

   - The atmel,dataflash binding has been converted to yaml and the
     physmap one constrained. Some logs are improved, error path are
     getting reworked a bit, few patches target the use of
     str_enabled_disabled().

  Raw NAND changes:

   - i.MX8 and i.MX31 now have their own compatible, the Qcom driver got
     cleaned, the Broadcom driver got fixed.

  SPI NAND changes:

     - OTP support has been brought, and ESMT and Micron manufacturer
       drivers implement it.

     - Read retry, and Macronix manufacturer driver implement it.

  SPI NOR changes:

   - Adding support for few flashes. Few cleanup patches for the core
     driver, where we touched the headers inclusion list and we start
     using the scope based mutex cleanup helpers.

  There is also a bunch of minor improvements and fixes in drivers
  and bindings"

* tag 'mtd/for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (34 commits)
  dt-bindings: mtd: atmel,dataflash: convert txt to yaml
  mtd: mchp48l640: Use str_enable_disable() in mchp48l640_write_prepare()
  mtd: rawnand: gpmi: Use str_enabled_disabled() in gpmi_nand_attach_chip()
  mtd: mtdpart: Do not supply NULL to printf()
  dt-bindings: mtd: gpmi-nand: Add compatible string for i.MX8 chips
  mtd: nand: Fix a kdoc comment
  mtd: spinand: Improve spinand_info macros style
  mtd: spi-nor: drop unused &lt;linux/of_platform.h&gt;
  mtd: spi-nor: explicitly include &lt;linux/of.h&gt;
  mtd: spi-nor: explicitly include &lt;linux/math64.h&gt;
  mtd: spi-nor: macronix: add support for mx66{l2, u1}g45g
  mtd: spi-nor: macronix: Add post_sfdp fixups for Quad Input Page Program
  mtd: Fix error handling in mtd_device_parse_register() error path
  mtd: capture device name setting failure when adding mtd
  mtd: Add check for devm_kcalloc()
  mtd: Replace kcalloc() with devm_kcalloc()
  dt-bindings: mtd: physmap: Ensure all properties are defined
  mtd: rawnand: brcmnand: fix PM resume warning
  dt-bindings: mtd: mxc-nand: Document fsl,imx31-nand
  mtd: spinand: macronix: Add support for read retry
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull mtd updates from Miquel Raynal:
 "MTD changes:

   - The atmel,dataflash binding has been converted to yaml and the
     physmap one constrained. Some logs are improved, error path are
     getting reworked a bit, few patches target the use of
     str_enabled_disabled().

  Raw NAND changes:

   - i.MX8 and i.MX31 now have their own compatible, the Qcom driver got
     cleaned, the Broadcom driver got fixed.

  SPI NAND changes:

     - OTP support has been brought, and ESMT and Micron manufacturer
       drivers implement it.

     - Read retry, and Macronix manufacturer driver implement it.

  SPI NOR changes:

   - Adding support for few flashes. Few cleanup patches for the core
     driver, where we touched the headers inclusion list and we start
     using the scope based mutex cleanup helpers.

  There is also a bunch of minor improvements and fixes in drivers
  and bindings"

* tag 'mtd/for-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (34 commits)
  dt-bindings: mtd: atmel,dataflash: convert txt to yaml
  mtd: mchp48l640: Use str_enable_disable() in mchp48l640_write_prepare()
  mtd: rawnand: gpmi: Use str_enabled_disabled() in gpmi_nand_attach_chip()
  mtd: mtdpart: Do not supply NULL to printf()
  dt-bindings: mtd: gpmi-nand: Add compatible string for i.MX8 chips
  mtd: nand: Fix a kdoc comment
  mtd: spinand: Improve spinand_info macros style
  mtd: spi-nor: drop unused &lt;linux/of_platform.h&gt;
  mtd: spi-nor: explicitly include &lt;linux/of.h&gt;
  mtd: spi-nor: explicitly include &lt;linux/math64.h&gt;
  mtd: spi-nor: macronix: add support for mx66{l2, u1}g45g
  mtd: spi-nor: macronix: Add post_sfdp fixups for Quad Input Page Program
  mtd: Fix error handling in mtd_device_parse_register() error path
  mtd: capture device name setting failure when adding mtd
  mtd: Add check for devm_kcalloc()
  mtd: Replace kcalloc() with devm_kcalloc()
  dt-bindings: mtd: physmap: Ensure all properties are defined
  mtd: rawnand: brcmnand: fix PM resume warning
  dt-bindings: mtd: mxc-nand: Document fsl,imx31-nand
  mtd: spinand: macronix: Add support for read retry
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: nand: Fix a kdoc comment</title>
<updated>2025-03-18T16:15:39+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2025-03-05T19:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ca8cbbb2be8f906d9602a6e4324f8adf279e9cc2'/>
<id>ca8cbbb2be8f906d9602a6e4324f8adf279e9cc2</id>
<content type='text'>
The max_bad_eraseblocks_per_lun member of nand_device obviously
describes a number of *maximum* number of bad eraseblocks per LUN.

Fix this obvious typo.

Fixes: 377e517b5fa5 ("mtd: nand: Add max_bad_eraseblocks_per_lun info to memorg")
Cc: &lt;stable+noautosel@kernel.org&gt; # fix kdoc comment
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The max_bad_eraseblocks_per_lun member of nand_device obviously
describes a number of *maximum* number of bad eraseblocks per LUN.

Fix this obvious typo.

Fixes: 377e517b5fa5 ("mtd: nand: Add max_bad_eraseblocks_per_lun info to memorg")
Cc: &lt;stable+noautosel@kernel.org&gt; # fix kdoc comment
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spinand: Improve spinand_info macros style</title>
<updated>2025-03-18T15:56:02+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2025-03-04T11:05:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b28f47ac3ddd072cce0e447ace89e2b4d6932c66'/>
<id>b28f47ac3ddd072cce0e447ace89e2b4d6932c66</id>
<content type='text'>
Let's assume all these macros should not have a trailing comma, this way
the caller can use a more formal and usual C writing style, as reflected
in the Macronix driver.

Acked-by: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's assume all these macros should not have a trailing comma, this way
the caller can use a more formal and usual C writing style, as reflected
in the Macronix driver.

Acked-by: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spinand: Add read retry support</title>
<updated>2025-03-04T11:02:11+00:00</updated>
<author>
<name>Cheng Ming Lin</name>
<email>chengminglin@mxic.com.tw</email>
</author>
<published>2025-02-24T07:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f2cb43c98010181b532ff36643731dc2442b9b7d'/>
<id>f2cb43c98010181b532ff36643731dc2442b9b7d</id>
<content type='text'>
When the host ECC fails to correct the data error of NAND device,
there's a special read for data recovery method which can be setup
by the host for the next read. There are several retry levels that
can be attempted until the lost data is recovered or definitely
assumed lost.

Signed-off-by: Cheng Ming Lin &lt;chengminglin@mxic.com.tw&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the host ECC fails to correct the data error of NAND device,
there's a special read for data recovery method which can be setup
by the host for the next read. There are several retry levels that
can be attempted until the lost data is recovered or definitely
assumed lost.

Signed-off-by: Cheng Ming Lin &lt;chengminglin@mxic.com.tw&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: spi-qpic: add driver for QCOM SPI NAND flash Interface</title>
<updated>2025-03-03T13:00:21+00:00</updated>
<author>
<name>Md Sadre Alam</name>
<email>quic_mdalam@quicinc.com</email>
</author>
<published>2025-02-24T11:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7304d1909080ef0c9da703500a97f46c98393fcd'/>
<id>7304d1909080ef0c9da703500a97f46c98393fcd</id>
<content type='text'>
This driver implements support for the SPI-NAND mode of QCOM NAND Flash
Interface as a SPI-MEM controller with pipelined ECC capability.

Co-developed-by: Sricharan Ramabadhran &lt;quic_srichara@quicinc.com&gt;
Signed-off-by: Sricharan Ramabadhran &lt;quic_srichara@quicinc.com&gt;
Co-developed-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Signed-off-by: Md Sadre Alam &lt;quic_mdalam@quicinc.com&gt;
Link: https://patch.msgid.link/20250224111414.2809669-3-quic_mdalam@quicinc.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This driver implements support for the SPI-NAND mode of QCOM NAND Flash
Interface as a SPI-MEM controller with pipelined ECC capability.

Co-developed-by: Sricharan Ramabadhran &lt;quic_srichara@quicinc.com&gt;
Signed-off-by: Sricharan Ramabadhran &lt;quic_srichara@quicinc.com&gt;
Co-developed-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Signed-off-by: Varadarajan Narayanan &lt;quic_varada@quicinc.com&gt;
Signed-off-by: Md Sadre Alam &lt;quic_mdalam@quicinc.com&gt;
Link: https://patch.msgid.link/20250224111414.2809669-3-quic_mdalam@quicinc.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: rawnand: qcom: finish converting register to FIELD_PREP</title>
<updated>2025-02-11T12:55:15+00:00</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2025-02-09T14:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1db50b96b059ca8e5548cb3e0e38a888b325f96b'/>
<id>1db50b96b059ca8e5548cb3e0e38a888b325f96b</id>
<content type='text'>
With some research in some obscure old QSDK, it was possible to find the
MASK of the last register there were still set with raw shift and
convert them to FIELD_PREP API.

This is only a cleanup and modernize the code a bit and doesn't make
any behaviour change.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With some research in some obscure old QSDK, it was possible to find the
MASK of the last register there were still set with raw shift and
convert them to FIELD_PREP API.

This is only a cleanup and modernize the code a bit and doesn't make
any behaviour change.

Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spinand: otp: add helpers functions</title>
<updated>2025-02-10T14:52:59+00:00</updated>
<author>
<name>Martin Kurbanov</name>
<email>mmkurbanov@salutedevices.com</email>
</author>
<published>2025-02-10T14:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ad2857c82d56017402256fd3e2ed401cc7f6fb9'/>
<id>9ad2857c82d56017402256fd3e2ed401cc7f6fb9</id>
<content type='text'>
The global functions spinand_otp_read() and spinand_otp_write() have
been introduced. Since most SPI-NAND flashes read/write OTP in the same
way, let's define global functions to avoid code duplication.

Signed-off-by: Martin Kurbanov &lt;mmkurbanov@salutedevices.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The global functions spinand_otp_read() and spinand_otp_write() have
been introduced. Since most SPI-NAND flashes read/write OTP in the same
way, let's define global functions to avoid code duplication.

Signed-off-by: Martin Kurbanov &lt;mmkurbanov@salutedevices.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spinand: make spinand_{wait,otp_page_size} global</title>
<updated>2025-02-10T14:52:59+00:00</updated>
<author>
<name>Martin Kurbanov</name>
<email>mmkurbanov@salutedevices.com</email>
</author>
<published>2025-02-10T14:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e278b8c73b0526f8e3ee22f4827c8fe07c2109ba'/>
<id>e278b8c73b0526f8e3ee22f4827c8fe07c2109ba</id>
<content type='text'>
Change the functions spinand_wait() and spinand_otp_page_size() from
static to global so that SPI NAND flash drivers don't duplicate it.

Signed-off-by: Martin Kurbanov &lt;mmkurbanov@salutedevices.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the functions spinand_wait() and spinand_otp_page_size() from
static to global so that SPI NAND flash drivers don't duplicate it.

Signed-off-by: Martin Kurbanov &lt;mmkurbanov@salutedevices.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: spinand: add OTP support</title>
<updated>2025-02-10T14:52:59+00:00</updated>
<author>
<name>Martin Kurbanov</name>
<email>mmkurbanov@salutedevices.com</email>
</author>
<published>2025-02-10T14:34:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c06b1f753bea40a282f29a9383fcf36b12323108'/>
<id>c06b1f753bea40a282f29a9383fcf36b12323108</id>
<content type='text'>
The MTD subsystem already supports accessing two OTP areas: user and
factory. User areas can be written by the user.

This patch provides the SPINAND_FACT_OTP_INFO and SPINAND_USER_OTP_INFO
macros to add parameters to spinand_info.
To implement OTP operations, the client (flash driver) is provided with
callbacks for user area:
    .read(), .write(), .info(), .lock(), .erase();
and for factory area:
    .read(), .info();

Signed-off-by: Martin Kurbanov &lt;mmkurbanov@salutedevices.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The MTD subsystem already supports accessing two OTP areas: user and
factory. User areas can be written by the user.

This patch provides the SPINAND_FACT_OTP_INFO and SPINAND_USER_OTP_INFO
macros to add parameters to spinand_info.
To implement OTP operations, the client (flash driver) is provided with
callbacks for user area:
    .read(), .write(), .info(), .lock(), .erase();
and for factory area:
    .read(), .info();

Signed-off-by: Martin Kurbanov &lt;mmkurbanov@salutedevices.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
