<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/mmc, branch v2.6.31.3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>mmc_spi: fail gracefully if host or card do not support the switch command</title>
<updated>2009-10-05T16:31:38+00:00</updated>
<author>
<name>Wolfgang Muees</name>
<email>wolfgang.mues@auerswald.de</email>
</author>
<published>2009-09-22T23:45:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=904f470bbf1cb422b963bc3d479930e0968c30ed'/>
<id>904f470bbf1cb422b963bc3d479930e0968c30ed</id>
<content type='text'>
commit d08ebeddfb3293fa4bdfca9c610daf1e8ec8b233 upstream.

Some time ago, I have send a patch to the mmc_spi subsystem changing the
error codes.  This was after a discussion with Pierre about using EINVAL
only for non-recoverable errors.  This patch was accepted as

http://git.kernel.org/linus/fdd858db7113ca64132de390188d7ca00701013d

Unfortunately, several weeks later, I realized that this patch has opened
a little can of worms because there are SD cards on the market which

a) claim that they support the switch command
AND
b) refuse to execute this command if operating in SPI mode.

So, such a card would get unusuable in an embedded linux system in SPI
mode, because the init sequence terminates with an error.

This patch adds the missing error codes to the caller of the switch
command and restores the old behaviour to fail gracefully if these
commands can not execute.

Signed-off-by: Wolfgang Muees &lt;wolfgang.mues@auerswald.de&gt;
Cc: &lt;linux-mmc@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit d08ebeddfb3293fa4bdfca9c610daf1e8ec8b233 upstream.

Some time ago, I have send a patch to the mmc_spi subsystem changing the
error codes.  This was after a discussion with Pierre about using EINVAL
only for non-recoverable errors.  This patch was accepted as

http://git.kernel.org/linus/fdd858db7113ca64132de390188d7ca00701013d

Unfortunately, several weeks later, I realized that this patch has opened
a little can of worms because there are SD cards on the market which

a) claim that they support the switch command
AND
b) refuse to execute this command if operating in SPI mode.

So, such a card would get unusuable in an embedded linux system in SPI
mode, because the init sequence terminates with an error.

This patch adds the missing error codes to the caller of the switch
command and restores the old behaviour to fail gracefully if these
commands can not execute.

Signed-off-by: Wolfgang Muees &lt;wolfgang.mues@auerswald.de&gt;
Cc: &lt;linux-mmc@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/mmc: correct error-handling code</title>
<updated>2009-08-07T17:39:56+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-08-06T22:07:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2198a64a7487aba036f71998ade8a6528070d32c'/>
<id>2198a64a7487aba036f71998ade8a6528070d32c</id>
<content type='text'>
sdhci_alloc_host returns an ERR_PTR value in an error case instead of NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@match exists@
expression x, E;
statement S1, S2;
@@

