linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Chris Ball <chris@printf.net>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Pavel Machek <pavel@ucw.cz>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>,
	Sebastian Reichel <sre@kernel.org>
Subject: Re: mmc does not work in qemu n900
Date: Fri, 30 Jan 2015 15:23:34 +0100	[thread overview]
Message-ID: <201501301523.34410@pali> (raw)
In-Reply-To: <201501271017.39808@pali>

[-- Attachment #1: Type: Text/Plain, Size: 1996 bytes --]

On Tuesday 27 January 2015 10:17:39 Pali Rohár wrote:
> On Tuesday 27 January 2015 00:21:04 Aaro Koskinen wrote:
> > Hi,
> > 
> > On Mon, Jan 26, 2015 at 10:04:59PM +0100, Pali Rohár wrote:
> > > problem? Why any of these two patches fix problem when mmc
> > > is not detected by kernel in qemu (machine n900)?
> > > Detection of mmc fails because function
> > > mmc_send_op_cond() without one of above patches fails.
> > 
> > Has it ever worked? It could be just that QEMU's emulation
> > is broken. Since the kernel works on actual HW, you
> > probably should contact QEMU maintainers.
> > 
> > I don't see n900 in Debian's QEMU. There's n800 and n810 but
> > I couldn't boot any of my kernels with those...
> > 
> > A.
> 
> It worked with stock Nokia kernel (2.6.28).
> 
> N900 qemu support is not in upstream qemu project, but in
> linaro qemu version. You can find it e.g. in ubuntu:
> http://packages.ubuntu.com/source/precise-updates/qemu-linaro

Here is another alternative patch which enable internal eMMC 
support in qemu n900:

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 9584bff..225df49 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2330,13 +2330,13 @@ static int mmc_rescan_try_freq(struct 
mmc_host *host, unsigned freq)
 	sdio_reset(host);
 	mmc_go_idle(host);
 
-	mmc_send_if_cond(host, host->ocr_avail);
-
-	/* Order's important: probe SDIO, then SD, then MMC */
-	if (!mmc_attach_sdio(host))
-		return 0;
-	if (!mmc_attach_sd(host))
-		return 0;
+//	mmc_send_if_cond(host, host->ocr_avail);
+//
+//	/* Order's important: probe SDIO, then SD, then MMC */
+//	if (!mmc_attach_sdio(host))
+//		return 0;
+//	if (!mmc_attach_sd(host))
+//		return 0;
 	if (!mmc_attach_mmc(host))
 		return 0;
 
It just disable SDIO and SD code. It looks like using some SDIO 
or SD commands on mmc controller in qemu cause problems...

Any idea?

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2015-01-30 14:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 21:04 mmc does not work in qemu n900 Pali Rohár
2015-01-26 23:21 ` Aaro Koskinen
2015-01-27  9:17   ` Pali Rohár
2015-01-30 14:23     ` Pali Rohár [this message]
2015-02-07 23:02       ` Pali Rohár
2016-12-14 21:25       ` Pali Rohár
2015-12-25 12:57 ` Pali Rohár

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201501301523.34410@pali \
    --to=pali.rohar@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=chris@printf.net \
    --cc=ivo.g.dimitrov.75@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).