<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/mtd/nand/raw/lpc32xx_mlc.c, branch master</title>
<subtitle>Linux kernel source tree.</subtitle>
<id>https://git.ilvokhin.com/linux.git/atom/drivers/mtd/nand/raw/lpc32xx_mlc.c?h=master</id>
<link rel='self' href='https://git.ilvokhin.com/linux.git/atom/drivers/mtd/nand/raw/lpc32xx_mlc.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/'/>
<updated>2026-07-03T13:45:49Z</updated>
<entry>
<title>mtd: rawnand: lpc32xx_mlc: fail DMA transfers on timeout</title>
<updated>2026-07-03T13:45:49Z</updated>
<author>
<name>Pengpeng Hou</name>
<email>pengpeng@iscas.ac.cn</email>
</author>
<published>2026-07-03T07:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=dbf590b662695b16fbf5917ef129697be4410ea9'/>
<id>urn:sha1:dbf590b662695b16fbf5917ef129697be4410ea9</id>
<content type='text'>
lpc32xx_xmit_dma() starts a DMA transfer and waits up to one second
for its completion, but it ignores the wait result and returns success
after unmapping the buffer.

A timed out read can therefore return success with incomplete data, and
a timed out write can continue the NAND operation without proof that the
DMA payload reached the controller.

Terminate the DMA channel on timeout, unmap the scatterlist through the
existing cleanup path, and return -ETIMEDOUT to the NAND read/write
callers. Initialize the shared cleanup-path result before using it for
dmaengine_prep_slave_sg() failures.

Fixes: 70f7cb78ec53 ("mtd: add LPC32xx MLC NAND driver")
Cc: stable@vger.kernel.org
Reviewed-by: Vladimir Zapolskiy &lt;vz@kernel.org&gt;
Signed-off-by: Pengpeng Hou &lt;pengpeng@iscas.ac.cn&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: Switch back to struct platform_driver::remove()</title>
<updated>2024-10-21T09:58:07Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-10-07T20:58:07Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=f8470006c4d6bd54dbf9a3479f85e13387bff56d'/>
<id>urn:sha1:f8470006c4d6bd54dbf9a3479f85e13387bff56d</id>
<content type='text'>
After commit 0edb555a65d1 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/mtd to use .remove(), with
the eventual goal to drop struct platform_driver::remove_new(). As
.remove() and .remove_new() have the same prototypes, conversion is done
by just changing the structure member name in the driver initializer.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20241007205803.444994-10-u.kleine-koenig@baylibre.com
</content>
</entry>
<entry>
<title>mtd: rawnand: lpx32xx: Fix dma_request_chan() error checks</title>
<updated>2024-07-17T08:39:39Z</updated>
<author>
<name>Piotr Wojtaszczyk</name>
<email>piotr.wojtaszczyk@timesys.com</email>
</author>
<published>2024-07-05T11:51:35Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=a503f91a3645651a39baf97f1aed90d5d9f9bda9'/>
<id>urn:sha1:a503f91a3645651a39baf97f1aed90d5d9f9bda9</id>
<content type='text'>
The dma_request_chan() returns error pointer in case of error, while
dma_request_channel() returns NULL in case of error therefore different
error checks are needed for the two.

Fixes: 7326d3fb1ee3 ("mtd: rawnand: lpx32xx: Request DMA channels using DT entries")
Signed-off-by: Piotr Wojtaszczyk &lt;piotr.wojtaszczyk@timesys.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20240705115139.126522-1-piotr.wojtaszczyk@timesys.com
</content>
</entry>
<entry>
<title>mtd: rawnand: lpx32xx: Request DMA channels using DT entries</title>
<updated>2024-07-17T08:39:38Z</updated>
<author>
<name>Piotr Wojtaszczyk</name>
<email>piotr.wojtaszczyk@timesys.com</email>
</author>
<published>2024-06-27T15:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=4782118674600ce1b1622ea66501ff9e484360b1'/>
<id>urn:sha1:4782118674600ce1b1622ea66501ff9e484360b1</id>
<content type='text'>
Move away from pl08x platform data towards device tree.

Signed-off-by: Piotr Wojtaszczyk &lt;piotr.wojtaszczyk@timesys.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20240627150046.258795-11-piotr.wojtaszczyk@timesys.com
</content>
</entry>
<entry>
<title>mtd: rawnand: lpc32xx_mlc: fix irq handler prototype</title>
<updated>2024-02-26T10:36:19Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2024-02-13T10:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=347b828882e6334690e7003ce5e2fe5f233dc508'/>
<id>urn:sha1:347b828882e6334690e7003ce5e2fe5f233dc508</id>
<content type='text'>
clang-16 warns about mismatched function prototypes:

