From patchwork Fri Jan 30 14:23:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 5750571 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0132A9F38E for ; Fri, 30 Jan 2015 14:23:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26DED20270 for ; Fri, 30 Jan 2015 14:23:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2C1BA2027D for ; Fri, 30 Jan 2015 14:23:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756005AbbA3OXi (ORCPT ); Fri, 30 Jan 2015 09:23:38 -0500 Received: from mail-we0-f178.google.com ([74.125.82.178]:38205 "EHLO mail-we0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752426AbbA3OXh (ORCPT ); Fri, 30 Jan 2015 09:23:37 -0500 Received: by mail-we0-f178.google.com with SMTP id k48so27404163wev.9; Fri, 30 Jan 2015 06:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=i/ugpRN/Qaejf6X5m1pVl4oAD9v1JbePGrrGKMNA2Dw=; b=qMEOF1aua16B7x7bteM+Is8rwMpYHkGwsGjoSosrgpi8mEFuVw4ZWAFuLvCaxdyqAK V0GEErrPgkNgKdGW/3YDwQOcRr2KvBhFNO7dkFz8kARujhavmc14JHXoWLubF0T8hYwD MgM8Mi4MP15WwOsI58yvDhahZ/r/JHo7sq228vCw9o64MAHDGNKBG+c/tMnx8QCdqKhK 5W9q2z30HxLQXThhxaHF7d+cU7OMB4ROXxj5gQbQrNLxbdxjKkHRsacLmY+xFf5w2Hg4 E2VGjLrH1VIRbEBfX1v3q1YU3wSHRYsEqgYGuBh0075LNW6aaqRFSDm8bCAep2RwUSrN Fwuw== X-Received: by 10.194.77.75 with SMTP id q11mr12991691wjw.116.1422627816189; Fri, 30 Jan 2015 06:23:36 -0800 (PST) Received: from pali-latitude.localnet ([2001:718:1e03:a01::1ca]) by mx.google.com with ESMTPSA id qg11sm7122453wic.17.2015.01.30.06.23.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 06:23:35 -0800 (PST) From: Pali =?utf-8?q?Roh=C3=A1r?= To: Aaro Koskinen Subject: Re: mmc does not work in qemu n900 Date: Fri, 30 Jan 2015 15:23:34 +0100 User-Agent: KMail/1.13.7 (Linux/3.13.0-44-generic; KDE/4.14.2; x86_64; ; ) Cc: Chris Ball , Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Pavel Machek , Ivaylo Dimitrov , Sebastian Reichel References: <201501262204.59305@pali> <20150126232104.GA591@fuloong-minipc.musicnaut.iki.fi> <201501271017.39808@pali> In-Reply-To: <201501271017.39808@pali> MIME-Version: 1.0 Message-Id: <201501301523.34410@pali> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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: 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? 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;