<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/mtd/spi-nor/core.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/mtd/spi-nor/core.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/mtd/spi-nor/core.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-05-09T11:25:22Z</updated>
<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://git.zx2c4.com/linux-dev/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: export spi_nor_hwcaps_pp2cmd()</title>
<updated>2022-05-09T11:25:22Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2022-04-29T10:20:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d92e0dbc6a2686e20b558220376d5d1c6b0d9108'/>
<id>urn:sha1:d92e0dbc6a2686e20b558220376d5d1c6b0d9108</id>
<content type='text'>
The function will also be used by the debugfs module.

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-1-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://git.zx2c4.com/linux-dev/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: Introduce templates for SPI NOR operations</title>
<updated>2022-04-27T09:27:36Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-04-20T10:34:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c0abb861c5d040ae2d55832829f4bf0c5aab6daa'/>
<id>urn:sha1:c0abb861c5d040ae2d55832829f4bf0c5aab6daa</id>
<content type='text'>
Clean the op declaration and hide the details of each op. With this it
results a cleanner, easier to read code. No functional change expected.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Acked-by: Michael Walle &lt;michael@walle.cc&gt;
Acked-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220420103427.47867-10-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: core: Add helpers to read/write any register</title>
<updated>2022-04-27T09:27:36Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-04-20T10:34:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a604ab33cb4a32e12f17b43385fdeea551ce8edc'/>
<id>urn:sha1:a604ab33cb4a32e12f17b43385fdeea551ce8edc</id>
<content type='text'>
There are manufacturers that use registers indexed by address. Some of
them support "read/write any register" opcodes. Provide core methods that
can be used by all manufacturers. SPI NOR controller ops are intentionally
not supported as we intend to move all the SPI NOR controller drivers
under the SPI subsystem.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Tested-by: Takahiro Kuwano &lt;Takahiro.Kuwano@infineon.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20220420103427.47867-7-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: core: Introduce method for RDID op</title>
<updated>2022-04-27T09:27:35Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-04-20T10:34:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=86b6b55ffbbc0df2c8e3c1d62fd12388737225f6'/>
<id>urn:sha1:86b6b55ffbbc0df2c8e3c1d62fd12388737225f6</id>
<content type='text'>
RDID is used in the core to auto detect the flash, but also by some
manufacturer drivers that contain flashes that support Octal DTR mode,
so that they can read the flash ID after the switch to Octal DTR was made
to test if the switch was successful. Introduce a core method for RDID op
to avoid code duplication.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20220420103427.47867-5-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: core: Use auto-detection only once</title>
<updated>2022-04-27T09:27:35Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-04-20T10:34:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bffabd1c727d663adf67ea762acc0e57164b3281'/>
<id>urn:sha1:bffabd1c727d663adf67ea762acc0e57164b3281</id>
<content type='text'>
In case spi_nor_match_name() returned NULL, the auto detection was
issued twice. There's no reason to try to detect the same chip twice,
do the auto detection only once.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20220420103427.47867-4-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: Introduce spi_nor_match_id()</title>
<updated>2022-04-27T09:27:35Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-04-20T10:34:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d0ddd88438d242de0de58b24eb9422e4ba183023'/>
<id>urn:sha1:d0ddd88438d242de0de58b24eb9422e4ba183023</id>
<content type='text'>
Similar to spi_nor_match_name() extend the search of flash_info through
all the manufacturers, this time doing the match by ID. There's no reason
to limit the search per manufacturer yet, do it globally, search the flash
in all the parts of all manufacturers in a single method.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20220420103427.47867-3-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: Rename method, s/spi_nor_match_id/spi_nor_match_name</title>
<updated>2022-04-27T09:27:35Z</updated>
<author>
<name>Tudor Ambarus</name>
<email>tudor.ambarus@microchip.com</email>
</author>
<published>2022-04-20T10:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=b1145d6f1e8a6575c88a2e6b7e2d84ebd4f5f4fb'/>
<id>urn:sha1:b1145d6f1e8a6575c88a2e6b7e2d84ebd4f5f4fb</id>
<content type='text'>
The method is matching a flash_info entry by searching by name. Rename
the method for better clarity.

Signed-off-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20220420103427.47867-2-tudor.ambarus@microchip.com
</content>
</entry>
<entry>
<title>mtd: spi-nor: core: Check written SR value in spi_nor_write_16bit_sr_and_check()</title>
<updated>2022-04-27T09:27:35Z</updated>
<author>
<name>Chen-Tsung Hsieh</name>
<email>chentsung@chromium.org</email>
</author>
<published>2022-01-26T07:32:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=70dd83d737d8900b2d98db6dc6b928c596334d37'/>
<id>urn:sha1:70dd83d737d8900b2d98db6dc6b928c596334d37</id>
<content type='text'>
Read back Status Register 1 to ensure that the written byte match the
received value and return -EIO if read back test failed.

Without this patch, spi_nor_write_16bit_sr_and_check() only check the
second half of the 16bit. It causes errors like spi_nor_sr_unlock()
return success incorrectly when spi_nor_write_16bit_sr_and_check()
doesn't write SR successfully.

Fixes: 39d1e3340c73 ("mtd: spi-nor: Fix clearing of QE bit on lock()/unlock()")
Signed-off-by: Chen-Tsung Hsieh &lt;chentsung@chromium.org&gt;
Signed-off-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Reviewed-by: Michael Walle &lt;michael@walle.cc&gt;
Reviewed-by: Tudor Ambarus &lt;tudor.ambarus@microchip.com&gt;
Acked-by: Pratyush Yadav &lt;p.yadav@ti.com&gt;
Link: https://lore.kernel.org/r/20220126073227.3401275-1-chentsung@chromium.org
</content>
</entry>
</feed>
