<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/mtd/chips, branch v4.2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>mtd: chips: fixup dependencies, to prevent build error</title>
<updated>2015-05-28T18:07:48+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-05-28T18:07:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bde90062a38160fdce0d51a4340bb93c1a8f1114'/>
<id>bde90062a38160fdce0d51a4340bb93c1a8f1114</id>
<content type='text'>
Commit 4612c715a6ea ("mtd: cfi: deinline large functions") moved some
code into the cfi_util library without creating a new dependency. So we
can get build failures like the following, when CONFIG_MTD_JEDECPROBE=y
and CONFIG_MTD_CFI_UTIL=m.

   drivers/built-in.o: In function `jedec_read_id':
&gt;&gt; jedec_probe.c:(.text+0x187ed8): undefined reference to `cfi_build_cmd_addr'
   drivers/built-in.o: In function `jedec_read_mfr':
&gt;&gt; jedec_probe.c:(.text+0x187f4a): undefined reference to `cfi_build_cmd_addr'
   drivers/built-in.o: In function `jedec_reset':
&gt;&gt; jedec_probe.c:(.text+0x187fe0): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x188004): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x18802b): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x18804e): undefined reference to `cfi_send_gen_cmd'
   drivers/built-in.o: In function `jedec_probe_chip':
&gt;&gt; jedec_probe.c:(.text+0x188130): undefined reference to `cfi_build_cmd_addr'
&gt;&gt; jedec_probe.c:(.text+0x18814d): undefined reference to `cfi_build_cmd_addr'
&gt;&gt; jedec_probe.c:(.text+0x1881dc): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x188203): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x18822d): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x1884c0): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x1884e7): undefined reference to `cfi_send_gen_cmd'
   drivers/built-in.o:jedec_probe.c:(.text+0x188511): more undefined references to `cfi_send_gen_cmd' follow
   drivers/built-in.o: In function `jedec_probe_chip':
&gt;&gt; jedec_probe.c:(.text+0x188618): undefined reference to `cfi_build_cmd'

So let's express the dependency properly.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 4612c715a6ea ("mtd: cfi: deinline large functions") moved some
code into the cfi_util library without creating a new dependency. So we
can get build failures like the following, when CONFIG_MTD_JEDECPROBE=y
and CONFIG_MTD_CFI_UTIL=m.

   drivers/built-in.o: In function `jedec_read_id':
&gt;&gt; jedec_probe.c:(.text+0x187ed8): undefined reference to `cfi_build_cmd_addr'
   drivers/built-in.o: In function `jedec_read_mfr':
&gt;&gt; jedec_probe.c:(.text+0x187f4a): undefined reference to `cfi_build_cmd_addr'
   drivers/built-in.o: In function `jedec_reset':
&gt;&gt; jedec_probe.c:(.text+0x187fe0): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x188004): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x18802b): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x18804e): undefined reference to `cfi_send_gen_cmd'
   drivers/built-in.o: In function `jedec_probe_chip':
&gt;&gt; jedec_probe.c:(.text+0x188130): undefined reference to `cfi_build_cmd_addr'
&gt;&gt; jedec_probe.c:(.text+0x18814d): undefined reference to `cfi_build_cmd_addr'
&gt;&gt; jedec_probe.c:(.text+0x1881dc): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x188203): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x18822d): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x1884c0): undefined reference to `cfi_send_gen_cmd'
&gt;&gt; jedec_probe.c:(.text+0x1884e7): undefined reference to `cfi_send_gen_cmd'
   drivers/built-in.o:jedec_probe.c:(.text+0x188511): more undefined references to `cfi_send_gen_cmd' follow
   drivers/built-in.o: In function `jedec_probe_chip':
