<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mtd, branch v3.4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/mtd?h=v3.4.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/mtd?h=v3.4.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-07-19T15:58:55Z</updated>
<entry>
<title>mtd: nandsim: don't open code a do_div helper</title>
<updated>2012-07-19T15:58:55Z</updated>
<author>
<name>Herton Ronaldo Krzesinski</name>
<email>herton.krzesinski@canonical.com</email>
</author>
<published>2012-05-16T19:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a3a13c9974160030550ae28b3fa2c1ea8992b9c5'/>
<id>urn:sha1:a3a13c9974160030550ae28b3fa2c1ea8992b9c5</id>
<content type='text'>
commit 596fd46268634082314b3af1ded4612e1b7f3f03 upstream.

We don't need to open code the divide function, just use div_u64 that
already exists and do the same job. While this is a straightforward
clean up, there is more to that, the real motivation for this.

While building on a cross compiling environment in armel, using gcc
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5), I was getting the following build
error:

ERROR: "__aeabi_uldivmod" [drivers/mtd/nand/nandsim.ko] undefined!

After investigating with objdump and hand built assembly version
generated with the compiler, I narrowed __aeabi_uldivmod as being
generated from the divide function. When nandsim.c is built with
-fno-inline-functions-called-once, that happens when
CONFIG_DEBUG_SECTION_MISMATCH is enabled, the do_div optimization in
arch/arm/include/asm/div64.h doesn't work as expected with the open
coded divide function: even if the do_div we are using doesn't have a
constant divisor, the compiler still includes the else parts of the
optimized do_div macro, and translates the divisions there to use
__aeabi_uldivmod, instead of only calling __do_div_asm -&gt; __do_div64 and
optimizing/removing everything else out.

So to reproduce, gcc 4.6 plus CONFIG_DEBUG_SECTION_MISMATCH=y and
CONFIG_MTD_NAND_NANDSIM=m should do it, building on armel.

After this change, the compiler does the intended thing even with
-fno-inline-functions-called-once, and optimizes out as expected the
constant handling in the optimized do_div on arm. As this also avoids a
build issue, I'm marking for Stable, as I think is applicable for this
case.

Signed-off-by: Herton Ronaldo Krzesinski &lt;herton.krzesinski@canonical.com&gt;
Acked-by: Nicolas Pitre &lt;nico@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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: cafe_nand: fix an &amp; vs | mistake</title>
<updated>2012-07-16T16:04:23Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-06-09T16:08:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f838956ac64e227e682d7d4da9883888b9aab381'/>
<id>urn:sha1:f838956ac64e227e682d7d4da9883888b9aab381</id>
<content type='text'>
commit 48f8b641297df49021093763a3271119a84990a2 upstream.

The intent here was clearly to set result to true if the 0x40000000 flag
was set.  But instead there was a | vs &amp; typo and we always set result
to true.

Artem: check the spec at
wiki.laptop.org/images/5/5c/88ALP01_Datasheet_July_2007.pdf
and this fix looks correct.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: mxc_nand: move ecc strengh setup before nand_scan_tail</title>
<updated>2012-06-09T15:36:13Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2012-05-25T14:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1e98ce80a4493f32b44f227d6050318462ca9d5d'/>
<id>urn:sha1:1e98ce80a4493f32b44f227d6050318462ca9d5d</id>
<content type='text'>
commit 4a43faf54e9173b6acce37cf7f053fc9515a2cdf upstream.

Since commit 6a918bade9dab40aaef80559bd1169c69e8d69cb, the mxc_nand driver
fails with:

Driver must set ecc.strength when using hardware ECC

This is because nand_scan_tail checks for correct ecc strength
settings, so we must set them up before nand_scan_tail.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: block2mtd: fix recursive call of mtd_writev</title>
<updated>2012-06-09T15:36:13Z</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2012-05-23T22:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=29924c0318327d0444e0317587faf4a0693527a8'/>
<id>urn:sha1:29924c0318327d0444e0317587faf4a0693527a8</id>
<content type='text'>
commit 2e24e32e2759348c9290404abad4f729f791bfad upstream.

The 'mtd_writev' interface calls the function assigned
to the '_write' field of a given mtd device if that is
not NULL. The block2mtd driver sets the '_writev' field
to the 'mtd_writev' function itself and thus causes a
endless loop.

This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900
(mtd: harmonize mtd_writev usage).

Remove the assignment from the block2mtd driver to fix the
issue.

Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: of_parts: fix breakage in Kconfig</title>
<updated>2012-06-09T15:36:13Z</updated>
<author>
<name>Frank Svendsboe</name>
<email>frank.svendsboe@gmail.com</email>
</author>
<published>2012-05-17T20:43:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bdcefb1987edb1c62828d6c79f93e4b7af8734e2'/>
<id>urn:sha1:bdcefb1987edb1c62828d6c79f93e4b7af8734e2</id>
<content type='text'>
commit 2e929d001e85126d9267de373d4b76014789661d upstream.

MTD_OF_PARTS and the default setting is not working due to using 'Y'
instead of 'y', introduced in commit
d6137badeff1ef64b4e0092ec249ebdeaeb3ff37. This made our board, and
possibly other boards using DTS defined partitions and not having
CONFIG_MTD_OF_PARTS=y defined in the defconfig, fail to mount root.

Signed-off-by: Frank Svendsboe &lt;frank.svendsboe@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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mtd: nand: fix scan_read_raw_oob</title>
<updated>2012-06-09T15:36:12Z</updated>
<author>
<name>Dmitry Maluka</name>
<email>D.Maluka@adbglobal.com</email>
</author>
<published>2012-05-11T17:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a5b57cd820528f863d519ac5a0f6a94e5e8b3a0e'/>
<id>urn:sha1:a5b57cd820528f863d519ac5a0f6a94e5e8b3a0e</id>
<content type='text'>
commit 34a5704d91d6f8376a4c0a0143a1dd3eb3ccb37e upstream.

