<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v5.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-02-13T13:19:40Z</updated>
<entry>
<title>mtd: powernv_flash: Fix device registration error</title>
<updated>2019-02-13T13:19:40Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@linux.ibm.com</email>
</author>
<published>2019-02-11T13:33:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e35730dd7540bad2d4e002703996391d9be49a0'/>
<id>urn:sha1:3e35730dd7540bad2d4e002703996391d9be49a0</id>
<content type='text'>
This change helps me to get multiple mtd device registered. Without this
I get

sysfs: cannot create duplicate filename '/bus/nvmem/devices/flash0'
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.0.0-rc2-00557-g1ef20ef21f22 #13
Call Trace:
[c0000000b38e3220] [c000000000b58fe4] dump_stack+0xe8/0x164 (unreliable)
[c0000000b38e3270] [c0000000004cf074] sysfs_warn_dup+0x84/0xb0
[c0000000b38e32f0] [c0000000004cf6c4] sysfs_do_create_link_sd.isra.0+0x114/0x150
[c0000000b38e3340] [c000000000726a84] bus_add_device+0x94/0x1e0
[c0000000b38e33c0] [c0000000007218f0] device_add+0x4d0/0x830
[c0000000b38e3480] [c0000000009d54a8] nvmem_register.part.2+0x1c8/0xb30
[c0000000b38e3560] [c000000000834530] mtd_nvmem_add+0x90/0x120
[c0000000b38e3650] [c000000000835bc8] add_mtd_device+0x198/0x4e0
[c0000000b38e36f0] [c00000000083619c] mtd_device_parse_register+0x11c/0x280
[c0000000b38e3780] [c000000000840830] powernv_flash_probe+0x180/0x250
[c0000000b38e3820] [c00000000072c120] platform_drv_probe+0x60/0xf0
[c0000000b38e38a0] [c0000000007283c8] really_probe+0x138/0x4d0
[c0000000b38e3930] [c000000000728acc] driver_probe_device+0x13c/0x1b0
[c0000000b38e39b0] [c000000000728c7c] __driver_attach+0x13c/0x1c0
[c0000000b38e3a30] [c000000000725130] bus_for_each_dev+0xa0/0x120
[c0000000b38e3a90] [c000000000727b2c] driver_attach+0x2c/0x40
[c0000000b38e3ab0] [c0000000007270f8] bus_add_driver+0x228/0x360
[c0000000b38e3b40] [c00000000072a2e0] driver_register+0x90/0x1a0
[c0000000b38e3bb0] [c00000000072c020] __platform_driver_register+0x50/0x70
[c0000000b38e3bd0] [c00000000105c984] powernv_flash_driver_init+0x24/0x38
[c0000000b38e3bf0] [c000000000010904] do_one_initcall+0x84/0x464
[c0000000b38e3cd0] [c000000001004548] kernel_init_freeable+0x530/0x634
[c0000000b38e3db0] [c000000000011154] kernel_init+0x1c/0x168
[c0000000b38e3e20] [c00000000000bed4] ret_from_kernel_thread+0x5c/0x68
mtd mtd1: Failed to register NVMEM device

With the change we now have

root@(none):/sys/bus/nvmem/devices# ls -al
total 0
drwxr-xr-x 2 root root 0 Feb  6 20:49 .
drwxr-xr-x 4 root root 0 Feb  6 20:49 ..
lrwxrwxrwx 1 root root 0 Feb  6 20:49 flash@0 -&gt; ../../../devices/platform/ibm,opal:flash@0/mtd/mtd0/flash@0
lrwxrwxrwx 1 root root 0 Feb  6 20:49 flash@1 -&gt; ../../../devices/platform/ibm,opal:flash@1/mtd/mtd1/flash@1

Fixes: 1cbb4a1c433a ("mtd: powernv: Add powernv flash MTD abstraction driver")
Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
</content>
</entry>
<entry>
<title>mtd: Use mtd-&gt;name when registering nvmem device</title>
<updated>2019-02-13T13:10:22Z</updated>
<author>
<name>Aneesh Kumar K.V</name>
<email>aneesh.kumar@linux.ibm.com</email>
</author>
<published>2019-02-11T13:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6e9526852fad7eb77b7755114951237312258ec7'/>
<id>urn:sha1:6e9526852fad7eb77b7755114951237312258ec7</id>
<content type='text'>
With this patch, we use the mtd-&gt;name instead of concatenating the name
with '0'.

