<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/mmc/host/omap.c, branch linux-4.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-04-27T07:33:50Z</updated>
<entry>
<title>mmc: omap: fix the maximum timeout setting</title>
<updated>2019-04-27T07:33:50Z</updated>
<author>
<name>Aaro Koskinen</name>
</author>
<published>2019-02-02T22:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3bd631e5360e5fe0557ab723ca37fbc79b3a8322'/>
<id>urn:sha1:3bd631e5360e5fe0557ab723ca37fbc79b3a8322</id>
<content type='text'>
[ Upstream commit a6327b5e57fdc679c842588c3be046c0b39cc127 ]

When running OMAP1 kernel on QEMU, MMC access is annoyingly noisy:

	MMC: CTO of 0xff and 0xfe cannot be used!
	MMC: CTO of 0xff and 0xfe cannot be used!
	MMC: CTO of 0xff and 0xfe cannot be used!
	[ad inf.]

Emulator warnings appear to be valid. The TI document SPRU680 [1]
("OMAP5910 Dual-Core Processor MultiMedia Card/Secure Data Memory Card
(MMC/SD) Reference Guide") page 36 states that the maximum timeout is 253
cycles and "0xff and 0xfe cannot be used".

Fix by using 0xfd as the maximum timeout.

Tested using QEMU 2.5 (Siemens SX1 machine, OMAP310), and also checked on
real hardware using Palm TE (OMAP310), Nokia 770 (OMAP1710) and Nokia N810
(OMAP2420) that MMC works as before.

[1] http://www.ti.com/lit/ug/spru680/spru680.pdf

Fixes: 730c9b7e6630f ("[MMC] Add OMAP MMC host driver")
Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310</title>
<updated>2018-12-21T13:09:51Z</updated>
<author>
<name>Aaro Koskinen</name>
</author>
<published>2018-11-19T23:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c046fa1ca387f39a4774eda5a825a0e1902ab6f8'/>
<id>urn:sha1:c046fa1ca387f39a4774eda5a825a0e1902ab6f8</id>
<content type='text'>
commit e8cde625bfe8a714a856e1366bcbb259d7346095 upstream.

Since v2.6.22 or so there has been reports [1] about OMAP MMC being
broken on OMAP15XX based hardware (OMAP5910 and OMAP310). The breakage
seems to have been caused by commit 46a6730e3ff9 ("mmc-omap: Fix
omap to use MMC_POWER_ON") that changed clock enabling to be done
on MMC_POWER_ON. This can happen multiple times in a row, and on 15XX
the hardware doesn't seem to like it and the MMC just stops responding.
Fix by memorizing the power mode and do the init only when necessary.

Before the patch (on Palm TE):

	mmc0: new SD card at address b368
	mmcblk0: mmc0:b368 SDC   977 MiB
	mmci-omap mmci-omap.0: command timeout (CMD18)
	mmci-omap mmci-omap.0: command timeout (CMD13)
	mmci-omap mmci-omap.0: command timeout (CMD13)
	mmci-omap mmci-omap.0: command timeout (CMD12) [x 6]
	mmci-omap mmci-omap.0: command timeout (CMD13) [x 6]
	mmcblk0: error -110 requesting status
	mmci-omap mmci-omap.0: command timeout (CMD8)
	mmci-omap mmci-omap.0: command timeout (CMD18)
	mmci-omap mmci-omap.0: command timeout (CMD13)
	mmci-omap mmci-omap.0: command timeout (CMD13)
	mmci-omap mmci-omap.0: command timeout (CMD12) [x 6]
	mmci-omap mmci-omap.0: command timeout (CMD13) [x 6]
	mmcblk0: error -110 requesting status
	mmcblk0: recovery failed!
	print_req_error: I/O error, dev mmcblk0, sector 0
	Buffer I/O error on dev mmcblk0, logical block 0, async page read
	 mmcblk0: unable to read partition table

After the patch:

	mmc0: new SD card at address b368
	mmcblk0: mmc0:b368 SDC   977 MiB
	 mmcblk0: p1

The patch is based on a fix and analysis done by Ladislav Michl.

Tested on OMAP15XX/OMAP310 (Palm TE), OMAP1710 (Nokia 770)
and OMAP2420 (Nokia N810).

[1] https://marc.info/?t=123175197000003&amp;r=1&amp;w=2

Fixes: 46a6730e3ff9 ("mmc-omap: Fix omap to use MMC_POWER_ON")
Reported-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Reported-by: Andrzej Zaborowski &lt;balrogg@gmail.com&gt;
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mmc: omap: Fix module autoload for OF platform driver</title>
<updated>2015-10-26T14:59:58Z</updated>
<author>
<name>Luis de Bethencourt</name>
</author>
<published>2015-09-17T21:50:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b73f34c22d283f049347f7f625c272ec22830eb3'/>
<id>urn:sha1:b73f34c22d283f049347f7f625c272ec22830eb3</id>
<content type='text'>
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Luis de Bethencourt &lt;luisbg@osg.samsung.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: omap: fix error return code</title>
<updated>2015-08-27T12:50:56Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2015-08-23T00:11:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=38276a912c9bb6dc48e21dc23a92b6286ca00962'/>
<id>urn:sha1:38276a912c9bb6dc48e21dc23a92b6286ca00962</id>
<content type='text'>
Return a negative error code on failure.

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

// &lt;smpl&gt;
@@
identifier ret; expression e1,e2;
@@
(
if (\(ret &lt; 0\|ret != 0\))
 { ... return ret; }
|
ret = 0
)
... when != ret = e1
    when != &amp;ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: omap: use for_each_sg() for scatterlist parsing</title>
<updated>2015-08-17T09:32:42Z</updated>
<author>
<name>Fabian Frederick</name>
</author>
<published>2015-06-16T19:15:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8292adc6ba1d59fa227bcc43cec2ce207cbb588c'/>
<id>urn:sha1:8292adc6ba1d59fa227bcc43cec2ce207cbb588c</id>
<content type='text'>
See Documentation/DMA-API.txt - Part Id

Signed-off-by: Fabian Frederick &lt;fabf@skynet.be&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: remove .owner field for drivers using module_platform_driver</title>
<updated>2014-09-09T11:59:04Z</updated>
<author>
<name>Peter Griffin</name>
</author>
<published>2014-08-12T16:14:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2137f5d3b8e8e04cff06194cacd0f6357495ac94'/>
<id>urn:sha1:2137f5d3b8e8e04cff06194cacd0f6357495ac94</id>
<content type='text'>
This patch removes the superflous .owner field for drivers which
use the module_platform_driver API, as this is overriden in
platform_driver_register anyway.

Signed-off-by: Peter Griffin &lt;peter.griffin@linaro.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>mmc: omap: Use DIV_ROUND_UP instead of open coded</title>
<updated>2014-05-22T12:33:31Z</updated>
<author>
<name>Axel Lin</name>
</author>
<published>2014-05-03T01:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03a16853401dcbb1495e7aef6f72b5281c3159e7'/>
<id>urn:sha1:03a16853401dcbb1495e7aef6f72b5281c3159e7</id>
<content type='text'>
Also uses NSEC_PER_SEC and USEC_PER_SEC instead of hard-coded value.
This makes the intention more clear.

Signed-off-by: Axel Lin &lt;axel.lin@ingics.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Chris Ball &lt;chris@printf.net&gt;
</content>
</entry>
<entry>
<title>mmc: omap: Add erase capability</title>
<updated>2014-02-22T18:17:42Z</updated>
<author>
<name>Jarkko Nikula</name>
</author>
<published>2014-02-22T16:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b13d1f0f9ad64bc498ced07344495ba27321419e'/>
<id>urn:sha1:b13d1f0f9ad64bc498ced07344495ba27321419e</id>
<content type='text'>
This patch adds the erase capability to OMAP1/OMAP2420 MMC driver. Idea is
the same than in commit 93caf8e ("omap_hsmmc: add erase capability") that we
disable the data timeout interrupt for erases.

Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@bitmer.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Chris Ball &lt;chris@printf.net&gt;
</content>
</entry>
<entry>
<title>mmc: omap: Remove always set use_dma flag from struct mmc_omap_host</title>
<updated>2014-02-22T18:17:36Z</updated>
<author>
<name>Jarkko Nikula</name>
</author>
<published>2014-02-22T16:01:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6c668fb95ac655fe94c08c1fb419f685040cf23'/>
<id>urn:sha1:a6c668fb95ac655fe94c08c1fb419f685040cf23</id>
<content type='text'>
Because use_dma is set only in mmc_omap_probe and unset nowhere there is no
need to carry that flag in struct mmc_omap_host for mmc_omap_prepare_data
function.

Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@bitmer.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Chris Ball &lt;chris@printf.net&gt;
</content>
</entry>
<entry>
<title>mmc: omap: Convert to devm_ioremap_resource</title>
<updated>2014-02-22T18:17:31Z</updated>
<author>
<name>Jarkko Nikula</name>
</author>
<published>2014-02-22T16:01:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64ac16ec80bc5aacdc2549226f2c0d48d185123c'/>
<id>urn:sha1:64ac16ec80bc5aacdc2549226f2c0d48d185123c</id>
<content type='text'>
Simplify probe and cleanup code by using devm_ioremap_resource. This also
makes probe code to follow more common allocate private struct followed by
other initialization style.

Signed-off-by: Jarkko Nikula &lt;jarkko.nikula@bitmer.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
Tested-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Chris Ball &lt;chris@printf.net&gt;
</content>
</entry>
</feed>
