<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/linux/mtd/spi-nor.h, branch linux-6.17.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.17.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.17.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-04-04T06:43:50Z</updated>
<entry>
<title>mtd: spi-nor: Stop exporting spi_nor_restore()</title>
<updated>2023-04-04T06:43:50Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@linaro.org</email>
</author>
<published>2023-03-31T07:46:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7fe1b00d92eaceb83f95200b5114cf5df0919892'/>
<id>urn:sha1:7fe1b00d92eaceb83f95200b5114cf5df0919892</id>
<content type='text'>
Some SPI NOR controllers that used this method were moved to
drivers/spi/. We don't accept new support for the existing SPI NOR
controllers drivers under drivers/mtd/spi-nor/controllers/ and we
encourage their owners to move the drivers under drivers/spi/.
Make spi_nor_restore() private as we're going to use it just in core.c.

Link: https://lore.kernel.org/r/20230331074606.3559258-8-tudor.ambarus@linaro.org
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: Enhance locking to support reads while writes</title>
<updated>2023-03-29T10:46:07Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2023-03-28T15:41:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74df43b3f626a3594a4de50556048852bf2753f7'/>
<id>urn:sha1:74df43b3f626a3594a4de50556048852bf2753f7</id>
<content type='text'>
On devices featuring several banks, the Read While Write (RWW) feature
is here to improve the overall performance when performing parallel
reads and writes at different locations (different banks). The following
constraints have to be taken into account:
1#: A single operation can be performed in a given bank.
2#: Only a single program or erase operation can happen on the entire
    chip (common hardware limitation to limit costs)
3#: Reads must remain serialized even though reads crossing bank
    boundaries are allowed.
4#: The I/O bus is unique and thus is the most constrained resource, all
    spi-nor operations requiring access to the spi bus (through the spi
    controller) must be serialized until the bus exchanges are over. So
    we must ensure a single operation can be "sent" at a time.
5#: Any other operation that would not be either a read or a write or an
    erase is considered requiring access to the full chip and cannot be
    parallelized, we then need to ensure the full chip is in the idle
    state when this occurs.

All these constraints can easily be managed with a proper locking model:
1#: Is enforced by a bitfield of the in-use banks, so that only a single
    operation can happen in a specific bank at any time.
2#: Is handled by the ongoing_pe boolean which is set before any write
    or erase, and is released only at the very end of the
    operation. This way, no other destructive operation on the chip can
    start during this time frame.
3#: An ongoing_rd boolean allows to track the ongoing reads, so that
    only one can be performed at a time.
4#: An ongoing_io boolean is introduced in order to capture and serialize
    bus accessed. This is the one being released "sooner" than before,
    because we only need to protect the chip against other SPI accesses
    during the I/O phase, which for the destructive operations is the
    beginning of the operation (when we send the command cycles and
    possibly the data), while the second part of the operation (the
    erase delay or the programmation delay) is when we can do something
    else in another bank.
5#: Is handled by the three booleans presented above, if any of them is
    set, the chip is not yet ready for the operation and must wait.

All these internal variables are protected by the existing lock, so that
changes in this structure are atomic. The serialization is handled with
a wait queue.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/r/20230328154105.448540-8-miquel.raynal@bootlin.com
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
</content>
</entry>
<entry>
<title>mtd: cfi: allow building spi-intel standalone</title>
<updated>2023-01-02T11:08:53Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2022-12-20T14:13:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d19ab1f785d0b6b9f709799f0938658903821ba1'/>
<id>urn:sha1:d19ab1f785d0b6b9f709799f0938658903821ba1</id>
<content type='text'>
When MTD or MTD_CFI_GEOMETRY is disabled, the spi-intel driver
fails to build, as it includes the shared CFI header:

include/linux/mtd/cfi.h:62:2: error: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp]
   62 | #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work.

linux/mtd/spi-nor.h does not actually need to include cfi.h, so
remove the inclusion here to fix the warning. This uncovers a
missing #include in spi-nor/core.c so add that there to
prevent a different build issue.

Fixes: e23e5a05d1fd ("mtd: spi-nor: intel-spi: Convert to SPI MEM")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Reviewed-by: Tokunori Ikegami &lt;ikegami.t@gmail.com&gt;
Acked-by: Pratyush Yadav &lt;pratyush@kernel.org&gt;
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20221220141352.1486360-1-arnd@kernel.org
</content>
</entry>
<entry>
<title>mtd: spi-nor: remember full JEDEC flash ID</title>
<updated>2022-11-21T13:37:15Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-08-10T22:06:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=28ef7670414e309d8bbee41f9389b7e21a58572c'/>
<id>urn:sha1:28ef7670414e309d8bbee41f9389b7e21a58572c</id>
<content type='text'>
At the moment, we print the JEDEC ID that is stored in our database. The
generic flash support won't have such an entry in our database. To find
out the JEDEC ID later we will have to cache it. There is also another
advantage: If the flash is found in the database, the ID could be
truncated because the ID of the entry is used which can be shorter. Some
flashes still holds valuable information in the bytes after the JEDEC ID
and come in handy during debugging of when coping with INFO6() entries.
These are not accessible for now.