Fixes: c4dfa25ab307 ("mtd: add support for reading MTD devices via the nvmem API")
Signed-off-by: Aneesh Kumar K.V &lt;aneesh.kumar@linux.ibm.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: gpmi: fix MX28 bus master lockup problem</title>
<updated>2019-02-06T08:39:22Z</updated>
<author>
<name>Martin Kepplinger</name>
<email>martin.kepplinger@ginzinger.com</email>
</author>
<published>2019-02-05T15:52:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5d27fd9826b59979b184ec288e4812abac0e988'/>
<id>urn:sha1:d5d27fd9826b59979b184ec288e4812abac0e988</id>
<content type='text'>
Disable BCH soft reset according to MX23 erratum #2847 ("BCH soft
reset may cause bus master lock up") for MX28 too. It has the same
problem.

Observed problem: once per 100,000+ MX28 reboots NAND read failed on
DMA timeout errors:
[    1.770823] UBI: attaching mtd3 to ubi0
[    2.768088] gpmi_nand: DMA timeout, last DMA :1
[    3.958087] gpmi_nand: BCH timeout, last DMA :1
[    4.156033] gpmi_nand: Error in ECC-based read: -110
[    4.161136] UBI warning: ubi_io_read: error -110 while reading 64
bytes from PEB 0:0, read only 0 bytes, retry
[    4.171283] step 1 error
[    4.173846] gpmi_nand: Chip: 0, Error -1

Without BCH soft reset we successfully executed 1,000,000 MX28 reboots.

I have a quote from NXP regarding this problem, from July 18th 2016:

"As the i.MX23 and i.MX28 are of the same generation, they share many
characteristics. Unfortunately, also the erratas may be shared.
In case of the documented erratas and the workarounds, you can also
apply the workaround solution of one device on the other one. This have
been reported, but I’m afraid that there are not an estimated date for
updating the Errata documents.
Please accept our apologies for any inconveniences this may cause."