It seems there is a bug in scan_read_raw_oob() in nand_bbt.c which
should cause wrong functioning of NAND_BBT_SCANALLPAGES option.

Artem: the patch did not apply and I had to amend it a bit.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge tag 'for-linus-3.4-20120513' of git://git.infradead.org/linux-mtd</title>
<updated>2012-05-13T18:33:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-05-13T18:33:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ff00d58a915b6747ba2e843ab2d04c712b4dc32'/>
<id>urn:sha1:9ff00d58a915b6747ba2e843ab2d04c712b4dc32</id>
<content type='text'>
Pull three MTD fixes from David Woodhouse:
 - Fix a lock ordering deadlock in JFFS2
 - Fix an oops in the dataflash driver, triggered by a dummy call to test
   whether it has OTP functionality.
 - Fix request_mem_region() failure on amsdelta NAND driver.

* tag 'for-linus-3.4-20120513' of git://git.infradead.org/linux-mtd:
  mtd: ams-delta: fix request_mem_region() failure
  jffs2: Fix lock acquisition order bug in gc path
  mtd: fix oops in dataflash driver
</content>
</entry>
<entry>
<title>mtd: ams-delta: fix request_mem_region() failure</title>
<updated>2012-05-08T21:24:33Z</updated>
<author>
<name>Janusz Krzysztofik</name>
<email>jkrzyszt@tis.icnet.pl</email>
</author>
<published>2012-05-07T20:51:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b027274d2e3a332683b73f15e5cea79c240bc9a3'/>
<id>urn:sha1:b027274d2e3a332683b73f15e5cea79c240bc9a3</id>
<content type='text'>
A call to request_mem_region() has been introduced in the omap-gpio
driver recently (commit 96751fcbe5438e95514b025e9cee7a6d38038f40,
"gpio/omap: Use devm_ API and add request_mem_region"). This change
prevented the Amstrad Delta NAND driver, which was doing the same in
order to take control over OMAP MPU I/O lines that the NAND device hangs
off, from loading successfully.

The I/O lines and corresponding registers used by the NAND driver are a
subset of those used for the GPIO function. Then, to avoid run time
collisions, all MPUIO GPIO lines should be marked as requested while
initializing the NAND driver, and vice versa, a single MPUIO GPIO line
already requested before the NAND driver initialization is attempted
should prevent the NAND device from being started successfully.

There is another driver, omap-keypad, which also manipulates MPUIO
registers, but has never been calling request_mem_region() on startup,
so it's not affected by the change in the gpio-omap and works correctly.
It uses the depreciated omap_read/write functions for accessing MPUIO
registers. Unlike the NAND driver, these I/O lines and registers are
separate from those used by the GPIO driver. However, both register sets
are non-contiguous and overlapping, so it would be impractical to
request the two sets separately, one from the gpio-omap, the other form
the omap-keypad driver.

In order to solve all these issues correctly, a solution first suggested
by Artem Bityutskiy, then closer specified by Tony Lindgren while they
commented the initial version of this fix, should be implemented. The
gpio-omap driver should export a few functions which would allow the
other two drivers to access MPUIO registers in a safe manner instead of
trying to manage them in parallel to the GPIO driver.  However, such a
big change, affecting 3 drivers all together, is not suitable for the rc
cycle, and should be prepared for the merge window.  Then, an
alternative solution is proposed as a regression fix.

For the ams-delta NAND driver to initialize correctly in coexistence
with the changed GPIO driver, drop the request_mem_region() call from
the former, especially as this call is going to be removed while the
long-term solution is implemented.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik &lt;jkrzyszt@tis.icnet.pl&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.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: fix oops in dataflash driver</title>
<updated>2012-05-07T19:29:50Z</updated>
<author>
<name>Will Newton</name>
<email>will.newton@gmail.com</email>
</author>
<published>2012-03-30T10:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7a84477c4acebf6299b6a8bd6a1d5894eb838ffa'/>
<id>urn:sha1:7a84477c4acebf6299b6a8bd6a1d5894eb838ffa</id>
<content type='text'>
I'm seeing an oops in mtd_dataflash.c with Linux 3.3. What appears to
be happening is that otp_select_filemode calls mtd_read_fact_prot_reg
with -1 for offset and length and a NULL buffer to test if OTP
operations are supported. This finds its way down to otp_read in
mtd_dataflash.c and causes an oops when memcpying the returned data
into the NULL buf.

None of the checks in otp_read catches the negative length and offset.
Changing the length of the dummy read to 0 prevents the oops.

Cc: stable@kernel.org [3.3+]
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>Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma</title>
<updated>2012-04-26T22:33:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-04-26T22:33:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=acdf2fc860f785781bb304a7f178141541f85283'/>
<id>urn:sha1:acdf2fc860f785781bb304a7f178141541f85283</id>
<content type='text'>
Pull [GIT PULL] slave-dmaengine fixes from Vinod Koul.

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine/amba-pl08x : reset phychan_hold on terminate all
  dma: pl330: fix a couple of compilation warnings
  dma/ste_dma40: fix erroneous comparison
  dma/ste_dma40: explicitly include regulator consumer header
  dma40: Improve the logic of stopping logical chan
  dmaengine: at_hdmac: remove clear-on-read in atc_dostart()
  dma: mxs-dma: enable channel in device_issue_pending call
  dmaengine: imx-dma: dont complete descriptor for cyclic dma
</content>
</entry>
</feed>