drivers/mtd/nand/raw/lpc32xx_mlc.c:783:29: error: cast from 'irqreturn_t (*)(int, struct lpc32xx_nand_host *)' (aka 'enum irqreturn (*)(int, struct lpc32xx_nand_host *)') to 'irq_handler_t' (aka 'enum irqreturn (*)(int, void *)') converts to incompatible function type [-Werror,-Wcast-function-type-strict]

Change the interrupt handler to the normal way of just passing
a void* pointer and converting it inside the function..

Fixes: 70f7cb78ec53 ("mtd: add LPC32xx MLC NAND driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20240213100146.455811-1-arnd@kernel.org
</content>
</entry>
<entry>
<title>mtd: rawnand: lpc32xx_mlc: Use devm_platform_get_and_ioremap_resource()</title>
<updated>2023-07-12T12:07:52Z</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-07-07T04:06:11Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=9cd9dda8f06c9100997e981f11e8ef9cec042a95'/>
<id>urn:sha1:9cd9dda8f06c9100997e981f11e8ef9cec042a95</id>
<content type='text'>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230707040622.78174-7-frank.li@vivo.com
</content>
</entry>
<entry>
<title>mtd: nand: Convert to platform remove callback returning void</title>
<updated>2023-04-11T13:42:24Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-04-11T11:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=ec185b18c22323cb0cde0319fa90b3e467b1ed2d'/>
<id>urn:sha1:ec185b18c22323cb0cde0319fa90b3e467b1ed2d</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Acked-by: Tudor Ambarus &lt;tudor.ambarus@linaro.org&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@microchip.com&gt; # atmel
Reviewed-by: Paul Cercueil &lt;paul@crapouillou.net&gt; # ingenic
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt; # ingenic
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt; # intel
Reviewed-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt; # meson
Acked-by: Roger Quadros &lt;rogerq@kernel.org&gt; # omap_elm
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt; # renesas
Reviewed-by: Heiko Stuebner &lt;heiko@sntech.de&gt; # rockchip
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt; # sunxi
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt; # tegra
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20230411113816.3472237-1-u.kleine-koenig@pengutronix.de
</content>
</entry>
<entry>
<title>mtd: rawnand: lpc32xx_mlc: Switch to using pm_ptr()</title>
<updated>2022-11-07T16:17:21Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2022-10-27T13:10:27Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=991cc42a276f1d9303674a04a351942e47c29a3f'/>
<id>urn:sha1:991cc42a276f1d9303674a04a351942e47c29a3f</id>
<content type='text'>
The switch to using the gpiod API removed the last user of
lpc32xx_wp_disable() outside #ifdef CONFIG_PM, causing build failures if
CONFIG_PM=n:

    drivers/mtd/nand/raw/lpc32xx_mlc.c:380:13: error: ‘lpc32xx_wp_disable’ defined but not used [-Werror=unused-function]
      380 | static void lpc32xx_wp_disable(struct lpc32xx_nand_host *host)
          |             ^~~~~~~~~~~~~~~~~~

Fix this by switching from #ifdef CONFIG_PM to pm_ptr(), increasing
compile-coverage as a side-effect.

Reported-by: noreply@ellerman.id.au
Fixes: 782e32a990d9d702 ("mtd: rawnand: lpc32xx_mlc: switch to using gpiod API")
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20221027131028.3838303-1-geert@linux-m68k.org
</content>
</entry>
<entry>
<title>mtd: rawnand: lpc32xx_mlc: switch to using gpiod API</title>
<updated>2022-10-18T08:36:03Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2022-09-28T23:00:18Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=782e32a990d9d7029a8400f09a4d02b1ba78cb77'/>
<id>urn:sha1:782e32a990d9d7029a8400f09a4d02b1ba78cb77</id>
<content type='text'>
This switches the driver from legacy gpio API to a newer gpiod API.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20220928230019.2140896-1-dmitry.torokhov@gmail.com
</content>
</entry>
<entry>
<title>mtd: nand: ecc-hamming: Remove useless includes</title>
<updated>2020-12-10T21:37:30Z</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@bootlin.com</email>
</author>
<published>2020-09-29T23:01:21Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=eb08376a5dd943cf2a7360f236fe20bbd709fa95'/>
<id>urn:sha1:eb08376a5dd943cf2a7360f236fe20bbd709fa95</id>
<content type='text'>
Most of the includes are simply useless, drop them.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20200929230124.31491-18-miquel.raynal@bootlin.com
</content>
</entry>
</feed>
