<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/mtd, branch v3.12.23</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.23</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.12.23'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-12-04T19:05:25Z</updated>
<entry>
<title>mtd: map: fixed bug in 64-bit systems</title>
<updated>2013-12-04T19:05:25Z</updated>
<author>
<name>Wang Haitao</name>
<email>wang.haitao1@zte.com.cn</email>
</author>
<published>2013-08-22T11:32:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7524987e3c505dd4e96c1eae5001e06c91d481e9'/>
<id>urn:sha1:7524987e3c505dd4e96c1eae5001e06c91d481e9</id>
<content type='text'>
commit a4d62babf988fe5dfde24437fa135ef147bc7aa0 upstream.

Hardware:
	CPU: XLP832,the 64-bit OS
	NOR Flash:S29GL128S 128M
Software:
	Kernel:2.6.32.41
	Filesystem:JFFS2
When writing files, errors appear:
	Write len 182  but return retlen 180
	Write of 182 bytes at 0x072c815c failed. returned -5, retlen 180
	Write len 186  but return retlen 184
	Write of 186 bytes at 0x072caff4 failed. returned -5, retlen 184
These errors exist only in 64-bit systems,not in 32-bit systems. After analysis, we
found that the left shift operation is wrong in map_word_load_partial. For instance:
	unsigned char buf[3] ={0x9e,0x3a,0xea};
	map_bankwidth(map) is 4;
	for (i=0; i &lt; 3; i++) {
		int bitpos;
		bitpos = (map_bankwidth(map)-1-i)*8;
		orig.x[0] &amp;= ~(0xff &lt;&lt; bitpos);
		orig.x[0] |= buf[i] &lt;&lt; bitpos;
	}

The value of orig.x[0] is expected to be 0x9e3aeaff, but in this situation(64-bit
System) we'll get the wrong value of 0xffffffff9e3aeaff due to the 64-bit sign
extension:
buf[i] is defined as "unsigned char" and the left-shift operation will convert it
to the type of "signed int", so when left-shift buf[i] by 24 bits, the final result
will get the wrong value: 0xffffffff9e3aeaff.

If the left-shift bits are less than 24, then sign extension will not occur. Whereas
the bankwidth of the nor flash we used is 4, therefore this BUG emerges.

Signed-off-by: Pang Xunlei &lt;pang.xunlei@zte.com.cn&gt;
Signed-off-by: Zhang Yi &lt;zhang.yi20@zte.com.cn&gt;
Signed-off-by: Lu Zhongjun &lt;lu.zhongjun@zte.com.cn&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: add a new ecc_step_size field to mtd_info{}</title>
<updated>2013-08-30T20:37:01Z</updated>
<author>
<name>Huang Shijie</name>
<email>b32955@freescale.com</email>
</author>
<published>2013-08-16T02:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c41a0582d59e3bc41978ac4a23e457d86ac7365f'/>
<id>urn:sha1:c41a0582d59e3bc41978ac4a23e457d86ac7365f</id>
<content type='text'>
In order to implement the NAND boot for some Freescale's chips, such as
imx23/imx28/imx50/imx6, we use a tool (called kobs-ng) to burn the uboot
and some metadata to nand chip. And the ROM code will use the metadata to
configrate the BCH, and to find the uboot.