Fixes: 6f2a6a52560a ("mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems")
Cc: stable@vger.kernel.org
Signed-off-by: Manfred Schlaegl &lt;manfred.schlaegl@ginzinger.com&gt;
Signed-off-by: Martin Kepplinger &lt;martin.kepplinger@ginzinger.com&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Acked-by: Han Xu &lt;han.xu@nxp.com&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: Make sure mtd-&gt;erasesize is valid even if the partition is of size 0</title>
<updated>2019-02-05T23:02:51Z</updated>
<author>
<name>Boris Brezillon</name>
<email>bbrezillon@kernel.org</email>
</author>
<published>2019-01-30T11:55:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad4635153034c20c6f6e211e2ed3fd38b658649a'/>
<id>urn:sha1:ad4635153034c20c6f6e211e2ed3fd38b658649a</id>
<content type='text'>
Commit 33f45c44d68b ("mtd: Do not allow MTD devices with inconsistent
erase properties") introduced a check to make sure -&gt;erasesize and
-&gt;_erase values are consistent with the MTD_NO_ERASE flag.
This patch did not take the 0 bytes partition case into account which
can happen when the defined partition is outside the flash device memory
range. Fix that by setting the partition erasesize to the parent
erasesize.

Fixes: 33f45c44d68b ("mtd: Do not allow MTD devices with inconsistent erase properties")
Reported-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Tested-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
</content>
</entry>
<entry>
<title>mtd: Remove a debug trace in mtdpart.c</title>
<updated>2019-02-01T08:44:58Z</updated>
<author>
<name>Boris Brezillon</name>
<email>bbrezillon@kernel.org</email>
</author>
<published>2019-01-30T08:47:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bda2ab56356b9acdfab150f31c4bac9846253092'/>
<id>urn:sha1:bda2ab56356b9acdfab150f31c4bac9846253092</id>
<content type='text'>
Commit 2b6f0090a333 ("mtd: Check add_mtd_device() ret code") contained
a leftover of the debug session that led to this bug fix. Remove this
pr_info().

Fixes: 2b6f0090a333 ("mtd: Check add_mtd_device() ret code")
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: fix kernel-doc warnings</title>
<updated>2019-01-31T11:31:09Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2019-01-28T02:21:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=455e7b387b441ddd1da1df35251c179fe7805b53'/>
<id>urn:sha1:455e7b387b441ddd1da1df35251c179fe7805b53</id>
<content type='text'>
Fix kernel-doc warnings in drivers/mtd/nand/raw:

../drivers/mtd/nand/raw/nand_base.c:420: warning: Function parameter or member 'chip' not described in 'nand_fill_oob'
../drivers/mtd/nand/raw/nand_bbt.c:173: warning: Function parameter or member 'this' not described in 'read_bbt'
../drivers/mtd/nand/raw/nand_bbt.c:173: warning: Excess function parameter 'chip' description in 'read_bbt'

Fixes: 0813621ba898a ("mtd: rawnand: Stop passing mtd_info objects to internal functions")
Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Boris Brezillon &lt;boris.brezillon@bootlin.com&gt;
Cc: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: linux-mtd@lists.infradead.org
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: spinand: Fix the error/cleanup path in spinand_init()</title>
<updated>2019-01-31T11:31:02Z</updated>
<author>
<name>Boris Brezillon</name>
<email>bbrezillon@kernel.org</email>
</author>
<published>2019-01-24T14:46:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3c7dbf4887ab3ed9d611cd1f6e16937f8700743'/>
<id>urn:sha1:c3c7dbf4887ab3ed9d611cd1f6e16937f8700743</id>
<content type='text'>
The manufacturer specific initialization has already been done when
block unlocking takes place, and if anything goes wrong during this
procedure we should call spinand_manufacturer_cleanup().

Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: spinand: Handle the case where PROGRAM LOAD does not reset the cache</title>
<updated>2019-01-31T11:30:51Z</updated>
<author>
<name>Boris Brezillon</name>
<email>bbrezillon@kernel.org</email>
</author>
<published>2019-01-24T14:20:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=13c15e07eedf26092054c8c71f2f47edb8388310'/>
<id>urn:sha1:13c15e07eedf26092054c8c71f2f47edb8388310</id>
<content type='text'>
Looks like PROGRAM LOAD (AKA write cache) does not necessarily reset
the cache content to 0xFF (depends on vendor implementation), so we
must fill the page cache entirely even if we only want to program the
data portion of the page, otherwise we might corrupt the BBM or user
data previously programmed in OOB area.

Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Reported-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
Tested-by: Stefan Roese &lt;sr@denx.de&gt;
Reviewed-by: Stefan Roese &lt;sr@denx.de&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: denali: get -&gt;setup_data_interface() working again</title>
<updated>2019-01-18T09:27:01Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2019-01-18T05:30:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d311e0c27b8fcc27f707f8cac48cd8bdc4155224'/>
<id>urn:sha1:d311e0c27b8fcc27f707f8cac48cd8bdc4155224</id>
<content type='text'>
Commit 7a08dbaedd36 ("mtd: rawnand: Move -&gt;setup_data_interface() to
nand_controller_ops") missed to invert the if-conditonal for denali.
Since then, the Denali NAND driver cannnot invoke setup_data_interface.

Fixes: 7a08dbaedd36 ("mtd: rawnand: Move -&gt;setup_data_interface() to nand_controller_ops")
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: nand: jz4740: fix '__iomem *' vs. '* __iomem'</title>
<updated>2019-01-18T09:26:46Z</updated>
<author>
<name>Luc Van Oostenryck</name>
<email>luc.vanoostenryck@gmail.com</email>
</author>
<published>2019-01-17T17:39:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01eeb927bbcc1952114b0aec1447699c4747c337'/>
<id>urn:sha1:01eeb927bbcc1952114b0aec1447699c4747c337</id>
<content type='text'>
The function jz_nand_ioremap_resource() needs a pointer to an __iomem
pointer as its last argument but this argument is declared as:
	void * __iomem *base

Fix this by using the correct declaration:
	void __iomem **base
which then also removes the following Sparse's warnings:
  282:15: warning: incorrect type in assignment (different address spaces)
  282:15:    expected void *[noderef] &lt;asn:2&gt;
  282:15:    got void [noderef] &lt;asn:2&gt; *
  322:57: warning: incorrect type in argument 4 (different address spaces)
  322:57:    expected void *[noderef] &lt;asn:2&gt; *base
  322:57:    got void [noderef] &lt;asn:2&gt; **
  402:67: warning: incorrect type in argument 4 (different address spaces)
  402:67:    expected void *[noderef] &lt;asn:2&gt; *base
  402:67:    got void [noderef] &lt;asn:2&gt; **

Signed-off-by: Luc Van Oostenryck &lt;luc.vanoostenryck@gmail.com&gt;
Acked-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Signed-off-by: Boris Brezillon &lt;bbrezillon@kernel.org&gt;
</content>
</entry>
</feed>