Save a copy of the ID bytes after reading and display it via debugfs.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Reviewed-by: Takahiro Kuwano &lt;Takahiro.Kuwano@infineon.com&gt;
Link: https://lore.kernel.org/r/20220810220654.1297699-4-michael@walle.cc
</content>
</entry>
<entry>
<title>mtd: spi-nor: s/addr_width/addr_nbytes</title>
<updated>2022-07-28T02:11:56Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-07-25T09:24:59Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c452d49849d48bd37ae97fc2bc92c6435707c35f'/>
<id>urn:sha1:c452d49849d48bd37ae97fc2bc92c6435707c35f</id>
<content type='text'>
Address width was an unfortunate name, as it means the number of IO lines
used for the address, whereas in the code it is used as the number of
address bytes. s/addr_width/addr_nbytes throughout the entire SPI NOR
framework.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Acked-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220725092505.446315-2-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: expose internal parameters via debugfs</title>
<updated>2022-05-09T11:25:22Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-04-29T10:20:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0257be79fc4a16a3252ce80aa13b3640f728c425'/>
<id>urn:sha1:0257be79fc4a16a3252ce80aa13b3640f728c425</id>
<content type='text'>
There is no way to gather all information to verify support for a new
flash chip. Also if you want to convert an existing flash chip to the
new SFDP parsing, there is not enough information to determine if the
flash will work like before. To ease this development, expose internal
parameters via the debugfs.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220429102018.2361038-2-michael@walle.cc
</content>
</entry>
<entry>
<title>mtd: spi-nor: move spi_nor_write_ear() to winbond module</title>
<updated>2022-05-02T09:12:00Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-04-29T10:01:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94f697c5384bd7f9632acca483ba1ef9dd99ea97'/>
<id>urn:sha1:94f697c5384bd7f9632acca483ba1ef9dd99ea97</id>
<content type='text'>
The "Extended Address Register" is winbond specific. If the flash is
larger than 16MiB and is used in 3 byte address mode, it is used to set
the remaining address bits. Move the write_ear() function, the opcode
macros and the spimem op template into the winbond module and rename
them accordingly.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220429100153.2338501-1-michael@walle.cc
</content>
</entry>
<entry>
<title>mtd: spi-nor: move all spansion specifics into spansion.c</title>
<updated>2022-02-25T16:12:49Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-02-23T13:43:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=837d5181beef068c16bb8424c2c1571a7d5d7966'/>
<id>urn:sha1:837d5181beef068c16bb8424c2c1571a7d5d7966</id>
<content type='text'>
The clear status register flags is only available on spansion flashes.
Move all the functions around that into the spanion module.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Tested-by: Pratyush Yadav &lt;p.yadav@ti.com&gt; # on mt35xu512aba, s28hs512t
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220223134358.1914798-29-michael@walle.cc
</content>
</entry>
<entry>
<title>mtd: spi-nor: move all micron-st specifics into micron-st.c</title>
<updated>2022-02-25T16:12:19Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-02-23T13:43:50Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c770abe52d81089a8b8ecd1fe42722e29bbab5f5'/>
<id>urn:sha1:c770abe52d81089a8b8ecd1fe42722e29bbab5f5</id>
<content type='text'>
The flag status register is only available on micron flashes. Move all
the functions around that into the micron module.

This is almost a mechanical move except for the spi_nor_fsr_ready()
which now also checks the normal status register. Previously, this was
done in spi_nor_ready().

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Tested-by: Pratyush Yadav &lt;p.yadav@ti.com&gt; # on mt35xu512aba, s28hs512t
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220223134358.1914798-25-michael@walle.cc
</content>
</entry>
<entry>
<title>mtd: spi-nor: move all xilinx specifics into xilinx.c</title>
<updated>2022-02-25T16:12:01Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-02-23T13:43:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8b4195cd6dc3f1f0ab457d23d21e9f72fde0760a'/>
<id>urn:sha1:8b4195cd6dc3f1f0ab457d23d21e9f72fde0760a</id>
<content type='text'>
Mechanically move all the xilinx functions to its own module.

Then register the new flash specific ready() function.

Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220223134358.1914798-22-michael@walle.cc
</content>
</entry>
</feed>