&gt;&gt; jedec_probe.c:(.text+0x188618): undefined reference to `cfi_build_cmd'

So let's express the dependency properly.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: Initialize datum before calling map_word_load_partial</title>
<updated>2015-05-27T19:47:37+00:00</updated>
<author>
<name>Christian Riesch</name>
<email>christian.riesch@omicron.at</email>
</author>
<published>2015-03-31T21:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=636fdbf88efe069f9951d1b7df8d3fd82060dc60'/>
<id>636fdbf88efe069f9951d1b7df8d3fd82060dc60</id>
<content type='text'>
In do_otp_write we must initialize the variable datum before calling
map_word_load_partial. Otherwise the upper bits of datum may be undefined,
which later causes problems in chip_good called by do_write_oneword.

Signed-off-by: Christian Riesch &lt;christian.riesch@omicron.at&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In do_otp_write we must initialize the variable datum before calling
map_word_load_partial. Otherwise the upper bits of datum may be undefined,
which later causes problems in chip_good called by do_write_oneword.

Signed-off-by: Christian Riesch &lt;christian.riesch@omicron.at&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi: deinline large functions</title>
<updated>2015-05-27T19:42:16+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>dvlasenk@redhat.com</email>
</author>
<published>2015-05-18T10:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4612c715a6ea6b3af2aee0163c0721375b2548d7'/>
<id>4612c715a6ea6b3af2aee0163c0721375b2548d7</id>
<content type='text'>
With this .config: http://busybox.net/~vda/kernel_config,
after uninlining these functions have sizes and callsite counts
as follows:

cfi_udelay(): 74 bytes, 26 callsites
cfi_send_gen_cmd(): 153 bytes, 95 callsites
cfi_build_cmd(): 274 bytes, 123 callsites
cfi_build_cmd_addr(): 49 bytes, 15 callsites
cfi_merge_status(): 230 bytes, 3 callsites

Reduction in code size is about 50,000:

    text     data      bss       dec     hex filename
85842882 22294584 20627456 128764922 7accbfa vmlinux.before
85789648 22294616 20627456 128711720 7abfc28 vmlinux

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
CC: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
CC: Jingoo Han &lt;jg1.han@samsung.com&gt;
CC: Brian Norris &lt;computersforpeace@gmail.com&gt;
CC: Aaron Sierra &lt;asierra@xes-inc.com&gt;
CC: Artem Bityutskiy &lt;Artem.Bityutskiy@linux.intel.com&gt;
CC: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
CC: linux-mtd@lists.infradead.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this .config: http://busybox.net/~vda/kernel_config,
after uninlining these functions have sizes and callsite counts
as follows:

cfi_udelay(): 74 bytes, 26 callsites
cfi_send_gen_cmd(): 153 bytes, 95 callsites
cfi_build_cmd(): 274 bytes, 123 callsites
cfi_build_cmd_addr(): 49 bytes, 15 callsites
cfi_merge_status(): 230 bytes, 3 callsites

Reduction in code size is about 50,000:

    text     data      bss       dec     hex filename
85842882 22294584 20627456 128764922 7accbfa vmlinux.before
85789648 22294616 20627456 128711720 7abfc28 vmlinux

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
CC: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
CC: Jingoo Han &lt;jg1.han@samsung.com&gt;
CC: Brian Norris &lt;computersforpeace@gmail.com&gt;
CC: Aaron Sierra &lt;asierra@xes-inc.com&gt;
CC: Artem Bityutskiy &lt;Artem.Bityutskiy@linux.intel.com&gt;
CC: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
CC: linux-mtd@lists.infradead.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi: clean up some indenting</title>
<updated>2015-03-31T01:01:04+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2015-02-25T13:15:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=35cc3337b6d5bb71ec80daaaf268bf25514fb6a2'/>
<id>35cc3337b6d5bb71ec80daaaf268bf25514fb6a2</id>
<content type='text'>
These lines were all indented one tab more than they should be.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These lines were all indented one tab more than they should be.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: map_rom: Support UBI on ROM</title>
<updated>2015-01-10T07:24:27+00:00</updated>
<author>
<name>Aaron Sierra</name>
<email>asierra@xes-inc.com</email>
</author>
<published>2014-09-25T17:20:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6958024ad5cdd78deae4da47a8722b06317dff45'/>
<id>6958024ad5cdd78deae4da47a8722b06317dff45</id>
<content type='text'>
UBI needs to know the physical erase block size, even on read-only
devices, since it defines the on-device layout. Use a device-tree
provided value to support previously written UBI on read-only NOR.

UBI also needs a non-zero writebufsize, so we set it to one.

Note: This was implemented because hardware write-protected CFI
      NOR cannot be probed for the physical erase block size.

Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.ccom&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.ccom&gt;
[Brian: removed unneeded #ifdef, note 'optional' erase-size property]
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
UBI needs to know the physical erase block size, even on read-only
devices, since it defines the on-device layout. Use a device-tree
provided value to support previously written UBI on read-only NOR.

UBI also needs a non-zero writebufsize, so we set it to one.

Note: This was implemented because hardware write-protected CFI
      NOR cannot be probed for the physical erase block size.

Signed-off-by: Joe Schultz &lt;jschultz@xes-inc.ccom&gt;
Signed-off-by: Aaron Sierra &lt;asierra@xes-inc.ccom&gt;
[Brian: removed unneeded #ifdef, note 'optional' erase-size property]
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: map_ram: Enable mtdoops</title>
<updated>2015-01-09T23:31:56+00:00</updated>
<author>
<name>Alessio Igor Bogani</name>
<email>alessio.bogani@elettra.eu</email>
</author>
<published>2014-12-11T09:38:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=106effbe18fa481c9355604dafe8095c9e418319'/>
<id>106effbe18fa481c9355604dafe8095c9e418319</id>
<content type='text'>
Signed-off-by: Alessio Igor Bogani &lt;alessio.bogani@elettra.eu&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alessio Igor Bogani &lt;alessio.bogani@elettra.eu&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: delete unnecessary checks before two function calls</title>
<updated>2014-11-26T06:44:10+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2014-11-20T12:50:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=05a221bb1f49e6eebc9a3858cb45506f403b3ab6'/>
<id>05a221bb1f49e6eebc9a3858cb45506f403b3ab6</id>
<content type='text'>
The functions kfree() and pci_dev_put() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The functions kfree() and pci_dev_put() test whether their argument is NULL
and then return immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0001.c: fix resume for LH28F640BF chips</title>
<updated>2014-10-30T01:50:52+00:00</updated>
<author>
<name>Dmitry Eremin-Solenikov</name>
<email>dbaryshkov@gmail.com</email>
</author>
<published>2014-10-22T23:23:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=89cf38dd536a7301d6b5f5ddd73f42074c01bfaa'/>
<id>89cf38dd536a7301d6b5f5ddd73f42074c01bfaa</id>
<content type='text'>
After '#echo mem &gt; /sys/power/state' some devices can not be properly resumed
because apparently the MTD Partition Configuration Register has been reset
to default thus the rootfs cannot be mounted cleanly on resume.
An example of this can be found in the SA-1100 Developer's Manual at 9.5.3.3
where the second step of the Sleep Shutdown Sequence is described:
"An internal reset is applied to the SA-1100. All units are reset...".

As workaround we refresh the PCR value as done initially on chip setup.

This behavior and the fix are confirmed by our tests done on 2 different Zaurus
collie units with kernel 3.17.

Fixes: 812c5fa82bae: ("mtd: cfi_cmdset_0001.c: add support for Sharp LH28F640BF NOR")
Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Andrea Adami &lt;andrea.adami@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.16+
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After '#echo mem &gt; /sys/power/state' some devices can not be properly resumed
because apparently the MTD Partition Configuration Register has been reset
to default thus the rootfs cannot be mounted cleanly on resume.
An example of this can be found in the SA-1100 Developer's Manual at 9.5.3.3
where the second step of the Sleep Shutdown Sequence is described:
"An internal reset is applied to the SA-1100. All units are reset...".

As workaround we refresh the PCR value as done initially on chip setup.

This behavior and the fix are confirmed by our tests done on 2 different Zaurus
collie units with kernel 3.17.

Fixes: 812c5fa82bae: ("mtd: cfi_cmdset_0001.c: add support for Sharp LH28F640BF NOR")
Signed-off-by: Dmitry Eremin-Solenikov &lt;dbaryshkov@gmail.com&gt;
Signed-off-by: Andrea Adami &lt;andrea.adami@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.16+
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge l2-mtd/next into l2-mtd/master</title>
<updated>2014-08-19T18:57:23+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-08-19T18:57:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b49ab3e03f68eb49db4bce6290e5707b7f6c6f3'/>
<id>5b49ab3e03f68eb49db4bce6290e5707b7f6c6f3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>mtd: cfi_cmdset_0002: allow retry/timeout loop to exit</title>
<updated>2014-08-19T18:53:07+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2014-07-22T02:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=36c6a7ac74044b8025488c018279115bb3c32eb0'/>
<id>36c6a7ac74044b8025488c018279115bb3c32eb0</id>
<content type='text'>
The variable 'retries' is never modified, so if the reset operation
never is going to complete, we'll get stuck in an infinite loop.

It looks like the intention was to decrement 'retries' on every loop.
Untested.

Caught by Coverity.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The variable 'retries' is never modified, so if the reset operation
never is going to complete, we'll get stuck in an infinite loop.

It looks like the intention was to decrement 'retries' on every loop.
Untested.

Caught by Coverity.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
