<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/Intel-BMC/linux.git/drivers/mtd, branch dev-5.14-intel</title>
<subtitle>Intel OpenBMC Linux kernel source tree (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-5.14-intel</id>
<link rel='self' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/atom?h=dev-5.14-intel'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/'/>
<updated>2021-10-19T22:10:33+00:00</updated>
<entry>
<title>SPI Quad IO driver support AST2600</title>
<updated>2021-10-19T22:10:33+00:00</updated>
<author>
<name>arun-pm</name>
<email>arun.p.m@linux.intel.com</email>
</author>
<published>2019-12-03T11:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7b0504f9d041dbb524059258181487dc4ef6065c'/>
<id>urn:sha1:7b0504f9d041dbb524059258181487dc4ef6065c</id>
<content type='text'>
This commit adds spi driver quad io support for AST2600

Note:- Removed n25q00 Quad I/O support for the time being due to clock issue
 with chip 'Micron 8UA15 - rw182 (128MB)' while enabling Quad I/O mode.

Signed-off-by: arun-pm &lt;arun.p.m@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v5.14.11' into dev-5.14</title>
<updated>2021-10-11T05:22:51+00:00</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2021-10-11T05:22:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=d9563a2fe5e92439bbb1513482702d3eec520de8'/>
<id>urn:sha1:d9563a2fe5e92439bbb1513482702d3eec520de8</id>
<content type='text'>
This is the 5.14.11 stable release

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>mtd: rawnand: cafe: Fix a resource leak in the error handling path of 'cafe_nand_probe()'</title>
<updated>2021-09-22T10:39:29+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2021-08-21T07:58:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=6989067d55cd83d1b7c883d87ab775a599a64880'/>
<id>urn:sha1:6989067d55cd83d1b7c883d87ab775a599a64880</id>
<content type='text'>
[ Upstream commit 6b430c7595e4eb95fae8fb54adc3c3ce002e75ae ]

A successful 'init_rs_non_canonical()' call should be balanced by a
corresponding 'free_rs()' call in the error handling path of the probe, as
already done in the remove function.

Update the error handling path accordingly.

Fixes: 8c61b7a7f4d4 ("[MTD] [NAND] Use rslib for CAFÉ ECC")
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/fd313d3fb787458bcc73189e349f481133a2cdc9.1629532640.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: mtdconcat: Check _read, _write callbacks existence before assignment</title>
<updated>2021-09-22T10:39:29+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2021-08-17T11:48:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=7655140eda8610850976695f14304f141aef4996'/>
<id>urn:sha1:7655140eda8610850976695f14304f141aef4996</id>
<content type='text'>
[ Upstream commit a89d69a44e282be95ae76125dddc79515541efeb ]

Since 2431c4f5b46c3 ("mtd: Implement mtd_{read,write}() as wrappers
around mtd_{read,write}_oob()") don't allow _write|_read and
_write_oob|_read_oob existing at the same time, we should check the
existence of callbacks "_read and _write" from subdev's master device
(We can trust master device since it has been registered) before
assigning, otherwise following warning occurs while making
concatenated device:

  WARNING: CPU: 2 PID: 6728 at drivers/mtd/mtdcore.c:595
  add_mtd_device+0x7f/0x7b0

Fixes: 2431c4f5b46c3 ("mtd: Implement mtd_{read,write}() around ...")
Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210817114857.2784825-3-chengzhihao1@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mtd: mtdconcat: Judge callback existence based on the master</title>
<updated>2021-09-22T10:39:29+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2021-08-17T11:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5cd5c566aaf36c829c3e9656c86a752c398ed8c5'/>
<id>urn:sha1:5cd5c566aaf36c829c3e9656c86a752c398ed8c5</id>
<content type='text'>
[ Upstream commit f9e109a209a8e01e16f37e1252304f1eb3908be4 ]

Since commit 46b5889cc2c5("mtd: implement proper partition handling")
applied, mtd partition device won't hold some callback functions, such
as _block_isbad, _block_markbad, etc. Besides, function mtd_block_isbad()
will get mtd device's master mtd device, then invokes master mtd device's
callback function. So, following process may result mtd_block_isbad()
always return 0, even though mtd device has bad blocks:

1. Split a mtd device into 3 partitions: PA, PB, PC
[ Each mtd partition device won't has callback function _block_isbad(). ]
2. Concatenate PA and PB as a new mtd device PN
[ mtd_concat_create() finds out each subdev has no callback function
_block_isbad(), so PN won't be assigned callback function
concat_block_isbad(). ]
Then, mtd_block_isbad() checks "!master-&gt;_block_isbad" is true, will
always return 0.

Reproducer:
// reproduce.c
static int __init init_diy_module(void)
{
	struct mtd_info *mtd[2];
	struct mtd_info *mtd_combine = NULL;

	mtd[0] = get_mtd_device_nm("NAND simulator partition 0");
	if (!mtd[0]) {
		pr_err("cannot find mtd1\n");
		return -EINVAL;
	}
	mtd[1] = get_mtd_device_nm("NAND simulator partition 1");
	if (!mtd[1]) {
		pr_err("cannot find mtd2\n");
		return -EINVAL;
	}

	put_mtd_device(mtd[0]);
	put_mtd_device(mtd[1]);

	mtd_combine = mtd_concat_create(mtd, 2, "Combine mtd");
	if (mtd_combine == NULL) {
		pr_err("combine failed\n");
		return -EINVAL;
	}

	mtd_device_register(mtd_combine, NULL, 0);
	pr_info("Combine success\n");

	return 0;
}

1. ID="0x20,0xac,0x00,0x15"
2. modprobe nandsim id_bytes=$ID parts=50,100 badblocks=100
3. insmod reproduce.ko
4. flash_erase /dev/mtd3 0 0
  libmtd: error!: MEMERASE64 ioctl failed for eraseblock 100 (mtd3)
  error 5 (Input/output error)
  // Should be "flash_erase: Skipping bad block at 00c80000"

Fixes: 46b5889cc2c54bac ("mtd: implement proper partition handling")
Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210817114857.2784825-2-chengzhihao1@huawei.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v5.14.6' into dev-5.14</title>
<updated>2021-09-22T00:13:12+00:00</updated>
<author>
<name>Joel Stanley</name>
<email>joel@jms.id.au</email>
</author>
<published>2021-09-22T00:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5fa6722422299ba19d11579cf3cef038f183b80b'/>
<id>urn:sha1:5fa6722422299ba19d11579cf3cef038f183b80b</id>
<content type='text'>
This is the 5.14.6 stable release
</content>
</entry>
<entry>
<title>mtd: rawnand: intel: Fix error handling in probe</title>
<updated>2021-09-18T11:44:01+00:00</updated>
<author>
<name>Evgeny Novikov</name>
<email>novikov@ispras.ru</email>
</author>
<published>2021-08-17T09:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=5be8cf14460c3716fe087630d0a68871077d032b'/>
<id>urn:sha1:5be8cf14460c3716fe087630d0a68871077d032b</id>
<content type='text'>
commit 0792ec82175ec45a0f45af6e0f2d3cb49c527cd4 upstream.

ebu_nand_probe() did not invoke ebu_dma_cleanup() and
clk_disable_unprepare() on some error handling paths. The patch fixes
that.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 0b1039f016e8 ("mtd: rawnand: Add NAND controller support on Intel LGM SoC")
Signed-off-by: Evgeny Novikov &lt;novikov@ispras.ru&gt;
Co-developed-by: Kirill Shilimanov &lt;kirill.shilimanov@huawei.com&gt;
Signed-off-by: Kirill Shilimanov &lt;kirill.shilimanov@huawei.com&gt;
Co-developed-by: Anton Vasilyev &lt;vasilyev@ispras.ru&gt;
Signed-off-by: Anton Vasilyev &lt;vasilyev@ispras.ru&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt;
Link: https://lore.kernel.org/linux-mtd/20210817092930.23040-1-novikov@ispras.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: aspeed: add support for AST2600 training</title>
<updated>2021-09-06T12:18:54+00:00</updated>
<author>
<name>Cédric Le Goater</name>
<email>clg@kaod.org</email>
</author>
<published>2019-09-25T12:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=2d4cece72884567f8c7125ff1822ae99ad261b46'/>
<id>urn:sha1:2d4cece72884567f8c7125ff1822ae99ad261b46</id>
<content type='text'>
The training consists of finding the appropriate read timing delays for
the HCLK dividers 2, 3, 4, and 5 and store the results in the Read Timing
Compensation register. The previous SoC AST2500 and AST2400 were covering
a broader HCLK range [ 1 - 5 ] because the AHB frequency was lower.

The algorithm first reads a golden buffer at low speed and then performs reads
with different clocks and delay cycles settings to find a breaking point.
This selects the default clock frequency for the CEx control register.
The current settings are bit optimistic as we pick the first delay giving
good results. A safer approach would be to determine an interval and
choose the middle value. We might change the approach depending on the
results on other systems.

Only CS0 is taken into account for the moment.

OpenBMC-Staging-Count: 6
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: aspeed: check upper freq limit when doing training</title>
<updated>2021-09-06T12:18:54+00:00</updated>
<author>
<name>Cédric Le Goater</name>
<email>clg@kaod.org</email>
</author>
<published>2019-09-25T12:42:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=c431c08c4a1d9a82d8cc701c8892739a65ecb784'/>
<id>urn:sha1:c431c08c4a1d9a82d8cc701c8892739a65ecb784</id>
<content type='text'>
OpenBMC-Staging-Count: 6
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
<entry>
<title>mtd: spi-nor: aspeed: Introduce a HCLK mask for training</title>
<updated>2021-09-06T12:18:54+00:00</updated>
<author>
<name>Cédric Le Goater</name>
<email>clg@kaod.org</email>
</author>
<published>2019-09-25T12:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/Intel-BMC/linux.git/commit/?id=080c8fed8b616963f2c6322e883a73e8577e11ec'/>
<id>urn:sha1:080c8fed8b616963f2c6322e883a73e8577e11ec</id>
<content type='text'>
The AST2600 handles more HCLK divisors than its predecessors.

OpenBMC-Staging-Count: 6
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
</content>
</entry>
</feed>