x = sdhci_alloc_host(...)
... when != x = E
(
*  if (x == NULL || ...) S1 else S2
|
*  if (x == NULL &amp;&amp; ...) S1 else S2
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Cc: Matt Fleming &lt;matt@console-pimps.org&gt;
Cc: Ian Molton &lt;ian@mnementh.co.uk&gt;
Cc: "Roberto A. Foglietta" &lt;roberto.foglietta@gmail.com&gt;
Cc: Philip Langdale &lt;philipl@overt.org&gt;
Cc: Pierre Ossman &lt;pierre@ossman.eu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sdhci_alloc_host returns an ERR_PTR value in an error case instead of NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@match exists@
expression x, E;
statement S1, S2;
@@

x = sdhci_alloc_host(...)
... when != x = E
(
*  if (x == NULL || ...) S1 else S2
|
*  if (x == NULL &amp;&amp; ...) S1 else S2
)
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Acked-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Cc: Matt Fleming &lt;matt@console-pimps.org&gt;
Cc: Ian Molton &lt;ian@mnementh.co.uk&gt;
Cc: "Roberto A. Foglietta" &lt;roberto.foglietta@gmail.com&gt;
Cc: Philip Langdale &lt;philipl@overt.org&gt;
Cc: Pierre Ossman &lt;pierre@ossman.eu&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>imxmmc: Remove unnecessary semicolons</title>
<updated>2009-07-31T10:28:46+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2009-06-28T16:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a9239d750d9991f2feee78fc5669a4613abc1adb'/>
<id>a9239d750d9991f2feee78fc5669a4613abc1adb</id>
<content type='text'>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Pavel Pisa &lt;pisa@cmp.felk.cvut.cz&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Pavel Pisa &lt;pisa@cmp.felk.cvut.cz&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cb710: use SG_MITER_TO_SG/SG_MITER_FROM_SG</title>
<updated>2009-07-31T10:28:46+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>sebastian@breakpoint.cc</email>
</author>
<published>2009-06-22T07:18:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4b2a108cd0d34880fe9d932258ca5b2ccebcd05e'/>
<id>4b2a108cd0d34880fe9d932258ca5b2ccebcd05e</id>
<content type='text'>
the code allready uses flush_kernel_dcache_page(). This patch updates the
driver to the recent sg API changes which require that either SG_MITER_TO_SG
or SG_MITER_FROM_SG is set. SG_MITER_TO_SG calls flush_kernel_dcache_page()
in sg_mitter_stop()

Signed-off-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Acked-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the code allready uses flush_kernel_dcache_page(). This patch updates the
driver to the recent sg API changes which require that either SG_MITER_TO_SG
or SG_MITER_FROM_SG is set. SG_MITER_TO_SG calls flush_kernel_dcache_page()
in sg_mitter_stop()

Signed-off-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Acked-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sdhci: use SG_MITER_TO_SG/SG_MITER_FROM_SG</title>
<updated>2009-07-31T10:28:45+00:00</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>sebastian@breakpoint.cc</email>
</author>
<published>2009-06-18T07:33:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da60a91d012bcb10bc5bcd86d585c4281742832c'/>
<id>da60a91d012bcb10bc5bcd86d585c4281742832c</id>
<content type='text'>
so the page will be flushed on unmap on ARCH which need it.

Signed-off-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
so the page will be flushed on unmap on ARCH which need it.

Signed-off-by: Sebastian Andrzej Siewior &lt;sebastian@breakpoint.cc&gt;
Signed-off-by: Pierre Ossman &lt;pierre@ossman.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sdhci: get rid of "frequency too high" flood when using eSDHC</title>
<updated>2009-07-30T02:10:36+00:00</updated>
<author>
<name>Anton Vorontsov</name>
<email>avorontsov@ru.mvista.com</email>
</author>
<published>2009-07-29T22:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a9e58f25734e153b8c6516d904e2398fb8b0b23d'/>
<id>a9e58f25734e153b8c6516d904e2398fb8b0b23d</id>
<content type='text'>
Since commit 8dfd0374be84793360db7fff2e635d2cd3bbcb21 ("MMC core: limit
minimum initialization frequency to 400kHz") MMC core checks for minimum
frequency, and that causes following messages flood when using eSDHC
controllers:

  ...
  mmc0: Minimum clock frequency too high for identification mode
  mmc0: Minimum clock frequency too high for identification mode
  ...

The warnings are legitimate, since if we'd use 133 MHz clocks for standard
SDHCI controllers, we'd not able to scale frequency down to 400 kHz.

But eSDHC controllers have a non-standard SD clock management, so we can
divide clock by 256 * 16, not just 256.

This patch introduces get_min_clock() callback for sdhci core and
implements it for sdhci-of driver, and thus fixes the issue.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Cc: Matt Fleming &lt;matt@console-pimps.org&gt;
Cc: Ian Molton &lt;ian@mnementh.co.uk&gt;
Cc: "Roberto A. Foglietta" &lt;roberto.foglietta@gmail.com&gt;
Cc: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since commit 8dfd0374be84793360db7fff2e635d2cd3bbcb21 ("MMC core: limit
minimum initialization frequency to 400kHz") MMC core checks for minimum
frequency, and that causes following messages flood when using eSDHC
controllers:

  ...
  mmc0: Minimum clock frequency too high for identification mode
  mmc0: Minimum clock frequency too high for identification mode
  ...

The warnings are legitimate, since if we'd use 133 MHz clocks for standard
SDHCI controllers, we'd not able to scale frequency down to 400 kHz.

But eSDHC controllers have a non-standard SD clock management, so we can
divide clock by 256 * 16, not just 256.

This patch introduces get_min_clock() callback for sdhci core and
implements it for sdhci-of driver, and thus fixes the issue.

Signed-off-by: Anton Vorontsov &lt;avorontsov@ru.mvista.com&gt;
Cc: Matt Fleming &lt;matt@console-pimps.org&gt;
Cc: Ian Molton &lt;ian@mnementh.co.uk&gt;
Cc: "Roberto A. Foglietta" &lt;roberto.foglietta@gmail.com&gt;
Cc: Pierre Ossman &lt;drzeus@drzeus.cx&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mvsdio: fix handling of partial word at the end of PIO transfer</title>
<updated>2009-07-20T23:46:34+00:00</updated>
<author>
<name>Nicolas Pitre</name>
<email>nico@cam.org</email>
</author>
<published>2009-07-19T00:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6cdbf734493d6e8f5afc6f539b82897772809d43'/>
<id>6cdbf734493d6e8f5afc6f539b82897772809d43</id>
<content type='text'>
Standard data flow for MMC/SD/SDIO cards requires that the mvsdio
controller be set for big endian operation.  This is causing problems
with buffers which length is not a multiple of 4 bytes as the last
partial word doesn't get shifted all the way and stored properly in
memory.  Let's compensate for this.

Signed-off-by: Nicolas Pitre &lt;nico@marvell.com&gt;
CC: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Standard data flow for MMC/SD/SDIO cards requires that the mvsdio
controller be set for big endian operation.  This is causing problems
with buffers which length is not a multiple of 4 bytes as the last
partial word doesn't get shifted all the way and stored properly in
memory.  Let's compensate for this.

Signed-off-by: Nicolas Pitre &lt;nico@marvell.com&gt;
CC: stable@kernel.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6</title>
<updated>2009-07-09T15:07:22+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk@dyn-67.arm.linux.org.uk</email>
</author>
<published>2009-07-09T15:07:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4e66a0f536ad449a71de75bc81f4a830ef38d538'/>
<id>4e66a0f536ad449a71de75bc81f4a830ef38d538</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pxamci: correct DMA flow control</title>
<updated>2009-07-03T06:13:28+00:00</updated>
<author>
<name>Matt Reimer</name>
<email>mreimer@sdgsystems.com</email>
</author>
<published>2009-06-15T20:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7eeff4814224646c896303ba2c2b7ac3c4240cd2'/>
<id>7eeff4814224646c896303ba2c2b7ac3c4240cd2</id>
<content type='text'>
The DMA flow control in pxamci_setup_data() is backwards; fix it.

Signed-off-by: Matt Reimer &lt;mreimer@sdgsystems.com&gt;
Acked-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The DMA flow control in pxamci_setup_data() is backwards; fix it.

Signed-off-by: Matt Reimer &lt;mreimer@sdgsystems.com&gt;
Acked-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: Eric Miao &lt;eric.y.miao@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>spi: add spi_master flag word</title>
<updated>2009-07-01T01:56:00+00:00</updated>
<author>
<name>David Brownell</name>
<email>dbrownell@users.sourceforge.net</email>
</author>
<published>2009-06-30T18:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=70d6027ff2bc8bab180273b77e7ab3e8a62cca51'/>
<id>70d6027ff2bc8bab180273b77e7ab3e8a62cca51</id>
<content type='text'>
Add a new spi_master.flags word listing constraints relevant to that
controller.  Define the first constraint bit: a half duplex restriction.
Include that constraint in the OMAP1 MicroWire controller driver.

Have the mmc_spi host be the first customer of this flag.  Its coding
relies heavily on full duplex transfers, so it must fail when the
underlying controller driver won't perform them.

(The spi_write_then_read routine could use it too: use the
temporarily-withdrawn full-duplex speedup unless this flag is set, in
which case the existing code applies.  Similarly, any spi_master
implementing only SPI_3WIRE should set the flag.)

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new spi_master.flags word listing constraints relevant to that
controller.  Define the first constraint bit: a half duplex restriction.
Include that constraint in the OMAP1 MicroWire controller driver.

Have the mmc_spi host be the first customer of this flag.  Its coding
relies heavily on full duplex transfers, so it must fail when the
underlying controller driver won't perform them.

(The spi_write_then_read routine could use it too: use the
temporarily-withdrawn full-duplex speedup unless this flag is set, in
which case the existing code applies.  Similarly, any spi_master
implementing only SPI_3WIRE should set the flag.)

Signed-off-by: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
Cc: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