The ECC information(ecc step size, ecc strength) which is used to configrure
the BCH is part of the metadata. The kobs-ng can get the ecc strength from
the sys node /sys/*/ecc_strength now. But it can not get the ecc step size.

This patch adds a new field to store the ecc step size in mtd_info{}, and
it makes preparation for the next patches.

Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: add ECC info for nand_flash_dev{}</title>
<updated>2013-08-30T20:34:45Z</updated>
<author>
<name>Huang Shijie</name>
<email>b32955@freescale.com</email>
</author>
<published>2013-05-17T03:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2dc0bdd91bb63f7d5755137177315c49637f6a96'/>
<id>urn:sha1:2dc0bdd91bb63f7d5755137177315c49637f6a96</id>
<content type='text'>
Add an instance of an anonymous struct to store the ECC info for full id
nand chips.
	@ecc.strength_ds: ECC correctability from the datasheet.
	@ecc.step_ds: ECC size required by the @ecc.strength_ds,

These two fields are all from the datasheet.

Also add the necessary macros to make the code simple and clean.

Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: add a helper to get the supported features for ONFI nand</title>
<updated>2013-08-30T20:34:41Z</updated>
<author>
<name>Huang Shijie</name>
<email>shijie8@gmail.com</email>
</author>
<published>2013-05-17T03:17:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5b40db68cb1bd14b3d5b159754c9c1bc3bdeb080'/>
<id>urn:sha1:5b40db68cb1bd14b3d5b159754c9c1bc3bdeb080</id>
<content type='text'>
add a helper to get the supported features for ONFI nand.
Also add the neccessary macros.

Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Reviewed-and-tested-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: add data structures for Extended Parameter Page</title>
<updated>2013-08-30T20:34:40Z</updated>
<author>
<name>Huang Shijie</name>
<email>b32955@freescale.com</email>
</author>
<published>2013-05-17T03:17:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5138a98f6f47ce62a86cce4b9c381aaf4ad3a643'/>
<id>urn:sha1:5138a98f6f47ce62a86cce4b9c381aaf4ad3a643</id>
<content type='text'>
Since the ONFI 2.1, the onfi spec adds the Extended Parameter Page
to store the ECC info.

The onfi spec tells us that if the nand chip's recommended ECC codeword
size is not 512 bytes, then the @ecc_bits is 0xff. The host _SHOULD_ then
read the Extended ECC information that is part of the extended parameter
page to retrieve the ECC requirements for this device.

This patch adds
    [1] the neccessary fields for nand_onfi_params{},
    [2] and adds the onfi_ext_ecc_info{} for Extended ECC information,
    [3] adds onfi_ext_section{} for extended sections,
    [4] and adds onfi_ext_param_page{} for the Extended Parameter Page.

Acked-by: Pekon Gupta &lt;pekon@ti.com&gt;
Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Reviewed-and-tested-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
[Brian: amended for checkpatch.pl]
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: add datasheet's ECC information to nand_chip{}</title>
<updated>2013-08-30T20:34:37Z</updated>
<author>
<name>Huang Shijie</name>
<email>b32955@freescale.com</email>
</author>
<published>2013-05-17T03:17:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4cfeca2d58de8292f45351f84e84f657222a4611'/>
<id>urn:sha1:4cfeca2d58de8292f45351f84e84f657222a4611</id>
<content type='text'>
1.) Why add the ECC information to the nand_chip{} ?
   Each nand chip has its requirement for the ECC correctability, such as
   "4bit ECC for each 512Byte" or "40bit ECC for each 1024Byte".
   This ECC info is very important to the nand controller, such as gpmi.

   Take the Micron MT29F64G08CBABA for example, its geometry is
   8KiB page size, 744 bytes oob size and it requires 40bit ECC per 1KiB.
   If we do not provide the ECC info to the gpmi nand driver, it has to
   calculate the ECC correctability itself. The gpmi driver will gets the 56bit
   ECC for per 1KiB which is beyond its BCH's 40bit ecc capibility.
   The gpmi will quits in this case. But in actually, the gpmi can supports
   this nand chip if it can get the right ECC info.

2.) about the new fields.
   The @ecc_strength_ds stands for the ecc bits needed within the @ecc_step_ds.
   The two fields should be set from the nand chip's datasheets.

   For example:
	"4bit ECC for each 512Byte" could be:
		@ecc_strength_ds = 4, @ecc_step_ds = 512.
	"40bit ECC for each 1024Byte" could be:
		@ecc_strength_ds = 40, @ecc_step_ds = 1024.

3.) Why do not re-use the @strength and @size in the nand_ecc_ctrl{}?
   The @strength and @size in nand_ecc_ctrl{} is used by the nand controller
   driver, while the @ecc_strength_ds and @ecc_step_ds are get from the datasheet.

Signed-off-by: Huang Shijie &lt;b32955@freescale.com&gt;
Reviewed-and-tested-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand: remove NAND_BBT_SCANEMPTY</title>
<updated>2013-08-30T15:48:37Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2013-07-31T00:53:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dad2256269cb2ee3a72baefc5eb6e02ae1de2cfe'/>
<id>urn:sha1:dad2256269cb2ee3a72baefc5eb6e02ae1de2cfe</id>
<content type='text'>
NAND_BBT_SCANEMPTY is a strange, badly-supported option with omap as its
single remaining user.

NAND_BBT_SCANEMPTY was likely used by accident in omap2[1]. And anyway,
omap2 doesn't scan the chip for bad blocks (courtesy of
NAND_SKIP_BBTSCAN), and so its use of this option is irrelevant.

This patch drops the NAND_BBT_SCANEMPTY option.

[1] http://lists.infradead.org/pipermail/linux-mtd/2012-July/042902.html

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Ivan Djelic &lt;ivan.djelic@parrot.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand: hide in-memory BBT implementation details</title>
<updated>2013-08-30T15:48:17Z</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2013-07-31T00:52:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b32843b772db6024336e36c39359d8edc3b416ab'/>
<id>urn:sha1:b32843b772db6024336e36c39359d8edc3b416ab</id>
<content type='text'>
nand_base.c shouldn't have to know the implementation details of
nand_bbt's in-memory BBT. Specifically, nand_base shouldn't perform the
bit masking and shifting to isolate a BBT entry.

Instead, just move some of the BBT code into a new nand_markbad_bbt()
interface. This interface allows external users (i.e., nand_base) to
mark a single block as bad in the BBT. Then nand_bbt will take care of
modifying the in-memory BBT and updating the flash-based BBT (if
applicable).

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand_base: Only use GET/SET FEATURES command on chips that support them.</title>
<updated>2013-08-05T19:49:04Z</updated>
<author>
<name>David Mosberger</name>
<email>dmosberger@gmail.com</email>
</author>
<published>2013-05-29T12:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d914c932d7764bf9633af974940aee9390adf20d'/>
<id>urn:sha1:d914c932d7764bf9633af974940aee9390adf20d</id>
<content type='text'>
Spansion's S34MLx chips support ONFI but not the GET/SET FEATURES calls.

Signed-off-by: David Mosberger &lt;dmosberger@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
<entry>
<title>mtd: nand: fsmc: update of OF support</title>
<updated>2013-08-05T19:48:49Z</updated>
<author>
<name>Mian Yousaf Kaukab</name>
<email>mian.yousaf.kaukab@stericsson.com</email>
</author>
<published>2013-04-29T12:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=64ddba4d8a381b65bebee24c8da4eb80080c64a4'/>
<id>urn:sha1:64ddba4d8a381b65bebee24c8da4eb80080c64a4</id>
<content type='text'>
Add nand bank selection and timings to the device tree bindings.

Signed-off-by: Mian Yousaf Kaukab &lt;mian.yousaf.kaukab@stericsson.com&gt;
[Added some documentation]
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;

Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
</content>
</entry>
</feed>
